I’m currently doing some tests with TFS (yes team foundation server). So I installed a VM using vmware. I use this regularly for testing purposes, that’s why I have a small VM library containing various images with pre-installed operating systems. Since I’m installing TFS I at least need windows 2003 SP1 so I took my base image which was only 5 GB.

I started installing everything that I needed like IIS, SQL Server 2005, TFS itself and then I wanted to install the TFS Service Pack, but I ran into the problem of having not enough space on the disk.

Normally I would just reinstall the whole thing, but today I didn’t want to do that. So I started looking for alternatives. The first good help I found was vmware-vdiskmanager.exe. This is a command line tool delivered with Vmware Workstation. It allows you perform various tasks on the virtual hard disks.

Using the following command I was able to grow the disk with an extra 5 GB:

vmware-vdiskmanager.exe -x 10GB “c:\Image.vmd”

Doing this I hoped my problem would be solved. So I rebooted the VM only to note that the disk actually grew by 5GB but the partition did not. So I was still left with the same problem only now I had other options.

I searched for my PartitionMagic software, but for some reason (not enough space perhaps :-p) it didn’t install in the VM OS. My next step was to install partitionmagic on my own PC and mount the VM hard disk with the VMware Disk Mounting program. Again no luck, My partition magic didn’t recognize the mounted disk…

Already a bit annoyed by this stupid problem I finally found that VMware currently have the successor of P2V (Physical 2 Virtual) in beta. The new version will be free and is called VMware Converter. The real purpose of this tool is to convert physical machines to virtual machines. Although it also provides to convert existing vmware images. An interesting feature of this is that you can expand or shrink the partition sizes of the virtual hard disks. This was the solution!

Okay it took me a lot of time to figure this out but in the end I’ve learned something new ;-)