Step 1: Find UUID of the vDisk.
Connect to a CVM, enter aCLI and run the command vm.get [vm name]
Copy the vmdisk_uuid.
Step 2: Export the vDisk
vDisks of AHV VMs are located in a hidden folder on the container named .acropolis. We use the qemu-img command to export the vDisk. One cool thing is that the vDisk is exported in a thin format, so even if it is provisioned as a 100GB drive, it will only export the actual size used.
Make sure the VM is powered off, then run the following command:
qemu-img convert –c nfs://127.0.0.1/[container]/.acropolis/vmdisk/[UUID] –O qcow2 nfs://127.0.0.1/[container]/[vmdisk].qcow2
Example:
qemu-img convert -c nfs://127.0.0.1/Nutanix/.acropolis/vmdisk/5c0996b9-f114-475f-98c0-ea4d09e8e447 -O qcow2 nfs://127.0.0.1/Nutanix/export_me.qcow2
Step 3: Copy the vDisk
Once the export completes, you can now whitelist a Windows 2012 R2 server and simply browse to the container and copy the vDisk.
first of all, Awesome article! I tried to follow it but after some minutes I always get the errors bellow (running the command inside a CVM):
qemu-img: NFS Error: NFS: Write failed with NFS3ERR_JUKEBOX(-11)
qemu-img: error while writing sector 44426880: Resource temporarily unavailable
command : qemu-img convert -c nfs://127.0.0.1/ntxcontainer/.acropolis/vmdisk/d9759595-6dee-4138-bcc0-bad7bf8e1075 -O qcow2 nfs://127.0.0.1/Backup_VM/TAIPEI.qcow2
Any Idea?
Thanks in advance
Are you trying this on a running VM? You may need to make sure that the VM is powered off while to try to export it.
No, the target VMs are turned off…