Sometime you need to make quick and dirty image backup of VM running on XenServer and this post is about such case 😃

List machines:

xl list
Name                    ID   Mem VCPUs    State    Time(s)
Domain-0                 0  4066     8     r-----  3526567.3
webfront1.example.com    1  4096     4     r-----  3186487.2
webfront2.example.com    2  2048     2     -b----  920408.2

Now you may export one:

xe vm-export vm=webfront1.example.com filename=/srv/backup/webfront.xva
Export succeeded

You may also use uuid for that - list machines with xe vm-list (best with less) and then:

xe vm-export uuid=1234a43d-c5af-f1ef-b3c1-12347f63d84c filename=/srv/backup/webfront.xva

That’s all!