Create a KVM Virtual Machine using a Qcow2 Linux Image

Create a KVM Virtual Machine using a Qcow2 Linux Image

 

On this information, we’ll see 3 ways to create a KVM digital machine utilizing Qcow2 picture in Linux. For these questioning, QCOW, stands for QEMU copy-on-write, is the default storage format for digital disks of QEMU/KVM cases. Some Linux distributions particularly RHEL gives custom-made Qcow2 photographs, so we are able to immediately create and run new digital machines with Purple Hat Enterprise Linux OpenStack Platform, or KVM hypervisor.

Create A KVM Digital Machine Utilizing Qcow2 Picture

We are able to import Qcow2 photographs in three alternative ways;

  1. utilizing virt-install command,
  2. utilizing Virt-manager gui utility,
  3. utilizing Cockpit internet console.

1. Import Qcow2 photographs utilizing virt-install command

virt-install is a command line instrument to create KVM, Xen and Linux container friends. It’s a part of the Virt-manager bundle. If you have not put in Virt-manager but, refer the information hooked up in “Virt-manager” part beneath.

To create new KVM VM utilizing Qcow2 picture, run:

$ virt-install –name CentOS_8_Server –memory 2048 –vcpus 1 –disk /residence/sk/CentOS_8_Server.qcow2,bus=sata –import –os-variant centos8 –network default

Create a KVM Virtual Machine using a Qcow2 Linux Image

Substitute “/residence/sk/CentOS_8_Server.qcow2” along with your precise path the place you’ve got saved the Qcow2 picture.

This command will create a CentOS Eight KVM occasion with 2GB RAM, 1 vCPU with Qcow2 digital disk.

As soon as the VM is created, it can routinely open in Virt-viewer utility. Virt-viewer can be a part of the VIrt-manager bundle.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Begin utilizing the brand new VM!

To launch the identical VM subsequent time, run:

$ virsh –connect qemu:///system begin centos8

Substitute “centos8” along with your VM’s identify.

You’ll be able to view the listing of accessible VMs utilizing command:

$ virsh listing –all

2. Import Qcow2 photographs utilizing Virt-manager

Virt-manager is a graphical person interface utility used for creating and managing digital machines by libvirt. Refer the next information to discover ways to set up and use Digital-manager.

As soon as Virt-manager is put in, launch it from Sprint or Menu.

Navigate to File -> New Digital Machine. Virt-manager may have an “Import current disk picture” choice within the first window when creating a brand new digital machine. Select it and click on Ahead button.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Select the precise path of Qcow2 picture after which select the working system’s variant you need to set up. In my case, I selected CentOS 8.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Select Reminiscence and CPU settings for the brand new VM:

Create a KVM Virtual Machine using a Qcow2 Linux Image

Examine the “Customise configuration earlier than set up” choice and click on End.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Now you will note VM’s configuration window. Click on on “VirtIO Disk 1” setting from the left pane. On the suitable aspect pane, select “SATA” as DISK BUS worth below Superior Settings. Click on Apply to allow the adjustments.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Subsequent configure Community settings for the VM. To take action, click on “NIC :xx:xx:xx” choice and choose the Community Supply, System mannequin and so forth. Click on Apply to save lots of the adjustments.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Lastly, click on “Start Set up” on the highest bar to start out loading the brand new VM.

Create a KVM Virtual Machine using a Qcow2 Linux Image

You can be redirected to the Digital machine’s graphical console.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Begin utilizing the newly created VM!

3. Import Qcow2 photographs utilizing Cockpit Net console

Cockpit is a web-based server administration instrument for managing distant Linux machines through a web-browser.

Not simply bodily machines, we are able to additionally handle digital machines through Cockpit. For extra particulars, refer the next information to discover ways to handle KVM VMs through Cockpit:

Log in to your Cockpit internet console. Then click on on “Digital Machines” tab on the left pane.

Click on “Import VM” choice to import the present Qcow2 digital disk picture.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Enter the Digital machine identify, select the Qcow2 picture file location, select the reminiscence measurement and click on “Import” choice. Ensure you’ve unchecked the field that claims – “Instantly Begin VM”. As a result of, we have to do configure Disk and Community settings.

Create a KVM Virtual Machine using a Qcow2 Linux Image

After importing the machine, you’ll be able to alter CPU, Reminiscence and Community settings as per your requirement. First, we have to configure the Disk Bus Kind.

To take action, Click on on the “Disks” tab and click on “Edit”.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Select the bus sort. The default is hypervisor dependent. For KVM, the default worth is virtio. You’ll want to choose a sound bus sort. I choose the bus sort as “sata” and click on Save.

Create a KVM Virtual Machine using a Qcow2 Linux Image

Subsequent go to Community Interfaces tab, click on “Edit”, select Interface Kind and Supply and eventually click on Save.

Create a KVM Virtual Machine using a Qcow2 Linux Image

As soon as every little thing is nice, click on “Run” to start out the digital machine:

Create a KVM Virtual Machine using a Qcow2 Linux Image

Go to the Consoles tab and see if the newly created VM is working!

Create a KVM Virtual Machine using a Qcow2 Linux Image

Hope this helps.

Thanks for stopping by!

Assist us that will help you:

Have a Good day!!

create vm using qcow2,kvm import qcow2,how to create qcow2 image,how to create qcow2 image in centos,how to open qcow2 file in linux,how to create qcow2 image from iso,qcow2 download,kvm start qcow2 image