Hyper-V and Visual Studio 2008 SP1

So I wanted to post a little bit about my adventure with Visual Studio 2008 SP1.  I have a virtual machine that has Visual Studio 2008 installed on it.  But it only has about 2 GB of free hard drive space on it.  So when I went to install this service pack, it gave me an error because it didn’t have enough hard drive space.

So thus began my adventure to try to get enough disk space to install the service pack.

Extending the drive

My first thought was that I could just allocate more space for my .vhd file and allow it to grow.  Everything was going great with that, I was able to make it larger and when I booted up the VM, I saw the additional space in Computer Management.  But when I tried to “Extend Volume” on the hard drive, I got an error because it is the system volume.  So that wasn’t an option.

Copy the files

So then I attempted to just create a new, larger drive and copy all the files onto that new drive.  But this failed because it didn’t have the correct things set to be recognized as a bootable drive.

The solution I found

So the way I found to get around this was to use this really helpful post I found here.  The Windows Automation Installation Kit was very helpful and allowed me to move all of my files to a new drive and set it up correctly.  This allowed me to have the necessary hard drive space to install the Service Pack and not lose anything that I had already installed.

Although it was a lot of work, it really was something useful to know about.  That is why I wanted to post about it here.  If you come across the need to have more hard drive space on your system drive in a VM, hopefully these steps will help you as well.

I wish there was an easier way to extend a system volume.  That would make this trivial.

Comments (9)

  1. Henri says:

    I recently had a similar problem with a Windows XP on VirtualBox. I found a utility called Migrate Easy that did the trick. I just created a larger virtual drive and migrated the data from the old one across.

  2. Another way is to mount that VHD as the second hard drive of another volume after you allocate more space. Then you can just extend the volume using the Computer Management tool.

  3. Dan,

    I tried that, also, but for me it complained saying it was a system disk or legacy disk or something and still wouldn’t let me extend it.  But that is something else that can be tried.

  4. Henri,

    That looks promising too, for anyone wanting to check it out:


  5. Jule says:

    Thanks for the information.  Why didn’t you just create another disk with more space? Essentially, add another disk to the existing VM.  I would have created a new VM with adequate space and installed the application on that disk.  Just a thought.

    Thanks again for the post.

  6. Jule,

    The reason I didn’t do that is that I already had Visual Studio installed on the system disk and the Service Pack doesn’t give you the option to put things on another disk.  So it was looking on that drive only.  And I didn’t want to uninstall Visual Studio and re-install it on another drive.

  7. Frankie says:

    You can’t extend the boot/system drive.  I had this problem using Virtual PC and although it’s a two-step process what I did worked very well for me.  I used the VMWare Converter which allows you to allocate larger space in the conversion process to ‘grow’ the VM, then I used the Vmdk2Vhd converter to bring it back.  Worked very easily.  

    There is in the Vmdk2Vhd utility two dll’s one Vmdk.dll and one Vhd.dll, I’d love it some source or API docs were provided so that you could use those dll’s to create this process without having to go to the VmwareConverter.  

  8. Frank says:

    For virtual pc, since you cannot extend the boot/system disk, I use vmware converter to allocate a larger disk and migrate my vhd into it, then vmdk2vhd to bring it back.  Worked very easily.

    I wish documentation were available for the two dll’s in vmdk2vhd because there is a vmdk.dll and a vhd.dll that one might use to create this process without the need to roundtrip through vmware.

  9. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. The folks over at Mindscape have released a new (free) add-in for VS2008 called VS File Explorer . The add-in gives an explorer tool