Physical to Hyper-V without HAL issues

 

Recently I needed to take a physical windows machine and migrate it intact to Hyper-V. I did not want to install System Center Virtual Machine Manager. I read some horror stories on the internet about P2V (Physical to Virtual) working on VMM, but VMM needing to be kept running on the domain or the guest VM would die! Plus I did not want a domain. The physical box I am trying to make virtual is already a domain controller!

The physical Pentium 4 box was getting old and about to fail (I'm sure it would have failed at 2 AM one Monday morning). It was a Small Business Server 2003 with 15 users. In other words, something I would *very much* like to simply migrate to Hyper-V rather than rebuild; which would probably take a week! I mean, really, imagine restoring everyone's email - setting up all the users & permissions. I would probably have scripted my own JustLDAP for that. That sort rebuild under pressure (client is off the air until I fix his "small business"), I do not need!

The point however is that this is too hard. Way too hard. I need to just Hyper-V the server. So, what to do???

I have Symantec Ghost 2003 and wanted to simply ghost the physical machine C drive to Hyper-V. However I had no luck booting ghost.exe on Hyper-V, that was a pain.

I searched the internet of course for several P2V solutions and they all seemed a bit clunky, or needed to be purchased.

I wanted to do this myself. I wanted a reproducible system without using Virtual PC and doing recovery console loads / renames of halacpi.dll to hal.dll as mentioned in P2V blogs. In any case, I tried these methods and nothing worked!!

Ghosting the physical image to VS2005 partially worked, but I could not get it to boot. Not even safe mode. I think I tried every trick in the (excellent) Virtual PC Guy's blog for this and came up empty handed.

After much messing around I finally hit on a sure fire method of doing my P2V.

I would like to share this with the world.
 I hope you can benefit from this method of P2V.

  1. Using Virtual Server 2005 R2 SP1, create an XP machine with 3 x 32 GB dynamically expanding drives. I'm sure this would work with Win 2000, 2003 server etc. However, I had an XP VM handy.

  2. Create the D and E drives and format them primary NTFS quick Format. You may need more than 32 GB. That's ok. Though I recommend copying off reproducible data to make the ghost files smaller. For example, WSUS 'content' files should be copied off and the WSUS database exported using the wsusutil command line tool. (Then import WSUS later on the new VM. Google for export/import info.)

  3. Go to your physical machine and boot ghost 2003. Do a "Disk to Image" for the C (and D volume if necessary). Etc. I had to do that (C & D) because OEM Small Business Server 2003 had spread Exchange server 2003 over C & D drives for performance reasons.

  4. Fire up the XP machine (any ntos VM would do, like Server 2003 trial etc.) in Virtual Server 2005 and copy (via a mapped drive) the ghost image(s) created in step 3 to the "E:" volume as regular ghs/gho files.

  5. Now boot the XP/NTOS machine under Virtual Server 2005 to a ghost floppy or CD. Or vfd (virtual floppy disk) with ghost.exe on it.

  6. Using ghost, do a "disk from image" for the C drive. Repeat if needed for the D drive. Etc. That is ghost your physical server to the Virtual Server 2005 machine.

    When Finished DO NOT - REPEAT, DO NOT START THE SERVER UNDER VIRTUAL SERVER 2005.
  7. Instead, copy the .vhd files to your Hyper-V host and create a new virtual machine. Rename the vhd files to something meaningful, like SBSMAIL1-C.vhd and SBSMAIL1-D.vhd.
    Configure the Hyper-V machine with the same number of CPUs as the physical machine used. Feel free to up the RAM to 4 GB. Select to USE EXISTING vhd files. Select the C drive (and D if applicable) vhd files (created earlier) under VS 2005 using ghost.

  8. Startup the Hyper-V machine and notice it just works!!! :-)
  9. Insert the integration services disk and install the Hyper-V components.

    That's it! Of course I'll leave the fine details to you. Adding a network card and making sure everything is fine.

UPDATE 1: For a Windows 2003 multi-cpu that you have virtualized. It is important to add a switch to the boot.ini file so that network timings by the OS work correctly. NOTE: This is not just P2V servers, I found strange ping times on a Win 2003 server that was installed as a VM from scratch.

The switch to add is /usepmtimer Like this: (All in one line starting with multi... of course).
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /NoExecute=OptOut /usepmtimer

(Google usepmtimer for discussions on this issue.)

UPDATE 2: Recent P2V's using this method have worked 100%. One extra thing I do is to open the Computer properties and create a system environment variable called devmgr_show_nonpresent_devices  and set it to a value of 1.

 

Now, open up device manager (within the virtual machine) and select View/Show Hidden Devices.

 

OK, now expand all device manager 'nodes' and you will see "grayed out" hardware that is no longer present. Simply right click and select 'Uninstall'. Do this for ALL non present devices.

This can get quite tedious and will take you several minutes - especially uninstalling all USB root hubs and "generic volumes". Depending on how many USB memory sticks were plugged in and out of the physical machine during its physical life.

 

When you open the Motherboard devices you will see lots of non present hardware like PCI Bridge and even Keyboard/Mouse etc. Uninstall them all! This will have no impact other than cleaning up the kernel driver tables. But I think it should speed up the virtualized machine a little bit.

 

I have found software device drivers like Trend Micro Virus scan network devices simply "moved sideways" and took up their normal role using the virtual Hyper-V network. 

"Activation" will probably be required as (in my case) the SBS 2003 server certainly noticed the "hardware" had changed. :-)

NOTE: Before activation, make sure you add disk drives etc. so that your activation is not done on an an incomplete VM. As mentioned above, set the number of CPU's to what the physical machine had. If it was 1 CPU Hyperthreading, then set 2 CPU's in Hyper-V.

OK, I now have my SBS 2003 server with all its millions of settings, Active Directory - logon scripts users and groups, sysvol shares etc. etc. running virtual under Hyper-V. If you do something like this be sure to shut down the physical server of course before connecting it to the network subnet.

Now that old SBS 2003 physical server can be re-purposed as as a home PC for the kids. :-)

Don't forget to export the VM as a backup. Copy it to an external drive too. You don't want to lose this server that you have rescued from its physical constraints! :-)

Please refer to this method as The Eastern Digital P2V Solution.

While you are here, feel free to checkout our products.

 
 

 
 

Google
 
Web easterndigitalsoftware.com

Copyright 2009 Eastern Digital Pty. Ltd. Australia.  ABN 87 004 274 051
Home | Contact us | Products | Downloads | Support | Privacy Policy