These instructions seem to work well for migrating guest machines from Virtual PC or Virtual Server 2005 to Hyper-V. As noted some steps may not be necessary, but this is comprehensive should you run into issues – e.g. migrating from Virtual PC to Hyper-V is not supported and machines that originated from Windows XP or Virtual PC might not work without the undocumented/unsupported steps to replace the HAL with an ACPI HAL.
1. BEFORE migrating to HYPER-V (optional but helpful)
a. Log into the machine as an Administrator (e.g. a domain admin) so that the password is cached to log in later when there is no network access available to validate against the domain. If you are using the local admin account you can skip this. If you did skip this step and you get a message when you log into the guest machine about not being able to contact the domain admin, then you will need a local (non-domain) admin account password to migrate the machine.
b. Make a note of network settings, such as TCP/IP settings for the existing network adapter(s) in the VM guest – these adapters will be deleted (or at least hidden) during the migration.
c. Uninstall VM Additions from the VM and shut it down properly.
2. Install HYPER-V
3. Copy guest VHD to the HYPER-V server – or backup the VHD to another location in case you need to get back to the original VHD if something goes wrong.
4. Then run HYPER-V Manager (hit Start and being typing HYPER):
a. If you don’t have Hyper-V Manager, then download it or get the Remote Server Admin Tools for Windows 7: http://go.microsoft.com/fwlink/?LinkId=131280
5. Connect to SFWVIRUTAL01 (Click HYPER-V Manager in the MMC and then Action or Right-Click … Connect to Server and enter the name of the server with Hyper-V.
6. Actions à New à Virtual Machine
7. Give it the same name as the old machine and then Next:
8. Set the network connect in the next window:
9. Then find the EXISTING VHD – do NOT create a new one:
10. Click Finish – HYPER-V will do some configuring and give you status…
11. Now select the new machine, click START then after it is running click CONNECT:
12. I had one unfortunate experience where I could not use the mouse in the new machine until I uninstalled the old Virtual Machine Additions. In this particular case, mastery of the keyboard commands in the Virtual Machine Connection window is essential. The following list of keyboard shortcuts will come in handy: http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/01/14/virtual-machine-connection-key-combinations-with-hyper-v.aspx
13. Next steps are to log in several times to uninstall VM Additions (from Virtual Server 2005 or before) and then install the new HAL and then install Integration services / VM additions (Action -> Insert Integration Services Setup Disk; you may need to then manually run the CD from the guest machine after that) from HYPER-V which installs new hardware… several reboots…
a. Log in
b. Under some circumstances, you may get a message that Windows needs to be reactivated do to hardware changes. Do NOT do this YET – wait until after the process is complete (after the new HYPER-V integration has been installed):
c. Uninstall previous Virtual Machine Additions, if applicable (Control Panel, Add/Remove Programs, etc.):
d. Once the machine reboots, log in again and “insert the integration “
e. If you get this dreaded message, “Setup cannot upgrade the HAL in this virtual machine. Hyper-V integration services can be installed only on virtual machines with an ACPI-compatible HAL.”, then you need to perform extra unsupported steps.
f. Open Device Manager (e.g. Start, right-click Computer, Manager) and open Computer, then right-click Standard PC. If Uninstall shows up in the drop down menu, click it and then reboot and try installing integration services again. You may not have an Uninstall option, in which case you need to continue with an unsupported workaround:
g. Shutdown and then Turn off the new virtual machine.
h. MAKE SURE YOU HAVE A BACKUP OF THE VHD BEFORE CONTINUING!
i. Get access to a Windows XP installation CD e.g. with i386. E.g. mount the ISO with something like VirtualCloneDrive.
j. In the host server, mount the VHD as a drive. (To mount a VHD, right click Disk Management and Attach the VHD, do NOT select Read-Only): http://thelazyadmin.com/blogs/thelazyadmin/archive/2009/01/15/mount-a-vhd-within-windows-7-server-2008-r2.aspx)
k. Basically, you are going to replace the HAL.DLL on the Guest A’s VHD with the ACPI version of the HAL.DLL on the Windows XP image:
i. Open a Command Prompt as Administrator.
ii. The following assumes the VHD is mounted as I: and a Windows XP CD is mounted as G:
C:\>I:
I:\>cd windows\system32
I:\WINDOWS\system32>rename HAL.DLL HAL.DLL.BACKUP
I:\WINDOWS\system32>expand G:\i386\HALACPI.DL_ .\HAL.DLL
Microsoft (R) File Expansion Utility Version 5.1.2600.0
Copyright (C) Microsoft Corp 1990-1999. All rights reserved.
Expanding g:\i386\halacpi.dl_ to .\hal.dll.
g:\i386\halacpi.dl_: 40176 bytes expanded to 81280 bytes, 102% increase.
I:\WINDOWS\system32>
l. Now Detach the VHD (right-click on the DISK (not the drive letter) in Disk Management and select Detach VHD, do NOT select the option to delete the VHD afterwards).
m. Unmount the Windows XP image (optional).
n. Start the virtual machine again
o. Log in, and skip through any screens asking to activate windows; click yes to attempt to install any new hardware but ignore any messages about not being able to install it. If asked to reboot, say NO:
p. Open Device Manager again and Uninstall the Standard PC.
If prompted, confirm that you want to remove device Standard PC. Reboot if prompted.
14. Let the integration services / VM Additions for HYPER-V install, reboot, log in again, and reboot again as necessary.
a. You should receive a message that the HAL needs to be upgraded:
b. Click OK to continue. HYPER-V Installation will upgrade the HAL an d then prompt you that a Restart is required. Click to restart.
c. Log back in; and if prompted, do not activate windows yet.
d. HYPER-V Integration Services installation will automatically continue (if not, insert the setup disk again) and begin installing the Windows Driver Framework, Guest Components, etc. You will need to Restart again to complete the installation.
e. Log in again. If Windows wants to re-activate, this is the time to do it.
15. The original network adapter(s) have probably been deleted (or at least hidden because the device(s) are not there). You may need to manually configure the new network adapter(s) for any static IP settings etc. Note also that the MAC address is probably different than before in case you are using DHCP reservations. You may want to reset or check firewall settings as well.
No comments:
Post a Comment