We recently had some problems with an ageing server that we host for one of our customers, so we decided to virtualise it onto our new Hyper-V platform. I carried out a P2V migration as follows. Firstly, I removed the server's hard drive and mounted it on my laptop using a ‘SATA to USB’ adapter. Then, I converted it to a VHD file using Microsoft's Disk2VHD utility and saved this VHD to the Hyper-V host.
Now, the last time Windows shut down it was connected to hardware it knew about. But, when it woke up to a load of new virtual hardware, the server didn’t recognise it's own hardware.
To rectify the problem
I installed ‘Hyper-V Integration Services’ onto the Windows machine which enhances the performance of a guest OS. Integration services allows; time synchronisation, shutdown communication between host and guest and optimises driver use. This meant that the host now had control over the guest machine at the OS level.
After a Windows update, the VM was able to recognise its new hardware. but a few conflicts still occurred. I;ve noticed that this is a particular problem with network adapters. In order to clean up the remnants of the old physical tin, at an administrative command line (and command line only) I used the command:
This told device manager to show all the hardware drivers installed that weren’t physically present i.e. all the old server parts, and then to open device manager with this setting applied. I then chose the option, ‘View > Show Hidden Devices’ . This showed greyed out items in the device list which I was able to uninstall. After this, I ran a Windows Update to refresh the drivers and finished with a restart.