Home > Sample chapters > Servers > Windows Server

Moving from Virtual Server 2005 R2 to Hyper-V

Migrating Virtual Machines

The following sections will guide you through a process that will enable you to migrate virtual machines from Virtual Server 2005 R2 SP1 to Hyper-V. Not all of the steps provided in the process will be required for your Virtual Server installation, depending on what features you are using from Virtual Server. The process includes the following tasks:

  • Determine compatibility with Hyper-V.

  • Convert SCSI boot to IDE boot.

  • Remove Virtual Server Additions.

  • Remove network interface cards.

  • Commit or discard all Undo drives.

  • Merge or discard saved states.

  • Merge all differential disks.

  • Check the hardware abstraction layer (HAL).

  • Copy the virtual hard disk to the new Hyper-V server.

  • Create a new virtual machine using existing VHD.

  • Install Integration Services.

Determine Compatibility

Before you migrate a virtual machine, you should determine if it contains a supported operating system, and if the applications running in the virtual machine are supported by the independent software vendor (ISV) for production use on Hyper-V. Compare the operating system with the Hyper-V–supported guest operating systems and be sure to match product versions and service pack levels.

Convert SCSI Boot to IDE Boot

We have already discussed that Hyper-V does not support booting from the synthetic SCSI controller. So before you can migrate a Virtual Server 2005 R2 virtual machine that currently boots from a SCSI adapter to Hyper-V, you must convert it to boot from the IDE controller. Follow these steps to migrate the boot disk from a SCSI controller to an IDE controller:

  1. Launch the Virtual Server Administrative Web console.

  2. Select Configure from the Virtual Machines menu and then select the virtual machine name from the list.

  3. From the Configuration menu options, select Hard Disks to display the Virtual Hard Disk Properties page, which shows the current configuration of all the hard disks for the virtual machine (see Figure 8-1).

    Figure 8-1

    Figure 8-1 Virtual Hard Disk Properties page

  4. To convert the virtual hard disk so that it boots from the primary IDE controller (ID 0) instead of the SCSI controller (ID 0), select Primary Channel (0) from the Attachment drop-down list, as shown in Figure 8-2.

    Figure 8-2

    Figure 8-2 Virtual hard disk with Primary IDE channel (0) selected

  5. To save the change, click OK.

Remove Virtual Machine Additions

Virtual Server 2005 R2 SP1 Virtual Machine Additions are not compatible with the Hyper-V architecture and will not work properly with it. Although it is possible to remove Virtual Machine Additions version 13.813 or newer from within a migrated virtual machine, a less risky approach is to remove the additions prior to migrating the virtual machine.

Follow these steps to remove Virtual Machine Additions:

  1. Power on the virtual machine and log in with administrative privileges.

  2. In the virtual machine, open Control Panel and then double-click Add Or Remove Programs or Programs And Features (depending on the operating system version).

  3. Select Virtual Machine Additions and then select Remove, or right-click and select Uninstall (depending on the operating system version).

  4. Click Yes in the confirmation dialog box that appears.

  5. After you have successfully removed Virtual Machine Additions, restart the virtual machine.

Remove Emulated Network Interface Cards

Virtual Server 2005 R2 SP1 virtual machines have a single network interface card installed inside the virtual machine by default. The network interface card emulates an Intel 21140 adapter. In Hyper-V, the default networking interface card is not the legacy network adapter (which also emulates an Intel 21140 adapter), but instead is the synthetic network adapter. If you attempt to move a virtual machine with the emulated Intel 21140 adapter still installed, the network adapter will become a hidden device. You can install Hyper-V Integration Services and all will seem to be fine, but if the emulated Intel 21140 adapter had a static IP address assigned, any attempt you make to reassign that static IP address to the new synthetic network adapter will result in a warning box that says the IP address is already in use.

Follow these steps to remove the network adapter from the virtual machine:

  1. Power on the virtual machine.

  2. Log in with administrative permissions.

  3. Open Control Panel and double-click Device Manager.

  4. Expand the Network Adapters node.

  5. Right-click the Intel 21140 adapter listed and select Uninstall.

  6. Shut down the virtual machine.

When you migrate the virtual machine to Hyper-V, a synthetic adapter will be installed. The network adapter might not function until you install the Integration Services, however.

Commit or Discard Undo Disks

Virtual Server 2005 R2 provided a disk mode that would write all changes to a separate file. This mode, called Undo, allowed you to perform what-if changes to the disk without fear that the changes had to be permanent. Undo disks were not very flexible if you needed to perform multiple what-if scenarios, however, so in Hyper-V the technology was replaced with snapshots. This means that any Undo disks in Virtual Server virtual machines must be discarded or committed to the virtual hard disk prior to migrating it to Hyper-V.

If a virtual machine is configured to use Undo disks but does not currently have an active Undo disk, then you do not need to perform any additional steps. If you do need to commit or discard an Undo disk, the procedures are slightly different depending on whether the virtual machine is currently powered on or not.

Follow these instructions for committing or discarding the Undo disks for a virtual machine that is currently powered on:

  1. Shut down the virtual machine.

  2. Select Turn Off Virtual Machine And Commit Undo Disks to commit the Undo disk if you want to merge the current changes into the virtual hard disk, or select Turn Off Virtual Machine And Discard Undo Disks to discard the changes to the Undo disk if you do not want to merge the changes.

Follow these instructions for committing or discarding the Undo disks for a virtual machine that is currently powered off:

  1. Launch the Virtual Server 2005 Administration Web site.

  2. On the Master Status page, find the appropriate virtual machine in the list of virtual machines and click the arrow to display the actions menu.

  3. Figure 8-3 displays the menu options available. Select Merge Undo Disks or Discard Undo Disks from the menu.

    Figure 8-3

    Figure 8-3 Undo Disk actions menu for a virtual machine

