Get in touch:
01524 851 877
07718 896 553

Expanding A Vmware Disk

Posted on Jun 16 2009 by Matthew Jakeman

After trying to compile a new kernel in VMware I ran out of disk space and needed to resize the .vmdk disk. It is a fairly simple process and the following command does all the work for you if you:

vmware-vdiskmanager -x 12GB disk.vmdk
Obviously the new size of the disk can be set after the -x argument and the format for this can be found in vmware-diskmanager –help.

After this has been resized you will need to resize the partitions inside the VM. If you have a Linux Live CD to hand you can stick that in and boot up your VM. You need to be pretty quick and click inside the VM to be able to input commands ASAP. When you have done this hit escape in order to set the boot up sequence and tell it to boot from the CDROM.

When your live cd has fully booted load up gparted (or your own preferred choice of partition editors) and grow your main partition into the new free (unallocated) space. In my case I also had to delete the swap partition and move it but this will depend on each individual case.

After that is all done you should be able to reboot your VM with the new larger disk.

Leave a comment