Paragon Partition Manager 10 for Virtual Machines is a powerful tool for managing virtual hard disks in all the major virtualisation packages (VirtualBox, Virtual PC and VMware).
The program includes a full set of partitioning tools, for instance: it can create, format, delete, move or resize a partition to suit your needs.
If heavy fragmentation is cutting your virtual machine's performance then Partition Manager's Defrag can help. And not by just reproducing the basic Windows defrag options. You get to choose details like where folders are placed on your drive, and how to sort files (by size, modification time, or not at all), giving you a much better chance of coming up with a defrag strategy that delivers significant results.
You also get a Boot Corrector tool that can fix many common startup problems, potentially very useful if your virtual machine won't boot. A host of other troubleshooting tools include options to update the master boot record, or check and fix boot.ini and BCD files. And if you know what you're doing then you can even view and edit your virtual hard disk at the sector level. (You need to be very knowledgeable about hard drive structures, though, as even a tiny mistake here could make your startup problems much, much worse.)
And elsewhere there are tools to back up your virtual hard disk, convert file systems, change cluster size, modify low-level details like primary slots or serial numbers, and much, much more.
Please note, while Partition Manager 10 for Virtual Machines is free of charge, you must register with Paragon to get a serial code. Go to this registration page http://www.paragon-software.com/registration/pmvm.html and follow the instructions. You will be emailed with a serial code.