XVA is a Xen format that packages one virtual machine as a single file. Command xe vm-import imports XVA files only. Shut the VM down before xe vm-export and include the .xva extension in the file name. XenCenter also imports OVF, OVA, VHD, VHDX and VMDK.
You need to move a virtual machine to another host or restore one from a file. XVA is the format that XenServer uses for that.
Every fact below comes from the XenServer documentation page on importing and exporting VMs. Commands here are not executed in a test pool.
What is an XVA File?
XenServer describes XVA as a format specific to Xen based hypervisors that packages an individual VM as a single file archive with the .xva extension. Descriptor file ova.xml defines the virtual hardware. Disks form a directory of files where every 1 MB piece has a data file and a checksum file.
XenServer documentation warns that a VM exported from a host with a different CPU type may not always start after import.
How do You Export a VM to XVA?
- Shut down the VM.
- Execute the export command with the VM name and a file name that ends in
.xva. - Confirm that the file exists at the path you gave.
xe vm-export -h hostname -u root -pw password vm=vm_name filename=/backup/vm_name.xva
XenServer states that a file name without the .xva extension may not be recognized by XenCenter on import.
How do You Import an XVA File?
xe vm-import -h hostname -u root -pw password filename=/backup/vm_name.xva
| Option | Purpose |
|---|---|
| filename | Path to the export file |
| sr-uuid | Selects a storage repository instead of the default |
| preserve=true | Retains the MAC address of the original VM |
The command prints the UUID of the new VM on success. Command line import and export handle XVA files only.
Which Formats does XenCenter Support?
| Direction | Formats |
|---|---|
| Import | OVF, OVA, VHD, VHDX, AVHDX, VMDK and XVA |
| Export | OVF, OVA and XVA |
Disk images can be imported but not exported. For another hypervisor see how to install Linux KVM.
Frequently Asked Questions
What is an XVA File?
It is a Xen format that packages one VM into a file archive.
How do I Import XVA With the Command Line?
Execute xe vm-import with the filename option that points to the XVA file.
Do I Need to Stop the VM Before Export?
Yes. XenServer states that you shut down the VM before xe vm-export.
Can the CLI Import VHD Files?
No. Command line tools handle XVA files only. XenCenter imports disk images.
Does Import Keep the MAC Address?
Only when you add preserve=true to the command.
Key Takeaways
- XVA packs a VM into one file.
- xe vm-import and xe vm-export handle XVA files only.
- Shut down the VM before export.
- Include the .xva extension in the file name.
- XenCenter also imports OVF, OVA, VHD and VMDK.
Sources and References
Facts come from the XenServer documentation.
- Import and export VMs (XenServer documentation) docs.xenserver.com