How to Increase Disk Space in VMware

Have you ever encountered out of disk space issues on your wonderful VMs when trying install a critical application? Here are a few easy steps that help you to solve the disk space problems on your VMware workstation VMs

Make sure the following prerequisites are met:

The virtual machine is powered off.

670px-Increase-Disk-Space-in-VMware-Step-1Bullet1

The virtual disk is not mapped (on Windows guests) or mounted (on Linux Guests). You cannot expand a virtual disk while it is mapped or mounted.

670px-Increase-Disk-Space-in-VMware-Step-1Bullet2

The virtual machine has no snapshots.

670px-Increase-Disk-Space-in-VMware-Step-1Bullet3

The virtual machine is not a linked clone or the parent of a linked clone.

670px-Increase-Disk-Space-in-VMware-Step-1Bullet4

To determine whether the virtual machine has snapshots, is a linked clone, or is the parent of a linked clone, check the information at the top of the Summary tab for the virtual machine.

670px-Increase-Disk-Space-in-VMware-Step-1Bullet5

Select VM > Settings.

670px-Increase-Disk-Space-in-VMware-Step-2

On the Hardware tab, select Hard Disk for the virtual hard disk to expand.

670px-Increase-Disk-Space-in-VMware-Step-3

Select Utilities > Expand.

670px-Increase-Disk-Space-in-VMware-Step-4

Set the new maximum size for the virtual disk.

670px-Increase-Disk-Space-in-VMware-Step-5

Select Expand.

670px-Increase-Disk-Space-in-VMware-Step-6

Click OK after the disk expansion process is complete.

670px-Increase-Disk-Space-in-VMware-Step-7

Download the Gparted iso. Gparted is a free disk management tool. You can use any of the available tools.

670px-Increase-Disk-Space-in-VMware-Step-8

Mount the Iso on the VM that we have just expanded and power on the VM.

Ensure that the VM boots from the Gparted iso.

  • Gparted provides a friendly UI to do partition and disk operations. The expanded size would appear as unpartitioned space. Resize the existing volume to claim the expanded size. Apply the changes and reboot.

 

On Reboot, the disk would reflect the new size.

670px-Increase-Disk-Space-in-VMware-Step-10

For Linux guest machines
Now you should have LOTS of free space which can be checked with vgdisplay : Free PE / Size

Extend the / partition

lvextend -l +100%FREE /dev/mapper/vg_cloud-lv_root

and resize the filesystem to match the new logical volume container

resize2fs /dev/mapper/vg_cloud-lv_root