Converting a physical Windows Machine to a Hyper-V Virtual Machine P2V Problem

We recently wanted to move a physical windows 2003 server to a virtual server. This is known as P2V. The machine happened to be a Windows 2003 Server running exchange.

One of the reasons we wanted to move, was because the hardware was getting a little long in the tooth, and for various reasons, we did not wish to upgrade the version of exchange.

We were almost successful too, but as you will see, the nail in the coffin was a typical Microsoft issue. One that is just one more reason why our future avoids Microsoft wherever possible.

Convert P2V

To the physical machine, we installed a VM ware free tool known as VMware VCentre Converter. http://www.vmware.com/products/converter/

An easy to use free tool, that converts your physical machine into a virtual VM ware compatible single file. This file could be run on a VMware server. It is really easy to use and frankly like all VMware stuff… it just worked!

Cannot go without saying, that there is no Microsoft equivalent conversion tool.

Convert VM to Hyper V

To be able to use the VM single file, on a hyper V server, you need to convert it using the free tool from VM Tookkit http://vmtoolkit.com/blogs/announcements/archive/2006/11/20/vmdk-to-vhd-converter-available.aspx

This free little took, just runs agains the VMDK file and turns it into a VHD file.

Worked great thanks guys.

Mounting the VHD to Hyper V

Next and almost lastly, you just have to create a new HyperV virtual machine, and point it at your new VHD file that you have created and start the virtual machine.

Here is where it gets interesting

We managed to do all this, and turned on the virtual machine to one big problem. Microsoft Licensing.

Because the virtual instance detects new hardware, the Microsoft server drops into an unlicensed mode and wants to auto activate the license on the internet. Normally that would be fine, and you would just click on auto activate and wait 30 seconds before it auto activates.

Here is the problem. Because you have a new NIC network virtual instance, that has not been recognised by Windows, it will not allow you to connect to the internet until you install drivers. These drivers cannot be installed until you login. You cannot login until you activate….  and around and around we go on the Microsoft License ride!

There is no way around this, so the only option that is left to you is to contact Microsoft licensing via phone. So we called the licensing numbers listed in the Windows Server activation screen. These numbers were out of date and the phone calls failed. (Bummer that a multi billion $ company cannot redirect a phone number when it changes.)

So we researched the new phone numbers. Not actually that easy to find, and before long I was talking to a foreigner in a foreign country who could barely understand my Microsoft Licensing Query.

They were asking me for the activation code, so they could generate a new license key. After about 4 attempts of trying to understand the phonetic alphabet “B as in Bravo.. you say V as in Varo… No you idiod… BRAVO”. We found that the key generated by Microsoft failed, and wad never going to work.

Solution, is to bump up the chain, and submit a support ticket. Long and the short of it all was that while we had a fully licensed server that we have been running for years, that we could still access. With new hardware Microsoft were unable to generate a license key that would activate it manually. They advised that we should just auto activate!!!! WE COULD NOT EXPLAIN TO THE MONKEYS THAT THIS WAS NOT POSSIBLE. In order to get an internet connection we needed it to be active. Round and round we go… right!

They then advised that the only solution would be to install Windows server again. This was actually something we considered, as with a Virtual machine, there is nothing lost. Only problem was that to install the OS, you need the HyperV integration tools installed. To install them you need to login. To Login you need the license active… Round and round we go!

Solution

There was non. We were screwed by Windows 2003 licensing. MS could not help, and their stupid solution of “What you need to do here is reinstall” was no solution.

We failed!

But it’s not all bad. Before this, we had never really spent a lot of time with either VMware, or Linux servers. We have now! We love it, and more and more are enjoying everything that is non Microsoft. After years of accepting headache and heartache as a normal way of computing. We find that there is a better way…. stay away from Microsoft.

In fairness

This would not have been the case with a Windows 2008 server, as the license protection gives you a trial period to play. So the above process will work if you have a 2008 server. So we should not be too hard on MS, as they did improve one thing in the 5 years it took them to release 2008 server. The licensing does a trial mode.

Summary