Restore or Discard Saved States

Virtual Server 2005 R2 saved states are not compatible with Hyper-V saved states, so the virtual machine must be powered on and shut down properly, or the saved state must be discarded. If the virtual machine is currently powered on, perform a shutdown from within the virtual machine and do not select to save the state.

Follow these instructions for discarding the saved state for a virtual machine that is currently powered off:

  1. Launch the Virtual Server 2005 Administration Web site.

  2. On the Master Status page, find the appropriate virtual machine in the list of virtual machines and click the arrow to the display the actions menu.

  3. Figure 8-4 displays the menu options available. Select Restore From Saved State or Discard Saved State from the menu.

    Figure 8-4

    Figure 8-4 Saved State actions menu for a virtual machine

  4. If you select to restore the saved state, after the virtual machine is restored, perform a shutdown.

  5. If you select to discard the saved state, then no further actions are required.

Merge Differential Disks

Differential disks allow you to save space by creating a dependent chain of virtual hard disks. This eliminates the need to duplicate copies of data. If you are migrating all virtual machines that contain differencing disks from a Virtual Server 2005 R2 host to the same Hyper-V server, then you do not have to merge the differencing disks. You will need to maintain the same relative path on both hosts, however, or you will need to repair the parent-child links.

If you are planning to migrate virtual machines that depend on the same differencing disk to different Hyper-V servers, then you must merge the differencing disks to break the dependency.

Follow these instructions for merging a virtual machine differencing disk:

  1. Shut down the virtual machine with the differencing disk.

  2. Launch the Virtual Server 2005 Administration Web site.

  3. On the Master Status page, select Inspect Disk from the Virtual Disks menu.

  4. Specify the virtual hard disk that has a parent that needs to be merged (as shown in Figure 8-5) and click Inspect.

    Figure 8-5

    Figure 8-5 Inspect Virtual Hard Disk page

  5. The Properties and Actions will be displayed as shown in Figure 8-6. Select Merge Virtual Hard Disk from the Actions menu to merge the parent and child virtual hard disks.

    Figure 8-6

    Figure 8-6 Differencing disk Properties And Actions page

  6. The Merge Virtual Hard Disk page is displayed (as shown in Figure 8-7). Select Merge To New Virtual Hard Disk and specify the full path to the new virtual hard disk that will be created as a result of the merge operation. Optionally, you can specify the type of virtual hard disk to be created—dynamic or fixed.

    Figure 8-7

    Figure 8-7 Merge Virtual Hard Disk options page

  7. When you have selected all the appropriate options, click Merge.

The resulting merged virtual hard disk is the file that you will migrate to the Hyper-V server.

Check the Hardware Abstraction Layer

Hyper-V uses a multiprocessor APCI hardware abstraction layer (HAL). Although you would probably be prompted for the upgrade of HAL when you install Integration Services, it is best to prepare the machine for HAL detection prior to the migration so that it properly detects and updates the HAL.

Follow these steps to change the HAL prior to migrating the virtual machine:

  1. Power on the virtual machine.

  2. Log in with administrative permissions.

  3. Run the System Configuration utility (MSConfig.exe) by clicking Start, clicking Run, typing msconfig, and then clicking OK.

  4. Click the Boot tab and then select Advanced Options.

  5. Select the Detect HAL check box, click OK, and then shut down the virtual machine.

Complete the Migration

After you have performed all the required pre-migration steps, the last tasks involve copying the virtual hard disk from the Virtual Server 2005 R2 server to the new Hyper-V server and creating a new virtual machine using that virtual hard disk.

Follow these steps to create a new virtual machine:

  1. On the Hyper-V server, create a folder to hold the new virtual machine on a drive other than the system drive. Use the name of the virtual machine as the folder name (for example, D:\VMs\NEWVM).

  2. Copy the virtual hard disk from the Virtual Server 2005 R2 host to the new directory.

  3. Open the Hyper-V Manager MMC console.

  4. Select New from the Actions menu and then select Virtual Machine. The New Virtual Machine Wizard will start. Click Next.

  5. Specify the name of the virtual machine (use the same name as the directory you created) in the Name text box.

  6. Select the check box that says Store The Virtual Machine In A Different Location and enter the path to the directory above the virtual machine folder you created (that is, enter D:\VMs for the example shown previously) in the Location text box, as shown in Figure 8-8. Click Next.

    Figure 8-8

    Figure 8-8 Specify name and location to store the new virtual machine

    This will allow the wizard to use the directory you created for all the virtual machine files.

  7. On the Assign Memory page, specify the amount of RAM the virtual machine requires and click Next.

  8. On the Configure Networking page, select a virtual network to attach to the virtual machine and click Next.

  9. On the Connect Virtual Hard Disk page (shown in Figure 8-9), select the Use An Existing Virtual Hard Disk option, and specify the path to the virtual hard disk (such as D:\VMs\NEWVM.VHD), and then click Next.

    Figure 8-9

    Figure 8-9 Connect Virtual Hard Disk page

  10. On the Completing The New Virtual Machine Wizard page, click Start The Virtual Machine After It Is Created and then click Finish.

    The virtual machine will power on.

  11. At the login screen that will display after the virtual machine is booted, log in with administrative permissions.

  12. On the VMConnect Actions menu, click Insert Integration Services Setup Disk. This should start the installation of Integration Services for the virtual machine. Complete the installation and reboot the virtual machine.

    The virtual machine is now migrated to Hyper-V.