How To Resize/Grow VMware Linux Disks and Partitions
Friday, August 10th, 2007
Updated: November 9th, 2007
In this article, I will show how to resize a VMware disk if you didn't make it large enough when it was created. Furthermore, I will show how to resize partitions following the disk augmentation using OpenSUSE 10.2 as an example. You will even be able to resize the Linux root partition (/) that is mounted and is normally unmountable.
The story: this is simple - you made a VMware disk without thinking ahead and now it ran out of space. Here you have a few options, the most notable ones being create another disk and mount it or grow the existing disk and resize the existing partitions. The first option is trivial, so let's explore the 2nd one.
1. Backup the existing VMware disk file by copying it somewhere safe.
2. Grow the VMware disk file (note that I'm using Windows in this step because my host system is Windows XP). In order to do this, use the 'vmware-vdiskmanager.exe' utility that comes bundled with VMware and most likely sits in C:\Program Files\VMware\VMware Workstation. If the target size of the new disk is 10GB, issue the following command:
vmware-vdiskmanager.exe -x 10Gb "YOUR_DISK.vmdk"
The disk will crunch for a bit and hopefully happiy finish with Grow: 100% done. Now the maximum disk space has been increased to 10GB. At this point, all partitions remain the same size, with a bunch of unpartitioned free space added at the end of the disk.
3. Now you can boot the guest OS (OpenSUSE 10.2 in my example) and use some magical utility to resize your partitions. In YaST, for instance, you would go to System->Partitioner. You can resize pretty much any partition that can be unmounted (unmount it beforehand and never try to repartition a mounted one). That represents a problem if you, like me, want to grow the root partition /. Still with me? Then let's go to the next step.
4.
a) In order to repartition or resize a root partition, I will use a LiveCD of another OS. Or even better, a LiveCD that lives and breathes resizing things left and right. I'm talking about the GParted Live CD from http://gparted.sourceforge.net/livecd.php. Since a LiveCD is an operating system on its own loaded into RAM, it won't need to mount any of your existing partitions. There's a bug with the latest version 0.3.4-8, which prevents GParted from seeing any partitions in VMware systems at all, but 0.3.4-5 works like a charm. Download the ISO image, right click on the CD/DVD icon in the lower right part of the VMware window and click Edit. Then change the Connection to "Use ISO image" and browse to the freshly downloaded GParted ISO. This will effectively mount the image without having to burn it onto a CD.
b) Reboot the guest OS. Quickly press F2 on the VMware preboot load screen to enter the virtual VMware BIOS. Go to the Boot tab and bring the CD-ROM drive to the top by scrolling to it and clicking + repeatedly. Now save and exit. The next time the OS tries to boot, it will first try to load the LiveCD, which is exactly what we want.
c) GParted should load after a few minutes where everything should be very straightforward. The screenshots here may help understand what I'm talking about. Fiddle with the settings, increase the root partition size, click Apply, and go have a few beers because this may take a while to finish. When it does, so are we, as we now have successfully grown the root partition.
d) Optionally revert the steps in part 4a and 4b.
5. Reboot into the guest OS again. Enjoy all the new extra space.
This concludes the article. Feel free to leave any questions or comments.

(+15 rating, 3 votes)
beer planet is Artem Russakovskii's blog. Artem is a software engineer at
August 24th, 2007 at 4:25 pm
Thanks a lot. Very clear and concise indications on how to procede. Exactly what i was looking for.
August 25th, 2007 at 1:58 pm
May 19th, 2008 at 10:28 pm
Thanks for the howto.I'll like to know how I can do this with my host being linux,as i see no tool like vdiskmanager on my linux vmware install.
May 19th, 2008 at 11:43 pm
vmware vmware-authd vmware-loop vmware-ping vmware-uninstall-vix.pl vmware-vdiskmanager vmware-acetool vmware-config.pl vmware-mount.pl vmware-tray vmware-uninstall.pl
I needed to install the kernel-source package in order to complete the installation.
Perhaps you're using the VMWare Player, which may or may not include vmware-vdiskmanager.
June 16th, 2008 at 7:49 am
Hello,
I attempted what you've described but ran into a problem. When I boot up the LiveCD of gparted, after it boots into where my guest OS should be, gparted doesn't see any available devices.
Is there a way to force gparted to look to the 'hard disk' that should contain my VM?
system info…
host OS: CentOS running VMWare server
guest OS: Ubuntu 6.06
My guest OS does boot properly and all apps will run across the network. Of course I didn't set aside a larger enough file system for my mail service. Which is why I'm here now.
And I've already successfully enlarged the VM from 20GB to 40GB.
I hope you can help.
Cheers,
Steven
June 16th, 2008 at 8:21 am
June 16th, 2008 at 8:53 am
I'm using 0.3.6-7. Any known problems w/this version?
June 16th, 2008 at 9:15 am
July 7th, 2008 at 6:54 pm
Thanks a lot Artem,
Your solution is brilliant. Worked fine for us and saved us a lot of time.
Cheers,
Roman
July 7th, 2008 at 7:02 pm
July 8th, 2008 at 9:48 am
On Mac OS X with VMWare Fusion 1.1.3, the utility is /Applications/VMWare\ Fusion.app/Contents/MacOS/diskTool , and the grow argument is big X, not little x.
Thanks for the help, Artem.