Posts Tagged VPC

How to recover your Hyper-V Virtual Machines after installing the RC0 Update

Have you installed the RC0 update for Windows 2008 Hyper-V and have just found out that all your Virtual Machines will not start? Not to worry!

What happens in this update is that the Virtual Machine configurations are incompatible between Beta and RC0, but only the configurations ;) That’s the catch. The actual virtual disk (.VHD) is still fine, as it’s only a mountable partition. So what you’ll need to do is the following steps:

  • After installing Hyper-V RC0, create a NEW virtual machine in the configuration manager
  • Use the existing VHD file for the ‘old’ virtual machine on the ‘new’ one.
  • Boot the VM! :)

What you’ll notice after the first boot is that Windows 2008 can no longer control the mouse. This is due to the beta version of the Hyper-V Integration Services being installed on the Virtual Machine. You’re still able to use the keyboard, so if you’re savvy enough to know how to tab around and make your way through Windows, you’ll be able to “Insert Integration Services Setup Disk” in Hyper-V and update the software package :)

After all this, you should be good to go!

One note is that after I updated to RC0 I had to set back up the network adapter in Hyper-V as it seems my previous network configurations were lost after the upgrade.

Cheers! :)

, , , , ,

No Comments

Expand A Virtual PC VHD File And Extend The Partition

I was setting up Team Foundation Server Virtual PC the other night and thought that my initial estimate of only 8GB being required would be enough, but turned out I was wrong. After getting SQL 2005 Standard Edition installed I had a mere 800MB of free space left!

After some Googling around a bit I was able to locate a great tool from the guys over at vmToolkit.com called VHD Resizer. Basically it creates a new empty VHD file and copies sector by sector the data from your original VHD file to the new VHD file.

So now I had two VHD files but now my problem was that they were exact copies of one another and resizing the VHD container was only half of my problem. Now I needed to somehow resize the 8GB partition in my new VHD file to use the full 16GB of space I allocated to it.

I Googled around some more and read about a built in command line utility (Windows XP or newer) called diskpart. This program is a command line version of the Disk Management MMC plugin used in Windows, but it has a few extra features. The feature of diskpart I was most interested in was the “extend” command. I would just boot into the Virtual Machine and run the extend command from within diskpart, but then I read the following:

Diskpart blocks the extension of only the current system or boot partition.

How can I resize my new Virtual Machine partition without booting it? Simple!� I setup my Virtual Machine to boot off my original “small” drive with my new “larger” VHD as a second hard drive (D:). Doing this allowed me to extend the partition using the diskpart utility.

Shut down the Virtual Machine, set your new “larger” VHD as your boot drive and BAM! You have a resized Virtual PC drive :)

Hopefully this information will help someone else out there who was in the same delima I was :)

Cheers!

UPDATED 05/15/09: Hey everyone! I’ve found another issue with the solution listed above. The VHD file you’re trying to extend cannot be the same as the VHD you’re booting into to extend it. For example, if I have VPC “A”, and make a copy of the VHD, I cannot attach the copied VHD and boot into VPC “A” and extend the partition, because both “hard drives” will be signed with the same ID and Windows will be confused and not let you extend the partition. We found we had to boot into a completely different VPD to use the above method and that seemed to work fine! :)

Cheers (again)!

, , , , ,

24 Comments