
Export an Nutanix AHV VM
In this article I want to show you how to export a Nutanix AHV VM.
Currently it is not possible to export a VM via PRISM, so we have to do it via the CLI.
STEP 1: Find the vDisk UUID
Log in to one of the CVM (Controller Virtual Machine) via SSH.
After connecting to the CVM, we execute the command aCLI following from vm.list. This step is only necessary if you do not know the exact name of your VM.)
nutanix@NTNX-353e740a-A-CVM:10.42.10.12:~$ acli vm.list
VM name VM UUID
CTX-DC01 55968083-8693-41f8-af41-5675bf6059e3
CTX-DDC01 faea6032-117e-4301-ad4e-c7605de5380e
CTX-Win10-Master 3ac2deab-165d-47f4-8dca-600a56bc1816
Now the VMDISK UUID is determined by acli vm.get [VMNAME].

As can be seen in the red frame above, the VMDISK UUID for the VM to be exported is “4d984220-6879-4a75-a130-09b2b0be3ce5”.
STEP 2: Export the VMDISK
Since the vDisk at Nutanix AHV is located in a hidden folder .acropolis, we have to export it with qemu-img converter.
When exporting, as a result of Thin-Disk, only what is actually occupied is exported!
Make sure the VM is turned off, then execute the appropriate command:
qemu-img convert -c nfs://127.0.0.1/[container]/.acropolis/vmdisk/[UUID] -O qcow2 nfs://127.0.0.1/[container]/[vmdisk].qcow2
Here is my example:
qemu-img convert -c nfs://127.0.0.1/default-container-42872125767206/.acropolis/vmdisk/01899c9e-f2c7-47f8-8d58-5c6017263d06 -O qcow2 nfs://127.0.0.1/default-container-42872125767206/ctx-dc01.qcow2
Depending on system performance, CVM load and SSD/HDD speed this may take some time.
Now the container can be mapped and copied in a workstation (Mac, Win or Linux…). Don’t forget to whitelist the corresponding IP in the Nutanix system!

In my case, I export the vDisk directly to another AHV cluster
4 thoughts on “Export an Nutanix AHV VM”
Hi,
Thanks for the information.
I have been looking for a way to export VMs from my Nutanix CE and then import the VMs to a new Nutanix CE version (I’m afraid to upgrade in case something goes wrong and I loose my VMs) .
Will this procedure work on Nutanix CE?
Hey Andreas,
yes this works with the Nutanix CE!
Anyway to check the progress of this? I don’t see it in ECLI or progress_monitor_cli –fetchall
Thanks for this. Why couldn’t we just copy the .qcow2 instead of exporting it first?