Importing and Exporting VMs

XenServer allows you to import VMs from and export them to various different formats. Using the XenCenter Import wizard, you can import VMs from disk images (VHD and VMDK), Open Virtualization Format (OVF and OVA) and XenServer XVA format. You can even import VMs that have been created on other virtualization platforms, such as those offered by VMware and Microsoft.

Note

When importing VMs that have been created using other virtualization platforms, it is necessary to configure or “fix up” the guest operating system to ensure that it boots on XenServer. The Operating System Fixup feature in XenCenter aims to provide this basic level of interoperability. For more information, see Operating System Fixup.

Using the XenCenter Export wizard, you can export VMs to Open Virtualization Format (OVF and OVA) and XenServer XVA format.

When importing and exporting VMs, a temporary VM - the Transfer VM - is used to perform the import/export of OVF/OVA packages and disk images. You need to configure networking settings for the Transfer VM in the XenCenter Import and Export wizards. For more information, see Transfer VM.

You can also use the xe CLI to import VMs from and export them to XenServer XVA format.

Supported 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 VMs.
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. Importing a disk image may be appropriate when there is a virtual disk image available, with no OVF metadata associated.
XenServer XVA format XVA is a format specific to Xen-based hypervisors for packaging an individual VM as a single file archive, including a descriptor and disk images. Its file name extension is .xva.
XenServer XVA Version 1 format XVA Version 1 is the original format specific to Xen-based hypervisors for packaging an individual VM as a single file archive, including a descriptor and disk images. Its file name extension is ova.xml.

Which Format to Use?

Consider using OVF/OVA format to:

  • Share XenServer vApps and VMs with other virtualization platforms 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 file

Consider using XVA format to:

  • Share VMs with versions of XenServer earlier than 6.0

  • Import and export VMs from a script with a CLI

Open Virtualization Format (OVF and OVA)

OVF is an open standard, specified by the Distributed Management Task Force, for packaging and distributing a virtual appliance consisting of one or more VMs. For further details about OVF and OVA formats, see the following:

Note

To import or export OVF or OVA packages, you must be logged in as root or have the Pool Administrator Role Based Access Control (RBAC) role associated with your user account.

An OVF Package is the set of files that comprises the virtual appliance. It always includes a descriptor file and any other files that represent the following attributes of the package:

  • Descriptor (.ovf): The descriptor always specifies the virtual hardware requirements of the package. It may also specify other information, including:

    • Descriptions of virtual disks, the package itself, and guest operating systems
    • A license agreement
    • Instructions to start and stop VMs in the appliance
    • Instructions to install the package
  • Signature (.cert): The signature is the digital signature used by a public key certificate in the X.509 format to authenticate the author of the package.
  • Manifest (.mf): The manifest allows you to verify the integrity of the package contents. It contains the SHA-1 digests of every file in the package.
  • Virtual disks: OVF does not specify a disk image format. An OVF package includes files comprising virtual disks in the format defined by the virtualization product that exported the virtual disks. XenServer produces OVF packages with disk images in Dynamic VHD format; VMware products and Virtual Box produce OVF packages with virtual disks in Stream-Optimized VMDK format.

OVF packages also support other non-metadata related capabilities, such as compression, archiving, EULA attachment, and annotations.

Note

When importing an OVF package that has been compressed or contains compressed files, you may need to free up more disk space on the XenServer host to import it properly.

An Open Virtual Appliance (OVA) package is a single archive file, in the Tape Archive (.tar) format, containing the files that comprise an OVF Package.

Selecting OVF or OVA Format

OVF packages contain a series of uncompressed files, which makes it easier if you want to access individual disk images in the file. An OVA package contains one large file, and while you can compress this file, it does not give you the flexibility of a series of files.

Using the OVA format is useful for specific applications for which it is beneficial to have just one file, such as creating packages for Web downloads. Consider using OVA only as an option to make the package easier to handle. Using this format lengthens both the export and import processes.

