32
XenClient Enterprise 4.5 Virtual Machine Import and Export

XenClient Enterprise 4.5 Virtual Machine Import and Export

Embed Size (px)

Citation preview

XenClient Enterprise 4.5Virtual Machine Import and Export

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 2

Table of Contents

Virtual Machine Import and Export Page 1

Import/Export Scenarios Page 3

Synchronizer Import/Export Features Page 4

Engine Import/Export Features Page 5

USB Storage Devices and Engine Import/Export Page 6

Export from Synchronizer, Import to Engine Page 7

Export from Synchronizer, Import to Engine Page 8

Begin Synchronizer Virtual Machine Image Export

Page 9

Synchronizer Virtual Machine Export Background Task

Page 10

Synchronizer Virtual Machine Export Results Page 11

Copying Virtual Machine Archive Files to USB Storage

Page 12

Importing VHD Files Into Engine Page 13

Engine VHD File Caching Page 14

Engine VHD Cache and Virtual Machine Image Updates

Page 15

When Can VHD Files be Imported Into Engine? Page 16

Virtual Machine Image Migration Between Synchronizers

Page 17

Source and Target Synchronizers Page 18

Virtual Machine Image Migration Process Overview

Page 19

Clone the Virtual Machine Image Page 20

Clone Options Page 21

Clone Background Task Page 22

Cloned Virtual Machine Image and VHD File Page 23

Locate and Copy the Cloned VHD File Page 24

Import the VHD File into the Software Library Page 25

VHD File Import Options Page 26

Creating a Virtual Machine Image Page 27

Completing the Virtual Machine Migration Process

Page 28

Post-Migration Operations Page 29

Export from Engine, Import to Engine Page 30

Begin Local Virtual Machine Export Page 31

Importing a Local Virtual Machine Into Engine Page 32

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 3

Import/Export Scenarios

Scenario Status and Details

Synchronizer to Engine Supported•Common deployment technique to avoid network downloads.•Only works for Virtual Machines (VMs) deployed to the computer from Synchronizer.

Synchronizer to Synchronizer Supported•For migration of a Virtual Machine (VM) image between primary Synchronizer servers.•Uses a different export mechanism than Synchronizer to Engine.

Engine to Engine Supported•Only works for local VMs (not VMs deployed from Synchronizer).•Used to migrate or copy a local VM between computers.•Can also be used as a backup/restore feature for local VMs.

Engine to Synchronizer Not Supported•Engine is not designed to be used as an authoring platform.•P2V and V2V conversions to Synchronizer can be problematic.•Synchronizer VM images should begin with a fresh install of Windows.•This gives better results, and is usually less work in the long run.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 4

Synchronizer Import/Export Features

Import: Software Library Section

The “Import” action imports a VHD file into Synchronizer, which can then be used to create new VM images.

Export: Virtual Machines Section

The “Clone” action prepares a VM image for copying to a different Synchronizer server.

The “Export” action exports a VM image so it can be copied to USB storage and imported into Engine.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 5

Engine Import/Export Features

Features for importing and exporting VMs or VHD files are available in the Engine Activity Center.

•Import a Virtual Hard Disk: Imports a VHD file, or a set of VHD files, into the Engine VHD file cache.

•Import a Virtual Machine: Imports a local VM into Engine, that was previously exported from Engine.

•Export a Virtual Machine: Exports a local VM to USB storage.

Select the Tools by Category view.

Launch the control panel.

Launch the Activity Center applet.

Import/export features are available under Related Tasks.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 6

USB Storage Devices and Engine Import/Export

The Engine Device Manager is used for assigning USB devices to specific VMs, or to the Engine.

Before importing a VM into Engine, or exporting a VM from Engine, the USB storage device should be assigned to the Engine.

After the import or export is complete, the device should be unassigned from Engine before disconnecting it from the computer.

Export from Synchronizer,Import to Engine

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 8

Export from Synchronizer, Import to Engine

• VM Images can be exported from Synchronizer then imported into Engine.• Alternative to downloading the VM image over the network.• Only works for VM images assigned to the user or computer in Synchronizer.

Synchronizer exports a VM image to the FileExports folder.

VMImage

Archive

The VM image archive is copied to USB storage.

The USB storage device is attached to the computer running Engine, and the VM image is imported.

VMImage

Archive

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 9

Start Synchronizer Virtual Machine Image Export

Select the VM image in the Virtual Machines section.

Click the “Export” action button. This dialog should appear. Click “Yes” to begin the export process.

