Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a snapshot of a Citrix XenServer virtual machine using XenCenter, and now I would like to save this snapshot as an *.xva file, just as if I right-click on the snapshot icon in XenCenter and choose "Export to file...".

However since the VM has a size of 100 GByte I would rather do this operation from the XenServer console and save it right to a fast NFS mounted volume instead of downloading the VM through a slow network connection.

Please advise how to do this via the console. I spent some time googling but was unable to find a solution for this particular problem.

share|improve this question
up vote 3 down vote accepted

Once you snapshot a server you can export that snapshot to locally mounted storage such as NFS. Take a look at a free script written by Andy Burton Here:

I have cut and pasted the relevant command from his script below.

# Create snapshot

            snapshot=`xe vm-snapshot vm=$uuid new-name-label=backup_$date`
            vm_log[${#vm_log[@]}]="Snapshot: $snapshot"

            # Set as VM not template

            snapshot_template=`xe template-param-set is-a-template=false uuid=$snapshot`
            vm_log[${#vm_log[@]}]="Set as VM"

            # Export

            snapshot_export=`xe vm-export vm=$snapshot filename="$backup_dir$label-$date$backup_ext"`
            vm_log[${#vm_log[@]}]="Export: $snapshot_export"

            # Delete snapshot

            snapshot_delete=`xe vm-uninstall uuid=$snapshot force=true`
            vm_log[${#vm_log[@]}]="Delete Snapshot: $snapshot_delete"
share|improve this answer
  1. xe snapshot-list (for snapshot uuid)
  2. xe vm-export vm=SNAPSHOT_UUID filename=/mnt/anything
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.