Disk Image Formats (VHD and VMDK)

Using XenCenter, you can import disk images in the Virtual Hard Disk (VHD) and Virtual Machine Disk (VMDK) formats. Exporting standalone disk images is not supported.

Note

To import disk images, you must be logged in as root or have the Pool Administrator Role Based Access Control (RBAC) role associated with your user account.

You might choose to import a disk image when a virtual disk image is available without any associated OVF metadata. Situations in which this might occur include:

  • It is possible to import a disk image, but the associated OVF metadata is not readable

  • A virtual disk is not defined in an OVF package

  • You are moving from a platform that does not allow you to create an OVF package (for example, older platforms or images)

  • You want to import an older VMware appliance that does not have any OVF information

  • You want to import a standalone VM that does not have any OVF information

When available, Citrix recommends importing appliance packages that contain OVF metadata rather than an individual disk image. The OVF data provides information the Import wizard requires to recreate a VM from its disk image, including the number of disk images associated with the VM, the processor, storage, network, memory requirements and so on. Without this information, it can be much more complex and error-prone to recreate the VM.

XVA Format

XVA is a virtual appliance format specific to XenServer, which packages a single VM as a single set of files, including a descriptor and disk images. The file name extension is .xva.

The descriptor (file name extension 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 and contains 2 files for each 1 MB block of the disk image. The base name of each file is the block number in decimal. The first file contains 1 block of the disk image in raw binary format and does not have an extension. The second file is a checksum of the first file, with the extension .checksum.

Important

If a VM is exported from a XenServer host and then imported into another XenServer host with a different CPU type, it may not run properly. For example, a Windows VM created on a XenServer host with an Intel® VT Enabled CPU, and then exported, may not run when imported into a XenServer host with an AMD-VTM CPU.

XVA Version 1 Format

XVA Version 1 is the original format specific to Xen-based hypervisors for packaging an individual VM as a single file archive, including a descriptor and disk images. Its file name extension is ova.xml.

The descriptor (file name extension 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 and contains 1 file for each 1 GB chunk of the disk image. The base name of each file includes the chunk number in decimal. It contains 1 block of the disk image in raw binary format, compressed with gzip.

Important

If a VM is exported from a XenServer host and then imported into another XenServer host with a different CPU type, it may not run properly. For example, a Windows VM created on a XenServer host with an Intel® VT Enabled CPU, and then exported, may not run when imported into a XenServer host with an AMD-VTM CPU.

Operating System Fixup

When importing a virtual appliance or disk image created and exported from a virtualization platform other than XenServer, it may be necessary to configure or “fix up” the VM before it will boot properly on a XenServer host.

XenCenter includes an advanced hypervisor interoperability feature - Operating System Fixup - which aims to ensure a basic level of interoperability for VMs that you import into XenServer. You need to use Operating System Fixup when importing VMs from OVF/OVA packages and disk images created on other virtualization platforms.

The Operating System Fixup process addresses the operating system device and driver issues inherent when moving from one hypervisor to another, attempting to repair boot device-related problems with the imported VM that might prevent the operating system within from booting in a XenServer environment. This feature is not designed to perform conversions from one platform to another.

Note

This feature requires an ISO storage repository with 40 MB of free space and 256 MB of virtual memory.

Operating System Fixup is supplied as an automatically booting ISO image that is attached to the DVD drive of the imported VM. It performs the necessary repair operations 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 or OVF/OVA packages, you must enable the feature on the Advanced Options page of the XenCenter Import wizard and then specify a location where the Fixup ISO should be copied so that XenServer can use it.

What Does Operating System Fixup do to the VM?

The Operating System Fixup option is designed to make the minimal changes possible to enable a virtual system to boot. Depending on the guest operating system and the hypervisor of the original host, extra configuration changes, driver installation, or other actions might be required following using the Fixup feature.

During the Fixup process, an ISO is copied to an ISO SR. The ISO is attached to a VM. The boot order is set to boot from the virtual DVD drive, and the VM boots into the ISO. The environment within the ISO then checks each disk of the VM to determine if it is a Linux or a Windows system.

If a Linux system is detected, then the location of the GRUB configuration file is determined and any pointers to SCSI disk boot devices are modified to point to IDE disks. For example, if GRUB contains an entry of /dev/sda1 representing the first disk on the first SCSI controller, this entry is changed to /dev/hda1 representing the first disk on the first IDE controller.

If a Windows system is detected, a generic critical boot device driver is extracted from the driver database of the installed operating system and registered with the operating system. This is especially important for older Windows operating systems when the boot device is changed between a SCSI and IDE interface. If certain virtualization tool sets are discovered in the VM, they are disabled to prevent performance problems and unnecessary event messages.

The 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.

One Transfer VM runs for each import or export of a disk image. When importing or exporting a virtual appliance with more than one disk image, only one disk image transfers at a time.

Running one Transfer VM has the following requirements:

   
Virtual CPU 1
Virtual Memory 256 MB
Storage 8 MB
Network Reachable by the XenServer host; static or dynamic IP address (dynamic, recommended)

The default transfer protocol is iSCSI. In which case, the Transfer VM requires an iSCSI Initiator on the XenServer host. An alternate transfer protocol is RawVDI.

To use the RawVDI transfer protocol

  1. Back up the XenCenterMain.exe.config file, which is located in the installation folder.

  2. Using a text editor, open the XenCenterMain.exe.config file.

  3. Add the following section group to the configSection:

    <sectionGroup name="applicationSettings"
        type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0,
        Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="XenOvfTransport.Properties.Settings"
          type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
          Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
    </sectionGroup>
    
  4. To the end of the file, add the following section:

    <applicationSettings>
      <XenOvfTransport.Properties.Settings>
        <setting name="TransferType" serializeAs="String"> <value>UploadRawVDI</value>
        </setting>
      </XenOvfTransport.Properties.Settings>
    </applicationSettings>
    
  5. Save the XenCenterMain.exe.config file.

Note

If XenCenter fails to start properly, then check that the new section group and section were added correctly.

Importing VMs

When you import a VM, you effectively create a VM, using many of the same steps required to provision a new VM, such as nominating a host, and configuring storage and networking.

You can import OVF/OVA, disk image, XVA, and XVA Version 1 files using the XenCenter Import wizard; you can also import XVA files via the xe CLI.

Importing VMs from OVF/OVA

Note

To import OVF or OVA packages, you must be logged in as root or have the Pool Administrator Role Based Access Control (RBAC) role associated with your user account.

The XenCenter Import wizard allows you to import VMs that have been saved as OVF/OVA files. The Import wizard takes you through the usual steps needed to create a VM in XenCenter: nominating a host, and then configuring storage and networking for the new VM. When importing OVF and OVA files, extra steps may be required, such as:

  • When importing VMs that have been created using other virtualization platforms, it is necessary to run the Operating System Fixup feature to ensure a basic level of interoperability for the VM. For more information, see Operating System Fixup.

  • It is necessary to configure networking for the Transfer VM used to perform the import process. For more information, see Transfer VM.

Tip

Ensure the target host has enough RAM to support the virtual machines being imported. A lack of available RAM will result in a failed import. See CTX125120 for details on how to resolve this issue.

Imported OVF packages appear as vApps when imported using XenCenter. When the import is complete, the new VMs will appear in the XenCenter Resources pane, and the new vApp will appear in the Manage vApps dialog box.

To Import VMs from OVF/OVA using XenCenter

  1. Open the Import wizard by doing one of the following:

    • In the Resources pane, right-click, and then select Import on the shortcut menu.

    • On the File menu, select Import.

  2. On the first page of the wizard, locate the file you want to import, and then click Next to continue.

  3. Review and accept EULAs, if applicable.

    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 advance straight to the next page.

  4. Specify the pool or host to which you want to import the VM(s), and then (optionally) assign the VM(s) to a home XenServer host.

    To select a host or pool, choose from the Import VM(s) to menu.

    To assign each VM a home XenServer host, select a server from the list in the Home Server. If you want not to assign a home server, select Don’t assign a home server.

    Click Next to continue.

  5. Configure storage for the imported VM(s): select one or more storage repositories on which to place the imported virtual disks, and then click Next to continue.

    To place all the imported virtual disks on the same SR, select Place all imported VMs on this target SR, and then select an SR from the list.

    To place the virtual disks of incoming VMs onto different SRs, select Place imported VMs on the specified target SRs. For each VM, select the target SR from the list in the SR column.

  6. Configure networking for the imported VMs: map the virtual network interfaces in the VMs you are importing to target networks in the destination pool. The Network and MAC address shown in the list of incoming VMs are stored as part of the definition of the original (exported) VM in the export file. To map an incoming virtual network interface to a target network, select a network from the list in the Target Network column. Click Next to continue.

  7. Specify security settings: if the selected OVF/OVA package is configured with security features, such as certificates or a manifest, specify the information necessary, and then click Next to continue.

    Different options appear on the Security page depending on which security features have been configured on the OVF appliance:

    • If the appliance is signed, a Verify digital signature check box appears, automatically selected. Click View Certificate to display the certificate used to sign the package. If the certificate appears as untrusted, it is likely that either the Root Certificate or the Issuing Certificate Authority is not trusted on the local computer. Clear the Verify digital signature check box if you do not want to verify the signature.

    • If the appliance includes a manifest, a Verify manifest content check box appears. Select this check box to have the wizard verify the list of files in the package.

      When packages are digitally signed, the associated manifest is verified automatically, so the Verify manifest content check box does not appear on the Security page.

      Note

      VMware Workstation 7.1.x OVF files fail to import if you choose to verify the manifest, as VMware Workstation 7.1.x produces an OVF file with a manifest that has invalid SHA-1 hashes. If you do not choose to verify the manifest, the import is successful.

  8. Enable Operating System Fixup: if the VM(s) in the package you are importing were built on a virtualization platform other than XenServer, select the Use Operating System Fixup check box and then select an ISO SR where the Fixup ISO can be copied so that XenServer can access it. For more information about this feature, see Operating System Fixup.

    Click Next to continue.

  9. Configure Transfer VM networking.

    Select a network from the list of network interfaces available in the destination pool or host, and then choose to automatically or manually configure the network settings.

    • To use automated Dynamic Host Configuration Protocol (DHCP) to automatically assign networking settings including the IP address, subnet mask and gateway, select Automatically obtain network settings using DHCP.

    • To configure networking settings manually, select Use these network settings, and then enter the required values. You must enter an IP address, but the subnet mask and gateway settings are optional.

    Click Next to continue.

  10. Review the import settings, and then click Finish to begin the import process and close the wizard.

    Note

    Importing a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

The import progress is displayed in the status bar at the bottom of the XenCenter window and on the Logs tab. When the newly-imported VM is available, it appears in the Resources pane, and the new vApp will appear in the Manage vApps dialog box.

Note

After using XenCenter to import an OVF package that contains Windows operating systems, you must set the platform parameter. This will vary according to the version of Windows contained in the OVF package:

  • For Windows Vista, Server 2008, and later, set the platform parameter to device_id=0002. For example:

     xe vm-param-set uuid=VM uuid platform:device_id=0002
    
  • For all versions of Windows, set the platform parameter to viridian=true. For example:

     xe vm-param-set uuid=VM uuid platform:viridian=true
    

Importing Disk Images

The XenCenter Import wizard allows you to import a disk image into a pool or specific host as a VM. The Import wizard takes you through the usual steps needed to create a new VM in XenCenter: nominating a host, and then configuring storage and networking for the new VM.

Requirements:

  • You must be logged in as root or have the Pool Administrator Role Based Access Control (RBAC) role associated with your user account.

  • DHCP has to be running on the management network XenServer is using.

  • The Import wizard requires local storage on the server on which you are running it.

To Import VM(s) from a Disk Image using XenCenter

  1. Open the Import wizard by doing one of the following:

    • In the Resources pane, right-click, and then select Import on the shortcut menu.

    • On the File menu, select Import.

  2. On the first page of the wizard, locate the file you want to import, and then click Next to continue.

  3. Specify the VM name and allocate CPU and memory resources.

    Enter a name for the new VM to be created from the imported disk image, and then allocate the number of CPUs and amount of memory. Click Next to continue.

  4. Specify the pool or host to which you want to import the VM(s), and then (optionally) assign the VM(s) to a home XenServer host.

    To select a host or pool, choose from the Import VM(s) to menu.

    To assign each VM a home XenServer host, select a server from the list in the Home Server. If you want not to assign a home server, select Don’t assign a home server.

    Click Next to continue.

  5. Configure storage for the imported VM(s): select one or more storage repositories on which to place the imported virtual disks, and then click Next to continue.

    To place all the imported virtual disks on the same SR, select Place all imported VMs on this target SR, and then select an SR from the list.

    To place the virtual disks of incoming VMs onto different SRs, select Place imported VMs on the specified target SRs. For each VM, select the target SR from the list in the SR column.

  6. Configure networking for the imported VMs: map the virtual network interfaces in the VMs you are importing to target networks in the destination pool. The Network and MAC address shown in the list of incoming VMs are stored as part of the definition of the original (exported) VM in the export file. To map an incoming virtual network interface to a target network, select a network from the list in the Target Network column. Click Next to continue.

  7. Enable Operating System Fixup: if the disk image(s) you are importing were built on a virtualization platform other than XenServer, select the Use Operating System Fixup check box and then select an ISO SR where the Fixup ISO can be copied so that XenServer can access it. For more information about this feature, see Operating System Fixup.

    Click Next to continue.

  8. Configure Transfer VM networking.

    Select a network from the list of network interfaces available in the destination pool or host, and then choose to automatically or manually configure the network settings.

    • To use automated Dynamic Host Configuration Protocol (DHCP) to automatically assign networking settings including the IP address, subnet mask and gateway, select Automatically obtain network settings using DHCP.

    • To configure networking settings manually, select Use these network settings, and then enter the required values. You must enter an IP address, but the subnet mask and gateway settings are optional.

    Click Next to continue.

  9. Review the import settings, and then click Finish to begin the import process and close the wizard.

Note

Importing a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

The import progress is displayed in the status bar at the bottom of the XenCenter window and on the Logs tab. When the newly-imported VM is available, it appears in the Resources pane.

Note

After using XenCenter to import a disk image that contains Windows operating systems, you must set the platform parameter. This will vary according to the version of Windows contained in the disk image:

  • For Windows Vista, Server 2008, and later, set the platform parameter to device_id=0002. For example:

     xe vm-param-set uuid=VM uuid platform:device_id=0002
    
  • For all other versions of Windows, set the platform parameter to viridian=true. For example:

     xe vm-param-set uuid=VM uuid platform:viridian=true
    

Importing VMs from XVA

You can import VMs, templates and snapshots that have previously been exported and stored locally in XVA format (with the .xva file name extension) or XVA Version 1 format (with the ova.xml file name extension). To do so, you follow the usual steps needed to create a new VM: nominating a host, and then configuring storage and networking for the new VM.

Warning

It may not always be possible to run an imported VM that was exported from another server with a different CPU type. For example, a Windows VM created on a server with an Intel VT Enabled CPU, then exported, may not run when imported to a server with an AMD-VTM CPU.

To Import VM(s) from XVA Files VM using XenCenter

  1. Open the Import wizard by doing one of the following:

    • In the Resources pane, right-click, and then select Import on the shortcut menu.

    • On the File menu, select Import.

  2. On the first page of the wizard, locate the file you want to import (.xva or ova.xml), and then click Next to continue.

    If you enter a URL location (http, https, file, or ftp) in the Filename box, and then click Next, a Download Package dialog box opens and you must specify a folder on your XenCenter host where the file will be copied.

  3. Select a pool or host for the imported VM to start on, and then choose Next to continue.

  4. Select the storage repositories on which to place the imported virtual disk, and then click Next to continue.

  5. Configure networking for the imported VM: map the virtual network interface in the VM you are importing to target a network in the destination pool. The Network and MAC address shown in the list of incoming VMs are stored as part of the definition of the original (exported) VM in the export file. To map an incoming virtual network interface to a target network, select a network from the list in the Target Network column. Click Next to continue.

  6. Review the import settings, and then click Finish to begin the import process and close the wizard.

    Note

    Importing a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

The import progress is displayed in the status bar at the bottom of the XenCenter window and on the Logs tab. When the newly-imported VM is available, it appears in the Resources pane.

To Import a VM from XVA using the xe CLI

To import the VM to the default SR on the target XenServer host, enter the following:

xe vm-import -h hostname -u root -pw password \
filename=pathname_of_export_file

To import the VM to a different SR on the target XenServer host, add the optional sr-uuid parameter:

xe vm-import -h hostname -u root -pw password \
filename=pathname_of_export_file sr-uuid=uuid_of_target_sr

If you want to preserve the MAC address of the original VM, add the optional preserve parameter and set to true:

xe vm-import -h hostname -u root -pw password \
filename=pathname_of_export_file preserve=true

Note

Importing a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

Once the VM has been imported, the command prompt returns the UUID of the newly imported VM.

Exporting VMs

You can export OVF/OVA and XVA files using the XenCenter Export wizard; you can also export XVA files via the xe CLI.

Exporting VMs as OVF/OVA

Using the XenCenter Export wizard, you can export one or more VM(s) as an OVF/OVA package. When you export VMs as an OVF/OVA package, the configuration data is exported along with the virtual hard disks of each VM.

Note

In order to export OVF or OVA packages, you must be logged in as root or have the Pool Administrator Role Based Access Control (RBAC) role associated with your user account.

To Export VM(s) as OVF/OVA using XenCenter

  1. Shut down or suspend the VM(s) that you want to export.

  2. Open the Export wizard: in the Resources pane, right-click the pool or host containing the VM(s) you want to export, and then select Export.

  3. On the first page of the wizard, enter the name of the export file, specify the folder where you want the file(s) to be saved, and select OVF/OVA Package (*.ovf, *.ova) from the Format menu. Click Next to continue.

  4. From the list of available VMs, select the VM(s) that you want to include in the OVF/OVA package, and then click Next to continue.

  5. If required, you can add to a previously-prepared End User Licensing Agreement (EULA) document (.rtf, .txt) to the package.

    To add a EULA, click Add and browse to the file you want to add. Once you have added the file, you can view the document by selecting it from the EULA files list and then clicking View.

    EULAs can provide the legal terms and conditions for using the appliance or the applications delivered in the appliance.

    The ability to include one or more EULAs lets you legally protect the software on the appliance. For example, if your appliance includes a proprietary operating system on one or more of its VMs, you may want to include the EULA text from that operating system. The text is displayed and must be accepted by the person who imports the appliance.

    Note

    Attempting to add EULA files that are not in supported formats, including XML or binary files, can cause the import EULA functionality to fail.

    Select Next to continue.

  6. On the Advanced options page, specify a manifest, signature and output file options, or just click Next to continue.

    1. To create a manifest for the package, select the Create a manifest check box.

      The manifest provides an inventory or list of the other files in a package and is used to ensure the files originally included when the package was created are the same files present when the package arrives. When the files are imported, a checksum is used to verify that the files have not changed since the package was created.

    2. To add a digital signature to the package, select the Sign the OVF package check box, browse to locate a certificate, and then enter the private key associated with the certificate in the Private key password field.

      When a signed package is imported, the user can verify the identity of the creator by using the public key to validate the digital signature. Use an X.509 certificate which you have already created from a Trusted Authority and exported as either a .pem or .pfx file that contains the signature of the manifest file and the certificate used to create that signature.

    3. To output the selected VMs as a single (tar) file in OVA format, select the Create OVA package (single OVA export file) check box. For more on the different file formats, see Open Virtualization Format.

    4. To compress virtual hard disk images (.VHD files) included in the package, select the Compress OVF files check box.

      When you create an OVF package, the virtual hard disk images are, by default, allocated the same amount of space as the exported VM. For example, a VM that is allocated 26 GB of space will have a hard disk image that consumes 26 GB of space, regardless of whether or not the VM actually requires it.

      Note

      Compressing the VHD files makes the export process take longer to complete, and importing a package containing compressed VHD files will also take longer, as the Import wizard must extract all of the VHD images as it imports them.

    If both the Create OVA package (single OVA export file) and Compress OVF files options are checked, the result is a compressed OVA file with the file name extension .ova.gz.

  7. Configure Transfer VM networking.

    Select a network from the list of network interfaces available in the destination pool or host, and then choose to automatically or manually configure the network settings.

    • To use automated Dynamic Host Configuration Protocol (DHCP) to automatically assign networking settings including the IP address, subnet mask and gateway, select Automatically obtain network settings using DHCP.

    • To configure networking settings manually, select Use these network settings, and then enter the required values. You must enter an IP address, but the subnet mask and gateway settings are optional.

    Click Next to continue.

  8. Review the export settings.

    To have the wizard verify the exported package, select the Verify export on completion check box. Click Finish to begin the export process and close the wizard.

    Note

    Exporting a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

The export progress is displayed in the status bar at the bottom of the XenCenter window and on the Logs tab. To cancel an export in progress, click the Logs tab, find the export in the list of events, and click the Cancel button.

Exporting VMs as XVA

You can export an existing VM as an XVA file using the XenCenter Export wizard or the xe CLI. Citrix does recommend exporting a VM to a machine other than a XenServer host, on which you can maintain a library of export files (for example, to the machine running XenCenter).

Warning

It may not always be possible to run an imported VM that was exported from another server with a different CPU type. For example, a Windows VM created on a server with an Intel VT Enabled CPU, then exported, may not run when imported to a server with an AMD-VTM CPU.

To Export VM(s) as XVA Files using XenCenter
  1. Shut down or suspend the VM that you want to export.

  2. Open the Export wizard: from the Resources pane, right-click the VM which you want to export, and then select Export.

  3. On the first page of the wizard, enter the name of the export file, specify the folder where you want the file(s) to be saved, and select XVA File (*.xva) from the Format menu. Click Next to continue.

  4. From the list of available VMs, select the VM that you want to export, and then click Next to continue.

  5. Review the export settings.

    To have the wizard verify the exported package, select the Verify export on completion check box. Click Finish to begin the export process and close the wizard.

    Note

    Exporting a VM may take some time, depending on the size of the VM and the speed and bandwidth of the network connection.

The export progress is displayed in the status bar at the bottom of the XenCenter window and on the Logs tab. To cancel an export in progress, click the Logs tab, find the export in the list of events, and click the Cancel button.

To Export VM(s) as XVA Files using the xe CLI
  1. Shut down the VM that you want to export.

  2. Export the VM by running the following:

    xe vm-export -h hostname -u root -pw password vm=vm_name filename=pathname_of_file
    

    Note

    Be sure to include the .xva extension when specifying the export file name. If the exported VM does not have this extension, and you later attempt to import it using XenCenter, it might fail to recognize the file as a valid XVA file.