Tuesday, October 5, 2010

Migrating a XenDesktop environment from VMware to Hyper-V

I have had a recent need to migrate a working XenDesktop environment from VMware over to Hyper-V. One thing that is important to this process is SCVMM.

Following are some guidelines that can be used by most anyone who is in this situation.

The (fully) Virtual Environment:

  • XenDesktop 4 Desktop Delivery Controller (Windows 2003 R2, x64, 2vCPU, 4GB RAM, 1 NIC)
  • Licensing Server (Windows 2008, x86, 1 vCPU, 2GB RAM, 1 NIC)
  • Web Interface server (Windows 2008 R2, 2 vCPU, 4GB RAM, 1 NIC)
  • Provisioning Server (Windows 2008, x64, 4 vCPU, 16GB RAM, 1 NIC)
  • Master VM (the VM where the desktop image is installed, Windows 1, 1 vCPU, 1GB RAM, 1 NIC)
  • PvS Template (the VM template that is cloned to create new Desktop virtual machines)
  • Desktop VM (the actual virtual machines that the Provisioning Server image is streamed to and runs the users applications)

Manage vCenter from SCVMM:

  1. Use the “Add VMware VirtualCenter server” option in SCVMM to place the vCenter environment under the management of SCVMM
    1. Don’t fear, this does not take full control of the environment, by default it will just enumerate everything.
  2. Update the Security Settings of each ESX host.
    1. Right click each ESX host and add the security settings for the “root” account.
    2. If these are new installation of ESXi the root password is blank by default, SCVMM does not accept blank, so a password must be set.
  3. Wait a bit for “bake time” to happen
    1. This is a bit of time for all of the elements in the environment to be enumerated and fully recorded properly.

Store each VM in the SCVMM Library:

  1. Store a VM in the Library
    1. Power Off a VM
    2. Right Click and Select “Store in Library”
      1. This will delete your VMs from the VMware ESX servers.
  2. Set the MAC address of the VM
    1. From the Library View select “VMs and Templates”
    2. Right click the VM and select Properties
    3. Select the Hardware Configuration tab and select the Network Adapter
    4. Change the MAC address assignment to static (note that the Current address is set) and select OK
    5. If the VMs are diskless and boot from a Provisioning Server be sure that the network adapter type is “Emulated”.

Deploy each VM to a Hyper-V hypervisor:

  1. Convert each VM to deploy it on Hyper-V
    1. From the Library View select “VMs and Templates”
    2. Right Click the VM and select Convert Virtual Machine
    3. Complete the wizard with one of your Hyper-V servers or clusters.
  2. Repeat as necessary.
    1. The conversions will have a job status of “Completed w/ Info” because these VMs do not contain boot volumes, so the conversion process does not find one.

Application Configuration Update:

  1. Double check DNS and IP address settings
    1. The conversion process will install the Integration Components into the VM and thus the OS in the VM will detect a new NIC. If the IP addresses are manually set, then they will need to be set again. If the IP addresses are assigned by DHCP the same IP address should be granted because you carried the MAC address forward (step 5).
    2. The XenDesktop installation uses Fully Qualified Domain Names and therefore relies on DNS, so make sure that all of the machine names are resolving properly.
  2. Double check all Provisioning Server Settings
    1. If the IP address of the Provisioning Server VM has changed be sure to make that configuration change in the Server configuration of your Site.
    2. Don’t forget that your VM images will need an “Emulated” network adapter for the network adapter that Provisioning Server will use to stream to the VM.

Update the Desktops and Desktop Groups

  1. Update the vDisk Image from the Master VM
    1. Be sure to set the vDisk to read / write mode in its settings in Provisioning Server.
    2. A gotcha to be aware of: the PVS driver binds to the NIC driver of the machine when it is installed. Converting the VM to Hyper-V installed the Integration Components and removed the VMware tools; causing the NIC and / or driver in the VM to be changed and therefore breaks the PVS Image driver. To resolve this uninstall and re-install the PVS “Target Device” software on the Master VM.
    3. Run XenConvert to update the vDisk with the latest working Master VM image.
    4. Set the vDisk back to Standard Image mode.
  2. Create new Desktop Groups
    1. New Desktop Groups need to be created using the XenDesktop management console.
    2. Or the old Desktop Groups need to be deleted and created again using the new Hosting Infrastructure.
  3. Verify your Desktop Group is working
    1. Now that all settings are in place; wait for the DDC to refresh the desktop groups and to spin up virtual machines for the idle desktop pool.
    2. Check the console of a few VMs to see that the PVS image is streaming properly and connect to a desktop.

The summary

With one practice run I would feel confident in understanding the process to do this with a production environment – I would probably handle it in stages – but I would know enough to be able to properly plan.

The key to this process is that the VMs undergo a two-step process. First storing to the SCVMM Library and then converting to a Hyper-V hypervisor. The bonus is that the MAC address can be carried forward from the VMware environment. This makes no changes in the setup of Provisioning Server groups.

In Summary:

  1. Manage vCenter from SCVMM.
  2. Store the VM(s) in the Library
  3. Set the MAC address of the VMs to static (to not change settings in Provisioning Server)
  4. Convert the VM(s) to a Hyper-V hypervisor
  5. Update the vDisk Image
    1. Uninstall and re-install the PVS client due to the virtual NIC driver changing.
  6. Re-create / create new desktop pools