Complete the following steps to export a Virtual Machine image from the Synchronizer:

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 10

Synchronizer Virtual Machine Export Background Task

The export is performed in a background task. The task might take a long time to complete, possibly up to an hour or even longer.

If the export task appears to be stuck, select the task details. If the task is in Running” state, it should still be making progress.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 11

Synchronizer Virtual Machine Export Results

• The VM image is exported to the Synchronizer FileExports folder.

• Default location: C:\Program Files (x86)\Citrix\Synchronizer\FileExport

• The archive will usually contain multiple files as shown below.

• All files in the multipart archive are required to import the image into Engine.

These files were created when the “win7-32” VM image was exported.

These files are left over from a previous export of a different VM image.

The VM image archive is broken up into 2-GB segments.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 12

Copying Virtual Machine Archive Files to USB Storage

The multipart VM archive file can be copied from the FileExport folder to USB storage with Windows Explorer.

Before Copying

1.If antivirus software is installed on the Synchronizer host server, disable it, or configure it to not scan files as they are copied to USB storage.

2.Format the storage device, or create a new folder to receive the VM image export.

After Copying

1.Eject or unmount the USB storage device in Windows.

2.Unplug the device from the computer, then plug it back in.

3.Verify all files in the multipart archive file are present with the correct sizes.

4.Compare file checksums between the FileExport folder and USB storage.

5.A free checksum utility is available from Microsoft: http://support.microsoft.com/kb/841290

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 13

Importing VHD Files Into Engine

The “Import a Virtual Hard Disk” action in Activity Center is used to import VHD files that were exported from Synchronizer.

Browse to the location of the multi-part VHD file archive on USB storage. Select the file ending in “.zip.001”.

The Engine will begin importing VHD files into the VHD cache.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 14

Engine VHD File Caching

The VM image archive exported from Synchronizer contains multiple VHD files.

When the VM image archive is imported into Engine via USB storage, the VHD files are copied into a VHD file cache.

VHD Cachesystem-1.vhd

system-2.vhd

system-3.vhd

VMImage

Archive

Unused files are automatically deleted from the VHD cache after 2 days (only if the computer is registered to Synchronizer).

VHD Cachesystem-1.vhd

system-2.vhd

system-3.vhd

VMImage

Archive

system-1.vhd

system-2.vhd

system-3.vhd

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 15

Engine VHD Cache and Virtual Machine Image Updates

• Engine checks for updates with Synchronizer.

• The update check response identifies VHD files that are required for a VM update.

• If the VHD files exist in the cache, they are used for the VM update.

• Otherwise, they must be downloaded from the Synchronizer.

• During the download process, Engine will periodically check the VHD cache.

• If the VHD files appear in the cache, Engine will stop downloading them from Synchronizer and use the cached copies instead.

Hello Engine:You need these files for a VM update:•system-1.vhd•system-2.vhd•system-3.vhdBest Regards,Your Synchronizer.

VHD Cachesystem-1.vhd

system-2.vhd

system-3.vhd

?

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 16

When Can VHD Files be Imported Into Engine?

VHD files can be imported into Engine:

•Before the Engine is registered to Synchronizer.

• Commonly done to preload VHD files into Engine before deploying the computer or assigning it to a user.

• After registration, if the required VHD files are cached, VM image installation is fast.

• Cache cleanup is not performed before Engine registration. Files will remain cached indefinitely until the computer is registered.

•After registration, but before Virtual Machine image assignment.

• Cached VHD files will be available when a VM image is assigned.

• But the Engine will delete unused files from the cache after 2 days.

•After Virtual Machine image assignment.

• Even when the Engine is in the process of downloading VHD files from Synchronizer.

• If the files appear in the cache, Engine will stop downloading them and use the cached copies instead.

Virtual Machine Image Migration Between Synchronizers

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 18

Source and Target Synchronizers

• The idea is to copy or move an entire VM image from one Synchronizer server to another primary Synchronizer server.

• Only the VM image itself gets copied, not policies, user assignments, or other configuration data.

Source Synchronizer Target Synchronizer

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 19

Virtual Machine Image Migration Process Overview

On the Source Synchronizer Server

•Clone the VM image.

•Locate the singleton VHD file for the cloned image.

File Copy Between Synchronizer Servers

•Copy the singleton VHD file to the target Synchronizer server FileImport folder.

•Verify file integrity after the copy is complete.

On the Target Synchronizer Server

•Import the VHD file into the software library.

•Create a new VM Image from the imported VHD file.

•Start the VM Image, login to the Hyper-V VM, verify it is correct.

