Xen Server (VM Export script)

Do it from the command line.  Attach your removable storage (note that the format of the filesystem will make a big difference, I suggest ext3).  Let’s say you mount a USB drive on /mnt as such:

mount /dev/sdc1 /mnt

Then just run these commands:

xe vm-list (get the uuid of the vm you want to backup)

xe vm-shutdown uuid=<uuid from above>

xe vm-export uuid=<uuid from above> filename=/mnt/vm_name.xva

xe vm-start uuid=<uuid from above>

Then unmount your storage for transport:

umount /mnt



xe vm-shutdown uuid=6c77678d-7801-cde1-1b00-2a4a81a566f8
xe vm-export uuid=6c77678d-7801-cde1-1b00-2a4a81a566f8 filename=/mnt/vm_koopia/helia/vm/vm_name.xva
xe vm-start uuid=6c77678d-7801-cde1-1b00-2a4a81a566f8