Increase Your VMware Virtual Hard Disk Size ( vmdk file )

I‘ve Windows Vista installed as a guest under Ubuntu Linux using VMWARE Workstation 6.0. This is done for testing purpose and browsing a few site that only works with Internet Explorer. Since I only use it for testing I made 16GB for Vista and 5GB for CentOS and 5GB in size for FreeBSD guest operating systems. However, after some time I realized I’m running out of disk space under both CentOS and Vista. Adding a second hard drive under CentOS solved my problem as LVM was already in use. Unfortunately, I needed to double 32GB space without creating a new D: drive under Windows Vista. Here is a simple procedure to increase your Virtual machine’s disk capacity by resizing vmware vmdk file.

Required Tools

  1. VMWare Product : Working Virtual machine and Vmware Workstation (it will work with other vmware product such as GSX Server and VMware Server).
  2. GParted LiveCD : Third-party utility to expand the size of a virtual disk.

Step # 1: Shutdown The Guest Operating System

Shutdown and poweroff Windows Vista.

Delete all your snapshots from snapshot manager by visting VM > Snapshot Manger. Since you are going to resize you virtual disk, these snapshots going to create a problem for you.

Backup your entire virtual machine. My VM is located at /share/vms/WindowsVista. So I made a backup:
# cp -arv /share/vms/WindowsVista /safe/path/to/vm/05062009/
# rsync /share/vms/WindowsVista
Another option is you can clone your guest in VMware, if you want to keep the existing virtual machine configuration by visiting VM > Clone option.

Step # 2: Increase Your Virtual Machine’s Disk Capacity

Open shell prompt and type the following command:
# /usr/bin/vmware-vdiskmanager -x {diskSize}GB yourvm.vmdk
If you are using Windows operating host system change directory to C:\Program Files\VMware\VMware Workstation or add this to your PATH settings. Click on Start > Run and type cmd to open Windows shell prompt:
vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"
OR use full path as follows
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"

Example: Increase Size to 32GB

Linux host example:
# /usr/bin/vmware-vdiskmanager -x 32GB /share/vms/WindowsVista/vista.vmdk
Windows host example:
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 32GB "c:\vm\centos.vmdk"

Step # 3: Expand The Size Of a Virtual Disk

Now, disk size is increased but operating system will only show 16GB used and 16GB unused. To add new 16GB to C: (i.e. expand the size of a a virtual disk), use GParted. You will need to use a third-party utility such as GParted to resize the expanded partitions. The GParted application is the GNOME partition editor for creating, reorganizing, and deleting disk partitions. GParted is a live Linux based CD. Download latest version here or use wget command as follows:
$ cd /tmp
$ wget

Start Vmware

Select your VM (such as Windows Vista). Click on VM menu > Select Properties > Select CD / DVD > Use ISO Image > Click on Browse > Select /tmp/gparted-live-0.4.5-2.iso > Ok > Save.

Fig.01: Boot From Gparted Live CD

Start your virtual machine. Press F2 to visit Vmware BIOS menu. Make sure boot option order is set as follows (CDROM drive should be the first boot device):

Fig.02: Allow Virtual Machine To Boot From a Live CD

Hit [F10] function key to save and exit BIOS menu. Within minutes you will boot into Gparted Live CD.

Select your disk (such as /dev/sda1).

Click on Resize/Move button.

Set a new size to maximum size (it is displayed on the screen itself).

Fig.03: Resizing Windows Vista Virtual Disk

Finally, hit Resize/Move button to start the process:

Fig.04: Gparted in action

Depending on the amount (disk size and storage type) and type (resize or move) operation resize may tae a long time. After sometime Gparted will give out the final confirmation about disk resize operation (you must not get any error on screen):

Fig.05 Gparted resize disk operation

Click on exit button shutdown Gparted.

Step # 4: Fix Windows MBR and Partition Issue

  1. Get your Windows Vista CD and insert the installation disc.
  2. Click Repair your computer to fix MBR and other small issue.
  3. When the repair process is complete, click Finish.

