Want to export a VM from AHV? Here’s how.

  • 17 March 2020
  • 0 replies
  • 13311 views

Userlevel 3
Badge +4


You may be familiar with using Nutanix Move to migrate VMs into an AHV cluster, or you may have imported VMs to AHV manually following this method, but what if you want to take your VM out of your AHV cluster to use in a non-Nutanix ESXi cluster, or to deploy on Hyper-V or KVM?

Note I said non-Nutanix ESXi cluster. If you have a Nutanix ESXi cluster and an AHV cluster it’s much easier to use Async DR migration since this kind of cross hypervisor DR migration is fully supported from Prism.

If you need to export your VM from AHV to another hypervisor there is a documented procedure provided. Here we will be using the articles “AHV | How to access VM disk files on Nutanix container” and “AHV | How to migrate user VMs from AHV to Hyper-V/VMware ESXi/KVM”.

The first article covers reviewing your VM configuration from ACLI to identify the VM disks which are named by their UUID, and then how to collect those files using the SFTP protocol on port 2222.

The second article describes using the “qemu-img” software on a Windows machine to convert the image file. The qemu-img software open source and available for Linux or Windows which can be used to convert disk images to or from raw, vmdk, vhd, vhdx, and other formats.

After converting your disk image to the desired format such as vmdk you’ll need to follow documented methods for your destination hypervisor. For ESXi this may involve using vmkfstools to create the virtual machine disk descriptor file  and then creating a VM which uses this disk. For Hyper-V you would need to follow their steps to Create a virtual machine in Hyper-V using the imported VHD or VHDX file.

When exporting the VM from AHV you will not find an XML file which describes the VM configuration. To re-create the VM with the same configuration you will need to review the virtual machine details gathered with the acli vm.get command, then re-create the configuration on your destination hypervisor.

I hope I’ve covered the necessary details here but if you have questions please let me know in the comments.


This topic has been closed for comments