Tuesday, 28 April 2009

Expand Size of Virtual Disk

Today I've attempted to grow the size of an existing vmware disk...

We have VMWare installed on a distribution of linux, the following commands will also work with windows. It is always a bad idea to have an auto-growing disk... there is a performance overhead associated and the disk will never shrink!

To manually grow a disk, execute the following command...

vmware-vdiskmanager -x 10GB myDisk.vmdk

This will increase "myDisk.vmdk" to 10GB.


You then need to log into a seperate virtual machine and add this newly extended vmdk as an extra hard disk...

Go into Disk Management (Control Panel > Adminsitrative Tools > Computer Management)... you should be able to see the newly unallocated space... Allocate this space but no not assign a drive letter to it as an Extended Partition.

Open command prompt and use the DiskPart.exe tool to extend the partition.

list volume
select volume x   (where x is the drive number)


If you receive the following error with DISKPART...

The volume you have selected may not be extended.
Please select another volume and try again.

See this microsoft support thread and use the Windows 2000 version of DISKPART.exe

Download: http://support.microsoft.com/kb/841650