Step # 5: Verify Your Disk Space

Make sure the virtual machine configured to start from a hard disk by pressing F2 key. Save and exit BIOS. Once done, you should able to boot into Windows vista (chkdsk may run at startup). Just verify your disk space:

Fig.06: Windows Vista Running As Guest with 32GB virtual disk space.

Recommend Readings:

  1. The official Vmware website and documentation.
  2. A Stop error occurs, or the computer stops responding when you try to start Windows Vista.
  3. Resize Windows Partition with Open Source Software.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 36 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
36 comments… add one
  • kakyo Jun 9, 2009 @ 23:07

    Thanks a lot for the detail.
    It’s still to much trouble… I’ll give up.

  • Muster Maxmann Jun 10, 2009 @ 6:17

    For the Windows VM you coud also have used the build-in diskpart.exe.

    • 🐧 nixCraft Jun 10, 2009 @ 6:25


      Thanks for sharing diskpart.exe. I had no idea about it.

  • Solaris Jun 11, 2009 @ 19:46

    There is another solution that allows you to define growable disk size, at least in
    Windows guest, but I don’t remember now how.

  • camper trailer Jun 12, 2009 @ 13:31

    The warm feeling I get when someone is thoughtful enough to say thank you for having been helped far outweighs the empty one
    I get when there’s no feedback at all

  • Ulver Jun 18, 2009 @ 19:05

    my question could be stupid ….but if you can use vmware-diskmanager to increse a partition …it will be posible to use to de-crease it ?

  • Gil Jun 25, 2009 @ 23:40

    Great step by step just got some trouble then now it work like a charm, i just get the turn around..
    @ ulver if you want to de-crease it.. But go to gparted first to deacrease it using resize. Then delete the unallocated part of the this. the use repair from windows.

    Actually i use Windows 7 RC

  • Gil Jun 25, 2009 @ 23:43

    You can use system restore cd 1.1.2 this is very light tools gparted is included in this iso.. its only 239mb…
    Download it then burn it.

  • zairo Jul 19, 2009 @ 7:56

    I’ve follow that step by step but when I open gparted in my vmware console, there’s disable option for resize button. I am using xubuntu 9.04 host and FreeBSD 6.3 Guest. I just don’t know where the wrong part is.

  • ravindra Aug 10, 2009 @ 17:27

    I installed Ubuntu as guest OS under windows XP(host system). Now i have a problem of disk space for ubuntu. How can i increase the ubuntu disk space…

    Thank you

  • Vaibhav Ghadiok Nov 8, 2009 @ 20:01

    I am running ubuntu 8.04 using VMWare on Windows XP. I downloaded the vmware-vdiskmanager through the VDDK Development Kit (Since I am using VMWare Player. I have read a few posts stating that Ubuntu will automatically recognize and increase the vmdk but that is not happening. Any comments/suggestions?


  • Sonny Jan 4, 2010 @ 21:50

    I usually use the Free download:
    VMWare Converter

    Tell it the source VM image
    Tell it the folder to put the new image into
    Tell it to enlarge the drive

    don’t know if this works with VM Player… I’m running workstation 6.x

  • peter Sep 9, 2010 @ 20:53

    Thanks Vivek, I was able to extend my Linux .vmdk using vmware-vdiskmanager and the gpart live cd.

  • Muhammad Tauqeer Iqbal Jan 12, 2011 @ 11:22

    Many Thanks

  • ari Mar 8, 2011 @ 7:59

    great tutorial with good details, thanks.

  • Kristina Mar 10, 2011 @ 15:05

    Great post. Although I am new to Linux, this post/tutorial really worked for me. Just as comment, with VMWare Workstation 7 there is the possibility to Power on to BIOS directly from the Menu (VM ->Power -> Power on to BIOS).

    Many thanks.

  • Peter May 17, 2011 @ 7:36

    ….does NOT work for OpenSolaris with ZFS file system.
    Gparted tool does not recognize and allow resize of ZFS partitions.

  • Steve May 18, 2011 @ 18:36

    worked like a charm on a C: win2k3 VM


  • shakir May 24, 2011 @ 18:58

    MY host os : Vista
    Guest Os : Ubuntu
    when i running the command
    c:/programfiles/vmware/vmware-vdiskmanager -x 16GB “C:/ubuntu/ubuntu.vmdk”
    i am getting the following error:
    failed to expand the disk “C:/ubuntu/ubuntu.vmdk” one of the paremeters applied is invalid
    any help apprecitated …..pls

    • ravi May 27, 2011 @ 9:00

      If your guest is windows 2008, you can simply go to Computer Management-Storage and do Extend volume wizard. Its simple.

  • rohit Aug 11, 2011 @ 10:39

    i have selected CD-ROM first in boot menu when i used key F10 Fig.03:( Resizing Windows Vista Virtual Disk) did not come ,what sud i do??
    Please help me

  • Andrew Aug 17, 2011 @ 13:38

    Hey thanks for the tutorial!

    I was able to resize the disk but when I go into GParted I only have the option to increase the size of my extended partition not the ext3 boot partition (Running Ubuntu Server). Any way to fix that / make it work?

  • Senthil Gurusamy Nov 8, 2011 @ 11:57

    Hi Vivek,
    I am able to resize my hdd with this detailed steps.
    Thanks for this nice tutorial.

  • Drew Nichols Nov 22, 2011 @ 23:17

    This worked like a charm for me. Thank you so much for the post.

  • John Mulder Nov 27, 2011 @ 17:09

    Nice. Very nice. Thanks a lot !

  • px Feb 18, 2012 @ 11:40

    I nominate you for hero of the day. Other nominees include whoever it was that created that gparted live disk. Freaking brilliant, thanks much! Went from frustrating problem, to google, to your site, to problem solved in about 5 minutes.

  • surfer Jun 12, 2012 @ 4:58

    Thanks so much. Even if I needed to a couple of more tricks for my case, basically this tutorial could have solved my issue very nicely. Thanks again. 😉

  • surfer Jun 12, 2012 @ 5:01

    thanks. 😉

  • Vijay Borhade Jul 12, 2012 @ 9:50

    You didn’t Mention to Click Apply Buddy , It took my 15 Mins

  • SleepIT Sep 26, 2012 @ 15:20

    Easier method in Vista and above –

    In Windows guest, move virtual memory location to another drive
    Shut down VM
    Perform steps one and two above
    Boot into VM
    Control Panel, Administrative Tools, Computer Management, Disk Management
    Right click the Volume and select Extend Volume.
    No need for GParted or Windows OS .iso!!
    Move virtual memory back to this drive if desired.

  • gincy cartoni Dec 14, 2012 @ 11:32

    Thank you for this tutorial. It was very helpfull.
    Just one detail : to acced BIOS, the start was to fast, I edit my vmx fil to add the following : bios.bootDelay = “5000”
    Then I was able to press F2 in time !

  • Alex Dec 21, 2012 @ 10:27

    Only one comment
    If the swap partition is between the unallocated disk and the one we want to resize, you have to move it to the end of the pool, and then you’ll be able to reallocate the disk.

  • Shiva Aug 6, 2013 @ 8:16

    This works great for me without having any issues. Thanks for the article

  • kavimani Apr 4, 2014 @ 6:55

    I have Solaris 10 VMware instance, we need to increase /usr mount point.
    It is possible to increase the size

  • Mohammed Apr 11, 2014 @ 4:59

    Hi Team,

    I do have a concern on extending the size of Virtaul hard disk, tried by the UI option available in Vmware workstation10.0 but no luck, also tried by using the command its has been grown successfull, but while turning on it is prompt an error “â—¦Failed to open (The parent virtual disk has been modified since the child was created)”

    I’ve three VHD files, unable to get the process for editing CID no of these hard disk.

  • kennedy wanyeki Nov 17, 2015 @ 12:28

    Wow.thanks really helped me big time

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum