Migrate Linux from KVM to Nutanix AHV
Migrate Linux from KVM to Nutanix AHV is very similar to migrate Windows from KVM to Nutanix AHV (Link here)/ There is one difference, no need to install Nutanix VirtIO drivers. To find list of supported Linux operating systems by Nutanix AHV, check out Nutanix official documentation
- Guest virtual machine – CentOS 8.1
- Nutanix AOS 5.16
- Ubuntu 18.04 KVM
First what you have to do is mount Nutanix container onto KVM host. The next task is to convert the QCOW2 VM disk file to RAW (Nutanix AHV). The default path is
/var/lib/libvirt/images but the image file location may vary. To find out exact file location you can use virsh (
virsh domblklist centos81kvm) or Virtual manager (GUI).
qemu-img convert -f qcow2 -O raw centos81kvm.qcow2 centos81kvm.raw
Copy over the RAW file from KVM host onto Nutanix AHV container. Create VM on Nutanix AHV, when adding disk, choose the SCSI bus and CLONE FROM ADFS. In file patch provide a path to the RAW file stored on Nutanix container.
[email protected]:# alias cp="rsync -ah --progress" [email protected]:# cp centos81kvm.raw /mnt/nutanix/ sending incremental file list centos81kvm.raw 5.05G 23% 428.64MB/s 0:00:37
NOTE: At first boot, CentOS VM may have issues (I saw it once when I was tetsting migration to Nutanix AHV on CentOS 8.1) with networking connectivity. Follow the below procedure to “fix” the problem (for the demo purposes I have DHCP IP address on the VM).
- Power VM on
- log in and power VM off.
- Remove vNIC,
- SAVE changes and add new vNIC.
- Power VM on
You can delete now source RAW image from Nutanix container and Migrate Linux from KVM to Nutanix AHV task is done 🙂
Below you can find video and watch migration process with all steps.