Resizing a VHD

  • Section(s): Virtual Platforms
  • Created on Jan 21, 2008.
  • Last Modified on Mar 13, 2008.
  • Last Modified by Mitch Tulloch.
  • Rating: Not Rated
How to expand a virtual hard drive.

Sometimes with Virtual Server you find out after awhile that the virtual hard drive (VHD) you created for a VM is too small. If this happens, here’s how you can expand your VHD to increase its size:

  1. Start by downloading VHDResizer from vmToolkit.com (http://vmtoolkit.com/files/default.aspx). Te tool is free but registration is required.
  2. Run the tool and specify the source VHD (the one you need to expand) and a destination VHD (which will contain your expanded VHD).
  3. Mount the destination VHD on your host machine using the vhdmount /m /f destination.vhd command.
  4. Use diskpart to extend the volume on your destination VHD so that it fills the drive. For example, type list disk to identify which is your new disk, then type select disk N to select that disk, then use list partition to identify the partition number on this disk, then use select partition N to select that partition, and then use extend to extend the partition to fill the disk. Leave diskpart.
  5. Unmount the VHD using the vhdmount /u destination.vhd command.

Note that since VHDResizer is not a supported tool from Microsoft, this method is technically unsupported, but readers I know have never had a problem doing it this way. Still, be sure to test this method first in a test environment before trying it on your production network. Presented “as is” with no warranties.

***

Mitch Tulloch was lead author for the Windows Vista Resource Kit from Microsoft Press, which is the book for IT pros who want to deploy, maintain and support Windows Vista in mid- and large-sized network environments. Mitch was also the author of Introducing Windows Server 2008 and technical project lead for the Microsoft Office Communications Server 2007 Resource Kit, both books also from Microsoft Press. For more information on these and other books by Mitch, see www.mtit.com.

Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Anti Virus Appliance solution?