This topic has been covered a bit (here, here, and here, for instance) but I have been working on a project that utilizes Virtual Server for testing, and it came up again. A consultant that was working on the VM’s in question apparently struggled for quite some time before he asked for help on it. So, I thought I would see if another post on this might help someone out.
If you run into a situation where you have existing Microsoft Virtual Server/PC VHD files, but the sizes you created them with initially simply don’t cut it anymore, there is hope!
What you will need:
- Original VHD file (obviously)
- VhdResize from vmtoolkit
- Spare disk space
- .Net 2.0 installed on the machine you will be using for the process
The beauty of the tool is that it can be without having to be installed (self-contained). Just extract the zip, double-click the VhdResize.exe executable, select your source file and destination VHD, and away you go! The VhdResize also allows you to convert from fixed-size VHD’s to dynamically-expanding VHD’s as well, and it is non-destructive on your source VHD.
Note that this only increases the size of the VHD, so that, effectively, your VM will see a larger physical hard disk present; it does not resize partitions on that drive. For that, you can either use Disk Management or diskpart in your guest VM, or mount the VHD using the vhdmount utility included in Virtual Server and use those disk utilities from your host OS (quick walkthrough here).
Let me know if that’s of use!
If you have ever had to take on a Physical-to-Virtual (P2V) migration of a server or other machine, you know that you generally have a fine balance of the following triangle of factors: cost, complexity, and reliability. It seems like the only way to get an easy and reliable solution is to throw gobs of money at either a VMWare infrastructure or something like Platespin. Don’t get me wrong: from what I’ve heard they both offer excellent solutions in that field, but it simply isn’t cheap. I had to find out the hard way, but there is another way.