Product Documentation

About VM Import and Export

Feb 04, 2013

VMs can be imported from OVF/OVA packages, from disk images, and from XenServer XVA files. VMs can be exported as OVF/OVA packages and as XenServer XVA files. You import and export VMs in XenCenter using the Import and Export wizards. XenCenter uses the Transfer VM to transfer the content of a disk image.

When importing VMs created on hypervisors other than XenCenter, for example Hyper-V or VMware, it is necessary to use the Operating System Fixup tool to ensure that imported VMs can boot on XenServer.

Supported Import and Export Formats

Format Description
Open Virtualization Format (OVF and OVA)

OVF is an open standard for packaging and distributing a virtual appliance consisting of one or more virtual machines.

For more information about XenCenter support for OVF and OVA file formats, see Open Virtualization Format (OVF and OVA).

Disk image formats (VHD and VMDK)

Virtual Hard Disk (VHD) and Virtual Machine Disk (VMDK) format disk image files can be imported using the Import wizard. You might want to import a disk image when only a virtual disk image is available, but there is no OVF metadata associated with it.

For more information about supported disk image formats, see Disk Image Formats (VHD and VMDK)

XenServer XVA format XVA is a format specific to Xen-based hypervisors for packaging a single VM as a single file archive of a descriptor and disk images. Its file extension is .xva.
XenServer XVA Version 1 (ova.xml) XVA version 1 is a format for packaging a single VM as a set of files including a descriptor and disk images. The descriptor, named ova.xml, specifies the virtual hardware of a single VM. The disk image format is a directory of files. The directory name corresponds to a reference name in the descriptor. There is one file for each one GB chunk of the disk image. The base name of each file includes the chunk number in decimal. It contains one block of the disk image in raw binary format compressed with gzip.

Which Format to Use?

Use OVF/OVA to:
  • Share XenServer vApps and VMs with other hypervisors that support OVF.
  • Save more than one VM.
  • Secure a vApp or VM from corruption and tampering.
  • Include a license agreement.
  • Simplify vApp distribution by storing an OVF package in an OVA.
Use XVA to:
  • Share VMs with versions of XenServer earlier than 6.0.
  • Import and export VMs from a script with a command line interface (CLI).

Operating System Fixup

XenCenter includes an advanced hypervisor interoperability feature – Operating System Fixup – which aims to ensure a basic level of interoperability for VMs that are imported to XenServer. You will need to use Operating System Fixup when importing VMs created on other hypervisors from OVF/OVA packages and disk images.

Operating System Fixup configures a guest operating system to boot in XenServer by enabling boot devices critical for booting in XenServer and disabling any services, also called tools, for hypervisors other than XenServer. Guest operating systems include all versions of Windows that XenServer supports and some Linux distributions. Note that Operating System Fixup does not convert the guest operating system from one hypervisor to another.

Operating System Fixup is supplied as an automatically booting ISO image that is attached to the imported VM's DVD drive and which performs the necessary configuration changes when the VM is first started, and then shuts down the VM. The next time the new VM is started, the boot device is reset and the VM starts normally.

To use Operating System Fixup on imported disk images and OVF/OVA packages, you enable the feature on the OS Fixup Settings page of the XenCenter Import wizard and specify a location where the Fixup ISO should be copied so that XenServer can use it.

Operating System Fixup requirements

Operating System Fixup requires an ISO SR with 40 MB of free space and 256 MB of virtual memory.

Transfer VM

The Transfer VM is a built-in VM that only runs during the import or export of a virtual disk image to transfer its contents between the disk image file location and a XenServer storage repository (SR). One Transfer VM runs for each import or export of a disk image. When importing or exporting VMs or vApps with more than one disk image, only one disk image transfers at a time.

You will need to configure networking settings for the Transfer VM in the Import and Export wizards.

Transfer VM requirements

The XenServer requirements to run one Transfer VM are:
Virtual CPU 1
Virtual memory 256 MB
Storage 8 MB
Networking

A network that is reachable from the XenServer host - usually the management network. Static or dynamic IP address. (Citrix recommends the use of a dynamic IP address.)