In summary the process to follow is:

  1. Have a Windows 2008 server ready with Hyper-V – ours is a Dell PowerEdge 2970 with 16GB RAM, Dual quad-core AMD Opteron Processors, and a RAID 1/RAID 10 split for the OS/Storage. All the Hyper-V files run from the RAID 10 volume. This is good for about 12 guests.
  2. Install the VMWare convertor on the Hyper-V server. You don’t need to install the agent.
  3. Download the VMDK to VHD Convertor and unzip it to a local drive on the Hyper-V server (the desktop will do).
  4. Create a network share on the Hyper-V server that the target server can reach.
  5. Run the VMware converter against the target (it must be a Windows box, anything from NT4 upwards).
  6. Once complete (Our PE1750 with a 70GB disk took about 20 mins), point the VMDK to VHD converter at the new disk, and create a Hyper-V disk under your Hyper-V file location. Once complete, you can delete the VMDK file.
  7. Create a new Hyper-V virtual machine, using the new .VHD file as the boot disk. Don’t connect the machine to the physical network at this point.
  8. Boot the new Hyper-V machine, log in and let the hardware detection process run. Don’t insert the integration services disk yet. Reboot.
  9. Log in again and insert the integration services disk, and let it do its stuff. Reboot again.
  10. Log in a third time, and let the install complete. One more reboot!
  11. Log in now and have a look at the network settings. If you can’t see anything, you’ll need to shut down the guest and install a legacy adapter.
  12. Tidy up stuff that isn’t needed for a virtual machine – typically hardware management stuff.
  13. If all is good, shut down the old box, connect the network to your new virtual machine and fire it up!

15 thoughts on “Converting a physical Windows Machine to a Hyper-V Virtual Machine P2V Problem”

  1. Have you tried SCVMM (System Center Virtual Machine Manager)? You can P2V using that on Win2k3 machines. I’ve done that many times without any issues in the past and its very easy and straight forward. The SCVMM is equivalent to the vCenter (virtual center) in schematic of things. Anyways, I’ve just P2V a Win2k3 a month ago without any problems. Though I must say that we could be dealing with different type of licensing version of the OS (retail, volume license, etc.).

  2. Sorry for the lateness of this query- I just read your article. If I just wanted to convert an old XP box running some (very) old software we use, could I not just use VMWare server option? I am asking because this would eliminate the steps to convert to Hyper-V. Also asking to see if there was a particular reason you wanted Hyper v. Thanks in advance-M

  3. I suspect the solution your problem would have been to install a legacy network adapter to the VM instead of or along with the emulated one.

  4. I went through the same issues trying to cut down the 4 servers in our small shop into a single Dell virtualization box running Microsoft Server 2008 SP2. All of the older servers are running Server 2003. I used the free disk2vhd tool to image all of the disks onto an external hard disk. Everything went well up until it was time to activate and install the hyper-v tools. It was stuck for hours waiting for hardware to be recognized and then kept trying to restart the servers time and time again. From the videos I looked at on youtube, VMware ESXi might be easier, even if it does require a Windows machine (we are a Mac shop) to manage the whole mess. Microsoft needs to pay attention to what small shops have to go through, even after paying for their stuff.

  5. Boot your VHD into safemode – once your in safe mode go to Start>Run and run this command. “rundll32.exe syssetup,SetupOobeBnk”

    it will give you more time to activate and allow you to log into to windows. Once you are in windows you can install the HyperV integration, get a network connection and properly activate Windows again.

    Please remember to follow the license agreement, you will need a valid serial number.

  6. Just went through this and found an easier solution.
    Problem was the prep tool for the drive, but it has pitfalls as well.
    Download the Microsoft product called Disk2vhd. Micorsoft bought Sysinternals so they now have the product that does a P2V. AT http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx
    BUT, you must read the help for you to understand it. Don’t just jump in. SO the gotchas the help tells you. Checkmark the box that says prepare to run the OS in a Virtual Machine. (It allows the network card and video cards to interact properly as well as boot properly without having to modify the partitions.) Do not create the VHD on the machine you will use it on. Meaning the host. (my mistake was I pulled the disk, attached it via usb and used the laptop to create the virtual. Won’t work. Better as it works, run the program on the physical and export the VHD to an external hard drive. Then copy the external to the new host machine. A pain? yes, but it works. (and this is noted in the hel. and yes, I hate it when I have to RTFM.)
    Also, vmtoolkit web iste is down and has been for a few weeks.
    With the checkmark in the box, and the copy of the vhd, I created and booted the Virtualmachine using the VHD as the hard disk. I got the activation screen, but as now the network card worked, I got the screen to fill in the activation key. Entered the one off the machine cover and all was good. On servers, especially dell servers, it may say ” Can’t activate this key, Call microsoft and Don’t change the key unless told to by microsoft support.” Right. Instead, Hit the change key button, and plug in the server code off the sticker on the side of the server (or your key). I am guessing that Dell activates with a OEM key. When you change hardware it wants a real key. The sticker (or your cds sticker has the real key.)
    Hope it helps

Leave a Reply