Sanitarium by Zac Dreyer

XenServer: Export / Import a VM

Posted by zac on Monday, November 25th, 2013

This is mirror of a post I used to reference often until the site went down. The original article was, and hopefully will be again, available at:

I have recently started working with Citrix XenServer a fair bit and had to figure out how to move a bunch of VM’s from 1 Xen Server to another with out the lovely option of Live Motion.

That left Exporting and then Importing.

At the time of writing this I was working with XenServer 5.5.

Now you can export a VM via XenCenter management, but unless you are on a gigabit network with the XenServer box, that is going to be a slow process, as XenCenter encrypts the traffic which in turn slows it down even more.

Both XenServer were same version, if they are not you will run into issues.

My solution was just to setup a box with a large amount of disk space then setup an NFS Share on it. I then mounted the NFS share on the new and old XenServer box as /test

The export command to run from XenServer console is,

xe vm-export vm=crucialtestbox filename=/test/crucialtestbox.xva

Then on the new XenServer box run,

xe vm-import filename=/test/crucialtestbox.xva

Another note is that there is a different command for exporting templates, however not to import templates, the standard import command works.

Typing xe –help will list all other commands.

Hopefully that helps someone in the future.

Posted in: Linux.

Comments are closed.