I created a virtual image of Windows 2003 R2 with antivirus and service packs then burned it to DVD so I would have a base image without taking up HD space on the server (WAIK is probably better, but I haven’t tried it yet). It seemed like a great idea until I realized that the VHD was setup for 50GB. So I did some research and found a pretty simple way to deal with this issue:
First, to make things easier on myself, I used VHDResizer to create a new VHD and copy the existing VHD into the new size. This increases the HD size, but not the partition (keep the original around until you complete the process, just in case).
Second, I used VHDmount to mount the VHD and used diskpart.exe from the host to expand the VHD’s partition. Shut down the guest VM. In the host, open the command prompt and type ‘cd Program Files\Microsoft Virtual Server\Vhdmount’
Mount the image
C:\>Program Files\Microsoft Virtual Server\Vhdmount>vhdmount /m “C:Documents and Settings\All Users\Documents\Shared Virtual Machines\<server name>\<server name>.vhd” <drive letter>
Start diskpart
C:\>Program Files\Microsoft Virtual Server\Vhdmount>diskpart
Expand the partition
DISKPART>list disk
DISKPART>select disk 3 -----check the number in the list
DISKPART>list part
DISKPART>select part 1 -----check the number in the list
DISKPART>extend
DISKPART>list part -----check the new size
DISKPART>exit
Dismount and save changes
C:\>Program Files\Microsoft Virtual Server\Vhdmount>vhdmount /u /c “C:Documents and Settings\All Users\Documents\Shared Virtual Machines\<server>\<server>.vhd”
After booting up the VHD again, you’ll be prompted to restart since Windows installed new hardware (your new HD). After reboot, your new HD partition should be ready.