Cleanup

•The cloned VM image on the original Synchronizer can be deleted.

•The VHD file imported into the target Synchronizer can also be deleted.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 20

Clone the Virtual Machine Image

Cloning the VM image collapses all versions of a VM image into a single VHD file.

To clone the latest version of a VM image, select the VM image then click “Clone”.

Any specific version of the VM image might also be cloned. Select the desired version then click “Clone”.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 21

Clone Options

Synchronizer allows you to specify some options when cloning the VM image.

The system disk size might be expanded during the clone if desired. Shrinking the system disk is not supported.

Do not change the User and Local disk sizes. These disk sizes will be specified when the VM image is recreated on the target Synchronizer server.

This will be the name of the new VM image in Synchronizer console after the clone. Enter a value here.

Synchronizer will set the Windows computer name within the cloned VM. The default value should be OK.

For migration purposes, leave this box cleared, even if it is a custom VM image.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 22

Clone Background Task

• The clone operation is performed in a background task.

• The task might take a long time to complete.

• But it should make steady progress.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 23

Cloned Virtual Machine Image and VHD File

• When the clone is complete, the cloned VM image should appear in the console.

• The system disk VHD file location is displayed in the Summary tab.

• Might require to scroll down in the console UI to see the path.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 24

Locate and Copy the Cloned VHD File

• Open Windows Explorer on the source Synchronizer host server.

• Navigate to the folder containing the system disk for the cloned VM image.

• The folder should only contain a single file “system-1.vhd”.

• Copy the VHD file to the target Synchronizer server FileImport folder.

• Default location: C:\Citrix\Synchronizer\FileImport

• After the copy is complete, compare file sizes and checksums to verify integrity.

Source Server: Copy fromVmWorkingStorage folder

Target Server: Copy toFileImport folder

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 25

Import the VHD File into the Software Library

• Open the “Software Library” section of Synchronizer console.

• Select the “Virtual Machine Images” folder.

• Click “Import”.

• Then select the “Virtual Machine Image” import option.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 26

VHD File Import Options

When the drop-down icon is clicked, the VHD file in the FileImport folder should be displayed automatically.

If selected, Synchronizer will copy the VHD file from the FileImport folder to internal storage. This takes longer and the VHD file will be retained in the FileImport folder.

If cleared, Synchronizer will move the VHD file from the FileImport folder to internal storage. This is much faster and the VHD file will not be retained in the FileImport folder.

Provide a name and description for the VHD file being imported.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 27

Creating a Virtual Machine Image

• Open the “Virtual Machines” section of the console.

• Select the “All Virtual Machines” element.

• Click “Create”.

• In the “Create a Virtual Machine” dialog, specify the imported VHD file.

• The rest of the process is the same as creating VM images from an operating system ISO image.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 28

Completing the Virtual Machine Migration Process

• After the VM Image is created from the imported VHD file, it should appear in the target Synchronizer console.

• This VM image can be managed like any other VM image in the Synchronizer.

• It is completely independent from the source Synchronizer server.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 29

Post-Migration Operations

• Consistency check on the target Synchronizer:

• Start the newly created VM image in Synchronizer console.

• Login to the Hyper-V VM.

• Ensure it is the correct image, with all expected applications and configuration.

• Verify domain membership and Windows computer name.

• Shutdown the Hyper-V VM.

• Create a checkpoint version of the VM image:

• Creates a baseline for further changes to the image.

• Allows roll-back of the image.

• Cleanup operations to free up disk space:

• On the source Synchronizer, delete the cloned VM image.

• On the target Synchronizer, delete the imported VHD file from the software library.

Export from Engine,Import to Engine

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 31

Begin Local Virtual Machine Export

• The local VM should be shutdown before exporting it.

• Click the “Export a Virtual Machine” task in the Engine activity center to begin the export process.

• The Engine will start exporting the local VM.

• When complete, the USB storage device should be unassigned from Engine before disconnecting it from the computer.

• Select the VM to export. Only local VMs will appear in the list.

• Click “Browse” to select the folder to receive the export.

• The file name is set automatically based on the name of the local VM being exported.

XenClient Enterprise 4.5VM Import and Export

Copyright © 2013 CitrixPage 32

Importing a Local Virtual Machine Into Engine

Browse to the folder containing the exported local VM and select the file ending in “.zip.001”.

In the Engine Activity Center, click the “Export a Virtual Machine” task.

The Engine starts importing the VM.

When the import is complete, the VM will appear on the Engine launcher screen.