Export a live running VM guest from XenServer host

Log in to the host server.

1. List all vm-s and copy the vm uuid you want to backup.

xe vm-list is-control-domain=false

2. Create a snapshot of the vm.

xe vm-snapshot uuid=[uuid of vm] new-name-label=snapshotname

3. Convert the snapshot from a tmplate to a vm.

xe template-param-set is-a-template=false ha-always-run=false uuid=[uuid of snapshot]

4. Save the snapshot to a file.

xe vm-export vm=[uuid of snapshot] filename=filename.xva

5. Delete the snapshot.

xe vm-uninstall uuid=[uuid of snapshot] force=true

6. Now just copy the saved file to a backup server by ssh, ftp, nfs or any other method you prefer.

You can also save the file to nfs share directly in step 4.

4 thoughts on “Export a live running VM guest from XenServer host

  1. Hi there, with a VM from 100Gb of disk, exporting directly to a nfs storage (another VM in another XenServer) it’s very low (more than 80hs). Have you another choice to making this, directly to the nfs storage in a couple of hours? Many Thanks!

    • I solved the problem with fuse and sshfs.

      I mount a distant partition with sshfs (or ftpfs, …) and export to the mounted directory.

      Disable ssh compression to good performances !

      Transfert go to more than 50 MB/s (400 Mb/s) with 300 Km of distance and Gb connection.

Leave a Reply

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

You must enable javascript to see captcha here!