The default transfer protocol is iSCSI, and this requires an iSCSI Initiator on the XenCenter host. RawVDI can also be used as an alternate transfer protocol; see the XenServer Virtual Machine User's Guide for details.

Importing VMs: overview

When you import a VM, you are effectively creating a new VM, which involves many of the same steps as creating and provisioning a new VM using the New VM wizard, such as nominating a home server, and configuring storage and networking for the new VM; see Creating a New VM for detailed information about each of these steps.

The Import wizard takes you through the following steps to import a VM:
  1. Select the import file.

    The first step is to locate and select the file containing the VM or VMs you want to import.

    For files that are not currently located on your local XenCenter host, you can enter a URL location (http | https | file | ftp) in the Filename box. On clicking Next, a Download File dialog box opens and you can specify a folder on your XenCenter host where the file will be copied. The Import wizard will continue to the next page when the file has been downloaded.

  2. (VHD and VMDK import only) Specify the new VM's name and allocate vCPU and memory resources.

    When importing from VHD or VMDK file, you will need to specify a name for the new VM and allocate it some virtual CPUs (vCPUs) and memory. All of these values can be adjusted later, after the new VM has been created. See VM CPU and Memory Allocation for more information on this step. VM names are not checked for uniqueness within XenCenter, so it will make it easier for you to manage different VMs if you give them meaningful, memorable names; see VM Name and Description for more information.

  3. (OVF/OVA only) Review/accept EULA(s).

    If the package you are importing includes any EULAs, accept them and then click Next to continue. If no EULAs are included in the package, the wizard will skip this step and move straight on to the next page.

  4. Choose the location/home server.

    Select the destination pool or standalone server where you want to place the imported VM(s). To nominate a Home Server for the incoming VM(s), select a server in the list.

  5. Configure storage.

    Next, choose the storage repositories (SRs) where the virtual disks in the imported VM(s) will be placed:

    For VMs in XVA format, you select an SR where all of the imported VM's virtual disks will be placed.

    For VMs in OVF/OVA packages or in disk image files, you can place all of the imported virtual disks onto the same SR, or you can place individual virtual disks onto specific SRs.

  6. Configure networking.

    Next, map the virtual network interfaces in the imported VM(s) to target networks in the destination pool/standalone server.

  7. (OVF/OVA only) Security validation.

    If the selected OVF/OVA package is configured with security features such as certificates or a manifest, you will need to specify the necessary information.

  8. (OVF/OVA and disk image only) Configure OS Fixup and Transfer VM settings.

    If the VMs you are importing were built on a hypervisor other than XenServer, you will need to configure the Operating System Fixup feature to enable the imported VM to boot correctly on XenServer. You will also need to configure networking for the Transfer VM, a temporary VM used when importing/exporting VMs from disk images and OVF/OVA packages.

  9. Complete new VM creation.

    On the final page of the Import wizard, you can review all the configuration options you have chosen. When importing from XVA, you can select the Start VM automatically check box to have the new VM start automatically as soon as it is created.

    Click Finish to finish importing the selected VMs and close the wizard.

Exporting VMs: overview

Select the VM or VMs you want to export and then open Export wizard: on the VM menu, click Export.

  1. Specify export file details.

    On the first page of the wizard, enter the name of the export file, specify the folder where you want the file to be saved, and choose the export file format from the Format list:

    Choose XVA File (*.xva) to export the selected VM to an XVA file. Only single VMs can be exported in this format.

    Choose OVF/OVA Package (*.ovf, *.ova) to export the selected VM(s) as an OVF or OVA package.

  2. Confirm VMs selected for export.

    On the next page of the wizard, you can modify the VM selection set, for example, to add more VMs to the set of VMs to be exported or to deselect others. Note that when exporting to XVA, only one VM may be selected.

  3. (OVF/OVA only) Configure EULA, Advanced Options, and Transfer VM settings

    When exporting VMs as an OVF of OVA package, a number of additional settings can be configured. See Export VMs as OVF/OVA for details.

  4. Complete VM export.

    On the final page of the wizard, review the settings you have selected on the previous wizard pages. To have the wizard verify the export file, select the Verify export on completion check box.

    Click Finish to begin exporting the selected VM(s) and close the wizard.