NB, MAR 2009: It was brought to my attention (thanks Fernando) that utilities like VHDResizer (http://vmtoolkit.com/files/default.aspx) may do the job in a simpler way. I did not check myself.
I was working on a Virtual PC 2007 virtual machine with a dynamically expanding disk of a maximum of 16 Gb.
This disk was the C: system drive on the virtual machine and I was running out of virtual space (I had enough space on the hardware host disk).
A dynamically expanding disk can only grow to its predefined maximum size. The name comes from the fact that if you store 10Mb in a 16Gb dynamically expanding disk, vhd file size will only be ~10 Mb. You'll find much more at http://support.microsoft.com/kb/825092/en-us
So the virtual guest machine had a 15.5 Gb system drive for a maximum of 16Gb.
Here is what worked for me.
Let's call C.vhd the file of the 15.5 Gb C: drive.
Then you can delete C.vhd and keep CBis.vhd.
PingBack from http://www.artofbam.com/wordpress/?p=5268