Posted by eric in General Software on February 7, 2008
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)!
Fusion theme by digitalnature | powered by WordPress
Entries (RSS) and Comments (RSS) ^