Export a VM on AHV

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://[container]/.acropolis/vmdisk/[UUID] –O qcow2 nfs://[container]/[vmdisk].qcow2

qemu-img convert -c nfs:// -O qcow2 nfs://

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.


3 thoughts on “Export a VM on AHV”

  1. 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:// -O qcow2 nfs://

    Any Idea?

    Thanks in advance

    1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *