Moving a Virtual Machine (VM) Between Hyper-V Servers

You can move Virtual Machines (VMs) between Hyper-V servers by either exporting the virtual machine from a Hyper-V server and subsequently importing it on another Hyper-V server. Alternatively you can use the System Center Virtual Machine Manager. Note than you cannot move VMs by simply copying the VHD and XML files to a new Hyper-V Server and and attempting to use them there.

To use the first method above (ie exporting and importing the VM) follow the below steps :

On Hyper-V Source Server

  1. Open the Hyper-V Manager console then right-click the VM  to export, and select  Export.
  2. Specify the location  to store the Export files (this can be a network share if you wish).
  3. Once the Export process has completed, copy the export files to the target Hyper-V server.

On the Hyper-V  Target Server

  1. On the target Hyper-V server, open Hyper-V Manager console and then right-click the Hyper-V server node and click Import Virtual Machine.
  2. Browse to the root folder which contains the Export files and hit Select.

Thats it! You have now migrated a virtual machine from one Hyper-V server to another.

Note that which the Importing process has completed, all  snapshots and VHD files will be stored at the location where you place  the Export files which can be an issue if you wish to keep all snapshots and VHD files in a different location.

For more info on Virtual Machine import/export, please see http://blogs.technet.com/tonyso/archive/2009/08/04/hyper-v-r2-how-to-move-a-vm-storage-snapshots.aspx

Hyper-V Server Backup

Hyper-V complicates the backup process on a Windows Server 2008 R2 server. The major issue is whether to backup the host server which runs Hyper-V or backup the VMs (virtual machines) individually. Both options have their own advantages and disadvantages.

Hyper-V Host Server Backup

If you elect to backup the Hyper-V host server, it is normally possible  to include the VMs in the backups, which therefore protects the entire system with a single process. The Hyper-V VSS  (Volume Shadow Copy Service) Writer  makes it possible to backup VMs from the host system. If you wish to use Windows Server Backup for an entire Hyper-V server and its VMs, you will need to register the Hyper-V VSS Writer with the backup software by adding the below registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}

Subsequently, in the registry key, you need to  create a String Value with the below settings:

  • Name: Application Identifier
  • Type: REG_SZ
  • Value: Hyper-V

Continues…

Getting Started with Hyper-V Server

Microsoft Hyper-V (formerly codenamed Viridian) is hypervisor-based visualization for Windows Server based  x86-64 systems. The beta  of Hyper-V  shipped some x64 editions of Windows Server 2008 , and the finalized version  was released via Windows Update in June 2008 and has since been released as a free stand-alone  version (Hyper-V Server 2008 R2). Hyper-V currently exists in two  distinct versions:  a stand-alone product called   Hyper-V Server 2008 R2 and as an integral part of  Windows Server 2008 R2.

Getting Started

The first requirement is for a  machine which can support a 64-bit operating system. You will need a clean installation of Windows Server 2008 Enterprise Edition  (64-bit version) , as Hyper-V will not run within a virtual machine due to the need for hardware-assisted virtualization.

Prior to installing Hyper-V you should take some precautions, namely:

  • Back up all data on the system.
  • Take an inventory of all virtual machines you will be migrating to the Hyper-V machine, including all of the virtual hardware settings for the virtual machines.
  • Back up all virtual hard disks (VHDs) which will be migrated.
  • Enable the hardware-assisted virtualization. This is normally found in the computer’s BIOS, and it may be necessary to refer to the documentation or contact  for how to enable this.
  • Install Windows Server 2008 / or 2008 R2. In this case, we will be using the full installation option (but note  that Hyper-V can be also used on a Server Core installation).
  • Do not install other roles on  the target machine – Hyper-V should be the sole  role  on the machine that will host virtual machines.

Install  Hyper-V

Log in as an administrator and perform the following steps:

  1. Start the Server Manager (Start menu > Administrative Tools > Server Manager).

  2. Under Roles Summary, select Add Roles, then select Hyper-V.

  3. Complete the remainder of the setup wizard. You  are not required to allow virtual machines to access network resources, but one network card needs to be selected, so that this can be bound to a virtual switch. You will also be shown a warning if your computer has just a single network adapter; two are network adapters are recommended.

    Continues…