Tips

VhdResizer: Another Tool for your Virtual Toolbox

With VhdResizer, resizing virtual hard disk files is a piece of cake.

The folks at VMToolkit.com have recently added another invaluable tool to their repertoire. With the free VhdResizer, administrators can solve two of the most common issues involving the management of Microsoft Virtual Server or Virtual PC virtual hard disk (VHD) files:

  • Increasing the size of a virtual hard disk
  • Converting a virtual hard disk from one that dynamically expands to one that has a fixed size, or vice versa

Suppose you're running a Windows Server 2003 VM on a 4GB virtual hard disk and the disk has run out of free space. With VhdResizer, you can resize the virtual disk to a larger value (16 GB, for example). Another handy use for this tool is in converting a fixed-size virtual hard disk to a dynamically expanding virtual hard disk. This is useful when you need to reduce the size of a virtual hard disk file, which is especially helpful when you plan to store a VM on a DVD or frequently copy it over the LAN.

To use VhdResizer, you need to download it from VMToolkit.com. Once downloaded and unzipped, just run VhdResize.exe. When the tool opens, you will need to click Open, and then browse to and select the VHD file that yo want resized. Next, you need to specify the name of the resized VHD file in the Destination VHD field, and then indicate the new virtual hard disk size with the New Size slider.

When ready to resize the disk, click the Resize button.

VhdResizer, like the blue pill for your virtual disks
Figure 1. VhdResizer is simple and effective

If you are increasing the size of a virtual hard disk, the new disk space will appear in Disk Management as unpartitioned space on the hard disk. Note that you will need either to create a new VM and select to use the newly resized virtual hard disk, or to copy the resized virtual hard disk back to the source disk location and rename the new disk to the name of the original source disk. Before copying the resized disk back, it’s recommended that you rename the original source disk (such as disk1.vhd.old) prior to copying the new virtual disk. This way if a problem occurs during conversion, you'll still have the original disk.

Once the VM boots with the new virtual hard disk, you can then partition and use the space as a new logical drive or mount point. If you have to expand a single logical drive to use the new unpartitioned space, then you can use the diskpart command-line tool, third-party imaging tools or a third-party disk partitioning tool. Those tools are further discussed in my article, "Virtual Disk Dead End," which covers VMware .vmdk virtual disk resizing.

About the Author

Chris Wolf is a Microsoft MVP for Windows --Virtual Machine and is a MCSE, MCT, and CCNA. He's a Senior Analyst for Burton Group who specializes in the areas of virtualization solutions, high availability, storage and enterprise management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley), and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).learningstore-20/">Troubleshooting Microsoft Technologies (Addison Wesley) and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

comments powered by Disqus
Most   Popular

Upcoming Training Events