Presentation on theme: "Virtual Machine Import and Export"— Presentation transcript:
1Virtual Machine Import and Export XenClient Enterprise 4.5Virtual Machine Import and Export
2Table of Contents Virtual Machine Import and Export Page 1Import/Export ScenariosPage 3Synchronizer Import/Export FeaturesPage 4Engine Import/Export FeaturesPage 5USB Storage Devices and Engine Import/ExportPage 6Export from Synchronizer, Import to EnginePage 7Page 8Begin Synchronizer Virtual Machine Image ExportPage 9Synchronizer Virtual Machine Export Background TaskPage 10Synchronizer Virtual Machine Export ResultsPage 11Copying Virtual Machine Archive Files to USB StoragePage 12Importing VHD Files Into EnginePage 13Engine VHD File CachingPage 14Engine VHD Cache and Virtual Machine Image UpdatesPage 15When Can VHD Files be Imported Into Engine?Page 16Virtual Machine Image Migration Between SynchronizersPage 17Source and Target SynchronizersPage 18Virtual Machine Image Migration Process OverviewPage 19Clone the Virtual Machine ImagePage 20Clone OptionsPage 21Clone Background TaskPage 22Cloned Virtual Machine Image and VHD FilePage 23Locate and Copy the Cloned VHD FilePage 24Import the VHD File into the Software LibraryPage 25VHD File Import OptionsPage 26Creating a Virtual Machine ImagePage 27Completing the Virtual Machine Migration ProcessPage 28Post-Migration OperationsPage 29Export from Engine, Import to EnginePage 30Begin Local Virtual Machine ExportPage 31Importing a Local Virtual Machine Into EnginePage 32
3Import/Export Scenarios Status and DetailsSynchronizer to EngineSupportedCommon deployment technique to avoid network downloads.Only works for Virtual Machines (VMs) deployed to the computer from Synchronizer.Synchronizer to SynchronizerFor migration of a Virtual Machine (VM) image between primary Synchronizer servers.Uses a different export mechanism than Synchronizer to Engine.Engine to EngineOnly 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 SynchronizerNot SupportedEngine 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.
4Synchronizer Import/Export Features Import: Software Library SectionThe “Import” action imports a VHD file into Synchronizer, which can then be used to create new VM images.Export: Virtual Machines SectionThe “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.
5Engine 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.
6USB 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.
8Export 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.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.VMImageArchiveVMImageArchive
9Start Synchronizer Virtual Machine Image Export Complete the following steps to export a Virtual Machine image from the Synchronizer: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.
10Synchronizer 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.
11Synchronizer Virtual Machine Export Results The VM image is exported to the Synchronizer FileExports folder.Default location: C:\Program Files (x86)\Citrix\Synchronizer\FileExportThe 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.
12Copying 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 CopyingIf 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.Format the storage device, or create a new folder to receive the VM image export.After CopyingEject or unmount the USB storage device in Windows.Unplug the device from the computer, then plug it back in.Verify all files in the multipart archive file are present with the correct sizes.Compare file checksums between the FileExport folder and USB storage.A free checksum utility is available from Microsoft:
13Importing 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.
14Engine VHD File Caching The VM image archive exported from Synchronizer contains multiple VHD files.VMImageArchivesystem-1.vhdsystem-2.vhdsystem-3.vhdVHD Cachesystem-1.vhdsystem-2.vhdsystem-3.vhdVMImageArchiveWhen the VM image archive is imported into Engine via USB storage, the VHD files are copied into a VHD file cache.VHD Cachesystem-1.vhdsystem-2.vhdsystem-3.vhdUnused files are automatically deleted from the VHD cache after 2 days (only if the computer is registered to Synchronizer).
15Engine VHD Cache and Virtual Machine Image Updates Hello Engine:You need these files for a VM update:system-1.vhdsystem-2.vhdsystem-3.vhdBest Regards,Your Synchronizer.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.VHD Cachesystem-1.vhdsystem-2.vhdsystem-3.vhd?
16When 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.
17Virtual Machine Image Migration Between Synchronizers
18Source 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 SynchronizerTarget Synchronizer
19Virtual Machine Image Migration Process Overview On the Source Synchronizer ServerClone the VM image.Locate the singleton VHD file for the cloned image.File Copy Between Synchronizer ServersCopy the singleton VHD file to the target Synchronizer server FileImport folder.Verify file integrity after the copy is complete.On the Target Synchronizer ServerImport 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.CleanupThe cloned VM image on the original Synchronizer can be deleted.The VHD file imported into the target Synchronizer can also be deleted.
20Clone 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”.
21Clone OptionsSynchronizer 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.
22Clone Background TaskThe clone operation is performed in a background task.The task might take a long time to complete.But it should make steady progress.
23Cloned 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.
24Locate 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\FileImportAfter the copy is complete, compare file sizes and checksums to verify integrity.Source Server: Copy fromVmWorkingStorage folderTarget Server: Copy toFileImport folder
25Import 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.
26VHD File Import Options Provide a name and description for the VHD file being imported.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.
27Creating 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.
28Completing 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.
29Post-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.
31Begin 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.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.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.
32Importing a Local Virtual Machine Into Engine In the Engine Activity Center, click the “Export a Virtual Machine” task.Browse to the folder containing the exported local VM and select the file ending in “.zip.001”.The Engine starts importing the VM.When the import is complete, the VM will appear on the Engine launcher screen.