• 1 First, obtain VHD Resizer from VMTOOLKIT.COM. Download the .zip compressed file, extract the .msi file to a temporary location ie: C:\temp and install it. Follow the default installation prompts. Click 'Close' to complete the installation.

  • 2 Run VHDResize.exe, browse and select the .VHD file from your Virtual Machine directory that you wish to expand.

  • 3 Select the location you wish to store the new .VHD file in and enter the name of the new .VHD file you are going to create.
  • 4 Determine the type (fixed or dynamic) of .VHD file you are expanding/creating and enter the size of the new .VHD file.
  • 5 Click Expand and wait for process to complete.
  • 6 Click Exit to close the program.
  • 7 After the virtual drive has been expanded you will need to expand the partition(s) within the virtual drive. To do this will require DISKPART.EXE from Microsoft.
  • 8 There are three software packages you can use to mount the new virtual drive file to expand the partition. BartPE, Windows PE or Microsoft Virtual Server 2005 R2 SP1. BartPE and Microsoft Virtual Server are free while Windows PE requires special licensing from Microsoft. Choose whichever software package is best suited to your needs.

  • 9

    To expand the virtual drive using BartPE or Windows PE see my article: How to extend the size of VMware disk file on VMware Server or Workstation. For this article I will use Microsoft Virtual Server. Download Microsoft Virtual Server 2005 R2 SP1 from Microsoft, http://www.microsoft.com/virtualserver.

  • 10

    Install Virtual Server using a custom install, selecting only VHD Mount or from a RUN box or command prompt type: msiexec /i "Virtual Server 2005 Install.msi" /qn ADDLOCAL=VHDMount and press 'Enter'.

  • 11

    Open a command prompt window and navigate to C:\Program Files\Microsoft Virtual Server\VHDMount. Mount the .VHD file using the following commands:

  • vhdmount /m /f (path and name of .vhd file)

     

  • 12 
  • Run diskpart to expand disk.
  • c:\>DISKPART --> press Enter
  • DISKPART> type 'list disk' --> press Enter
  • DISKPART> type 'list volume' --> press Enter
  • DISKPART> type 'select volume=#' (where # is the number of the volume you wish to extend) --> press Enter
  • DISKPART> type 'extend' --> press Enter to extend the disk file.
  • DISKPART> type 'detail volume' --> press Enter to verify the size of the new partition.
  • DISKPART> type 'exit' --> press Enter to exit diskpart.

     

  • 13 To dismount the .VHD file, type vhdmount /u (path and name of file)
  • 14 Attach new .VHD file to virtual machine

Article ID: 62, Created On: 1/26/2011, Modified: 1/10/2014

Feedback (0)