Migrating a virtual machine from Virtual PC to Hyper-V
Now that hyper-v is released I though it would be good to go through a little glitch I found moving a Virtual PC vm (sometimes known as a VPC) to a hyper-v vm.
As I have mentioned before my trusty heavyweight laptop dual boots to Vista for day to day work, and Windows Server 2008 for demonstrations and so on. I don’t have SQL Server 208 installed natively on either OS and won’t until SQL Server 2008 is released to the public. Because of this all my stuff is in virtual machines (vm). I have Virtual PC installed in Vista while Windows Server 2008 has the Hyper-V role installed as I have a 64-bit laptop which specifically supports virtualization (set in the BIOS).
I needed to build a new vm with SQL Server 2008 rc0 and Visual Studio 2008 running on Windows Server 2008 and I did all this in Virtual PC for two reasons:
- I didn’t care that it would only be a 32bit environment (only hyper-V support 64-bit guest vm’s).
- I wanted to do admin stuff while it was building which I don’t have setup on the Windows Server partition for reasons I won’t bore you with.
The problem came when I wanted to migrate it to being a hyper-V machine, in that it was running like a snail and so I have now written these steps to overcome the issue:
Step 1. Like any good DBA make a backup by copying the vm so you have a fallback if things go wrong.
Step 2. Uninstall the Virtual PC virtual machine additions in the vm while running it in Virtual PC. Virtual machine additions enable the mouse to move smoothly from the host to the guest vm and allows you to share folders and improves performance by using some of the Hyper_V technology (if your hardware can support this). Hyper-V has similar integration components whihc are entirely different and use different key strokes to Virtual PC e.g. login in virtual PC is <Right- ALT> <Delete> while in Hyper-V it is <CTRL><Alt><End>.
Step 3. Fire up Windows Server 2008 and go into the hyper-V role. If you haven’t got Hyper-V setup then please go here for a step by step guide.
Step 4 Create a new VM and point to the .vhd (virtual hard disk) of the machine to be migrated.
step 5. fire it up in Hyper-V and check all is well in device manager as per this screen grab…
If you have a warning triangle here, then the performance will be atrocious i.e. similar to virtual PC without its virtual machine additions installed. To fix the problem launch msconfig and select advanced options from the boot tab and turn on detect HAL (Hardware Abstraction Layer)…
Once that is fixed, the performance is very nearly as good as a physical machine, but bear in mind that you should still do the same sort of disk layouts as you had with virtual PC i.e. put the vhd on a different physical disk than the physical OS if possible, even if this is a slower usb drive.
Technorati Tags: Virtualization,Hyper-V,Virtual PC,SQL Server
Comments
- Anonymous
November 06, 2008
Just discovered whilst at TechEd that Microsoft policies for SQL Server products that are running in