This guide walks you through safely expanding a virtual machine’s virtual hard disk in VMware Workstation, VMware Player, and VMware ESXi. You’ll learn the two main methods—using the built-in disk utility and using the vSphere Client—and how to make the extra space visible to the guest operating system. You’ll need administrative access to the VM and, for the guest OS steps, the ability to reboot the VM if required.
What You’ll Need
- Access to the VMware software (Workstation, Player, or vSphere Client) with permission to edit VM settings.
- Enough free space on the host’s physical disk to accommodate the expansion.
- Administrative credentials for the guest operating system (to extend the partition).
- A current backup or snapshot of the VM (strongly recommended).
Step-by-Step
Method 1: VMware Workstation / Player (Windows or Linux Host)
- Shut down the virtual machine completely. In Workstation, select the VM and choose Power Off. Do not suspend it—expansion requires a full shutdown.
- Open Virtual Machine Settings. Right-click the VM in the library and select Settings, or go to VM > Settings.
- Go to the Hardware tab and select Hard Disk (SCSI or SATA).
- Click Expand on the right side. A dialog will appear showing the current disk size.
- Enter the new maximum size in GB (e.g., change 40 to 60). This is the total size after expansion, not the amount to add.
- Click Expand and wait for the process to finish. The time depends on the disk size and host speed.
- Power on the VM and proceed to the Extend the Partition in the Guest OS section below.
Method 2: VMware ESXi / vSphere Client
- Log into the vSphere Client (HTML5 or desktop) with an account that has the Virtual machine > Configuration > Edit device privilege.
- Right-click the VM and select Edit Settings.
- In the Virtual Hardware tab, expand the Hard disk entry.
- Change the Capacity field to the new total size (in GB or TB).
- Click OK. If the VM is running, the change may require a reboot to take effect—vSphere will prompt you.
- After the VM is powered on, continue with the guest OS steps below.
Extend the Partition in the Guest OS
The virtual disk file is larger now, but the operating system still sees the old partition. You must extend the partition to use the new space.
Windows Guest (Windows 10/11, Server 2016+):
- Open Disk Management (right-click the Start button and select Disk Management).
- Find the disk you expanded (usually Disk 0). You’ll see unallocated space after the C: partition.
- Right-click the C: partition and select Extend Volume.
- Follow the wizard, accepting the default to use all available space, then finish.
- Verify the new size in File Explorer.
Linux Guest (with parted or gparted):
- Open a terminal and run
sudo fdisk -lto see the current partition layout. - Use
sudo parted /dev/sda(replace sda with your disk) and enterprint freeto see the unallocated space. - Resize the partition with
resizepart(e.g.,resizepart 1 100%). - Exit parted and resize the filesystem:
sudo resize2fs /dev/sda1(for ext4) orsudo xfs_growfs /(for XFS). - Verify with
df -h.
Common Mistakes
- Expanding while the VM is suspended or has snapshots: Expansion may fail or corrupt the disk. Always shut down and remove or consolidate snapshots before expanding.
- Confusing “expand” with “add”: Expanding increases the maximum size of the existing virtual disk. Adding a new disk creates a separate virtual disk that requires a new partition and drive letter.
- Not extending the partition in the guest: The virtual disk size changes, but the OS partition remains the same. You must use Disk Management or parted to use the new space.
- Entering the wrong size: The value you enter is the total new size, not the additional amount. For example, to add 20GB to a 40GB disk, enter 60.
Tips
- Always take a snapshot or backup before expanding. If something goes wrong, you can revert.
- For thin-provisioned disks, expanding the virtual disk does not immediately consume host space—the guest’s filesystem will use it as needed.
- If you plan to shrink a disk later, note that VMware does not support shrinking virtual disks in most products. Plan your size carefully.
- In ESXi, you can expand a disk while the VM is powered on if the guest OS supports hot-add, but a reboot is often still required for the OS to see the new size.
- For Linux guests, using
gpartedfrom a live CD can be easier if the root partition is not the last one.
Troubleshooting
- “Cannot expand the disk” error: This usually means the VM has snapshots. Delete or consolidate snapshots, then try again.
- Guest OS still shows old size: Reboot the VM after expansion. If it still shows old size, check if the disk is using a controller that needs a driver update (rare).
- “Extend Volume” is greyed out in Windows: This happens if the unallocated space is not immediately after the C: partition (e.g., a recovery partition in between). You may need to move the recovery partition with a third-party tool or use diskpart to delete it (if safe).
- Linux
resize2fsfails: Rune2fsck -f /dev/sda1first to check the filesystem, then retry. - Disk shows as RAW after expansion: This is rare but serious. Restore from backup or snapshot immediately.
Frequently Asked Questions
Can I increase the disk size without shutting down the VM?
In ESXi, you can expand the virtual disk while the VM is running, but the guest OS may not see the new space until a reboot. In Workstation/Player, you must power off the VM.
Does expanding the virtual disk affect performance?
Not directly. Performance depends on the host storage. However, a thin-provisioned disk may become fragmented over time, but that’s not a direct result of expansion.
Can I shrink a virtual disk after expanding it?
VMware Workstation and ESXi do not support shrinking virtual disks. You can use third-party tools, but it’s risky and not recommended.
What is the maximum disk size I can set?
It depends on the virtual hardware version. For modern VMs (hardware version 14+), the limit is 62TB for SCSI disks. Older versions have lower limits.
Do I need to expand the partition if I add a new virtual disk?
No, a new disk appears as an uninitialized disk. You need to initialize it, create a partition, and format it—but you don’t extend an existing partition.
Will expanding the disk delete my data?
No, expansion is non-destructive. It only increases the maximum size of the virtual disk file. Your existing data remains intact.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Campus Tech Innovation Hubs: What They Are
- Poco C51 Airtel Prepaid Locked Variant India?
- Jenkins vs GitHub Actions: Which CI/CD Fits Your Team?
- Turn Off Backup Encryption in iTunes?
- Shared VPS Hosting: Is It Better?
- Disk Defrag Pro: What It Does and Whether You Need It