Resizing system volumes in VMware

Vmware has made it easy to increase the size of your virtual hard disks in the latest versions of vmware.

To do this simply open VI Client and follow these steps.

  1. Right click on the virtual machine containing the HDD that you wish to increase and select Edit Settings
  2. Select the hard disk you wish to enlarge and type a new value for the hard disk.  Click ok to close the virtual machine settings.
  3. Console into operating system of the guest and bring up a command prompt
  4. Type Diskpart
  5. type list volume
  6. work out the volume number of the disk you are enlarging the type select volume <no>
    (Replace <no> with the volume number you worked out)
  7. Type Extend

Done.  However what if the volume you are trying to extend is a system volume?  Windows will (understandably) not let you enlarge a volume that it has used to boot from as the volume will contain files in use.  Trying the diskpart commands above will fail if this is the case.   We can get around this issue by performing the following steps

Disclaimer:
This process has worked for me in my testing and on production VM’s, however i strongly suggest you perform relevent backups and testing prior to following these steps in your production environment.

  1. Right click on the virtual machine containing the HDD that you wish to increase and select Edit Settings
  2. Select the hard disk you wish to enlarge and type a new value for the hard disk.  Click ok to close the virtual machine settings.
  3. Shut down the virtual machine.
    You must shut down the original VM during this process to ensure only one VM is access the disk at a time.
  4. Start up a temporary test server.   
    This is important.  The VM must be started before adding the disk to ensure it doesn’t try to use the extra disk as a system disk.

    It is probably best to use a clean system with no extra software installed on it, apart from windows patches.  I deploy a clean system from my SOE template and use that.
  5. Edit the temporary Virtual machine by right clicking on it and selecting Edit Settings
  6. Add a new hard disk Drive to the VM
  7. When asked if you would like to create a new disk or select an existing disk, use the existing disk option and select the vmdk file for the system disk you are trying to increase
  8. Click on ok to add.  When VI has completed the add process, open a console to your temporary machine
  9. Open a command prompt
  10. Type Diskpart
  11. type list volume
  12. work out the volume number of the disk you are enlarging the type select volume <no>
    (Replace <no> with the volume number you worked out)
  13. Type Extend
  14. Once completed confirm in disk manager or windows explorer that your disk has indeed increased in size and then shutdown your temporary VM.
  15. Remove the extra hard disk from the temporary system
  16. Start the original VM.  Once the system is started you should be able to confirm the new size of the disk.
Advertisement

One Response to Resizing system volumes in VMware

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 111 other followers