posted on Monday, April 16, 2007 6:06 AM
by
Thushan Fernando
HOW-TO: Increase the size of an existing VMWare Hard Disk (VMDK)
VMWare is a god-send tool and as such I use it far too much. I usually spend a bit of time before creating a new disk to make sure the disk is fully created before running it (a fixed size instead of dynamic - does wonders for performance!) But what happens if you find your running out of space after you slug away at it?
Here's how to increase the size of a disk that has been created already.
- First make sure that the VMWare Image doesnt have any snapshots attached to it. To do this goto VM -> SnapShot -> Snapshot Manager (or hit CTRL+M) and remove (or backup) any snapshots that are there.
- Head down to the installation folder in VMWare installation folder and open the folder in Command prompt (easier!)
- The command for increasing the size is:
vmware-vdiskmanager.exe -x ** "%PATH_TO_VMDK%"
Where ** = Size of the hard disk to grow to (be careful not to decrease in size) so for 10Gb enter '10Gb' without the quotes, this is the total size of the HD not how much to increase by! Then fill the '%PATH_TO_VMDK%' with the path to the main hard disk file (not a chained hard disk). The output is something like this:
C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager.exe -x 10Gb "G:\Virtual Machines\Windows 2003 Server\Enterprise - Default\Windows Server 2003 Enterprise Edition.vmdk"
Using log file C:\DOCUME~1\THUSHA~1\LOCALS~1\Temp\vmware-Thushan Fernando\vdiskManager.log
Grow: 100% done.
The old geometry C/H/S of the disk is: 783/255/63
The new geometry C/H/S of the disk is: 1305/255/63
Disk expansion completed successfully.
WARNING: If the virtual disk is partitioned, you must use a third-party
utility in the virtual machine to expand the size of the
partitions. For more information, see:
http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647
C:\Program Files\VMware\VMware Workstation>
-
Once that's completed you can either create a new partition with that (via Computer Management -> Disk Management in Windows) or merge it with a Partition Merging tool like GParted Live CD! If you've installed Windows, it will/may do a chkdsk which is normal.
There nice and easy:-)