VMware ESXi and vSphere Cluster Management
How to Expand a Virtual Hard Disk in VMware Player
Learn how to expand a VMware Player virtual disk, extend Windows or Linux partitions, grow the filesystem, and verify the new usable capacity.
Expanding a virtual hard disk involves two separate operations. First, VMware Player increases the maximum capacity of the virtual disk file. Second, the guest operating system must extend a partition and its filesystem into the newly available space.
This guide covers VMware Player, Windows guests, and Linux guests. Make a backup or copy of important virtual machine data before changing disk or partition layouts.
What expanding a virtual hard disk does
A virtual hard disk is a file-backed storage device attached to a virtual machine. Its virtual disk capacity is the maximum size that the virtual disk presents to the guest operating system.
When you expand the disk in VMware Player, you increase that maximum size. The guest can then see additional unallocated space, which is capacity not assigned to a partition or volume.
Expansion in VMware Player does not automatically enlarge the guest partition or filesystem. A partition is a defined region of a disk, while a filesystem is the format used to organize files within a partition or volume. Applications can use the new capacity only after the appropriate guest storage structures have also been extended.
| Stage | Where it is performed | Result |
|---|---|---|
| Increase virtual disk capacity | VMware Player settings | Additional unallocated capacity is visible to the guest |
| Extend partition and filesystem | Guest operating system | New capacity becomes usable by applications |
For example, a disk may increase from 60 GB to 100 GB while the Windows volume or Linux filesystem still reports 60 GB. The remaining 40 GB exists at the virtual-disk layer but is not yet part of a usable volume.
Prerequisites and limitations
Before changing the disk, verify each condition below.
| Requirement | Why it matters | What to check |
|---|---|---|
| Virtual machine powered off | Disk configuration changes should not be made while the guest is running or suspended. | Shut down the guest and confirm VMware Player shows it as powered off, not paused or suspended. |
| Disk not mapped or mounted | Another process using the disk can prevent a safe configuration change. | Disconnect any host mapping or external mount of the virtual disk. |
| No snapshots | Snapshots can restrict virtual disk changes and alter which disk files contain current data. | Review the virtual machine's snapshot state before proceeding. |
| Not a linked clone or linked-clone parent | A linked clone depends on a parent virtual disk, so changing the parent or clone disk may not be supported. | Confirm that the VM is neither a linked clone nor the parent of one. |
| Correct target disk identified | A VM can contain several virtual disks, and expanding the wrong one will not solve the storage problem. | Match the disk by its device name, capacity, partition layout, and intended operating-system or data volume. |
The supported expansion range is from 0.001 GB up to 2 TB. The new maximum size must be larger than the disk's current capacity. Check that the host has enough storage for the planned growth.
Expand the disk in VMware Player
- Power off the virtual machine completely. Do not leave it suspended.
- Select the powered-off virtual machine in the VMware Player library.
- Open Player > Manage > Virtual Machine Settings.
- In the hardware list, select the virtual hard disk device that needs more capacity. If the VM has multiple disks, verify the selected disk before continuing.
- Choose Expand.
- Enter the new maximum disk size. The value must be greater than the current capacity and must remain within the supported range of 0.001 GB to 2 TB.
- Complete the expansion operation and wait for VMware Player to report that it finished successfully.
- Close the settings window and start the virtual machine.
Player > Manage > Virtual Machine Settings
Select the target virtual hard disk
Expand
Enter a larger maximum size
Confirm completion
At this point, VMware Player has enlarged the virtual disk, but the guest operating system may still show the old partition or volume size. Continue with the procedure for the guest operating system.
Extend storage inside the guest operating system
After VMware Player finishes, boot the VM and inspect its disk layout. Identify the enlarged disk, the existing partition or volume, and the new unallocated space.
Where supported, extend the existing partition into adjacent unallocated space. Then extend the filesystem if the operating system does not do so automatically. Finally, check the capacity from inside the guest.
| Guest OS | Partition management tool | Verification approach |
|---|---|---|
| Windows | Disk Management | Confirm the volume size in Disk Management and, if appropriate, File Explorer. |
| Linux | fdisk or parted | Confirm disk, partition, and filesystem sizes with block-device and filesystem reporting tools. |
Windows guest procedure
Disk Management is the built-in Windows graphical utility for viewing disks and modifying volumes.
- Start the VM after VMware Player reports a successful expansion.
- Open Disk Management. You can search for Create and format hard disk partitions from the Windows Start menu.
- Locate the correct virtual disk by comparing its capacity and partition layout. Do not rely only on a generic disk label if the VM has multiple disks.
- Find the existing volume and the unallocated space added by the VMware expansion.
- Confirm that the unallocated space is immediately to the right of the volume in the disk layout and that the volume type supports extension.
- Right-click the volume and choose Extend Volume.
- Follow the wizard to add the available contiguous unallocated space, or specify a smaller amount if you want to leave some space unused.
- Verify the larger capacity in Disk Management and in File Explorer.
A common Windows example is a data volume that was originally 60 GB. After the VMware disk is increased to 100 GB, Disk Management may show a 60 GB volume followed by 40 GB of unallocated space. Extending the volume makes that space available to Windows applications.
When Windows cannot extend the volume
Windows generally requires the unallocated space to be immediately adjacent to the volume being extended. If another partition is between the volume and the unallocated space, the standard extension workflow may not be available. Review the complete partition layout and use a supported partition-management approach rather than deleting or moving partitions without a backup.
Linux guest procedure
Linux separates the block device, partition, and filesystem layers. An enlarged virtual disk may therefore require a partition change followed by a filesystem-growth operation.
1. Inspect the disk layout
Use a read-only inspection first. Replace /dev/sdX with the actual disk identified from the output.
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
sudo fdisk -l
sudo parted /dev/sdX print
Compare the disk size, partition numbers, filesystem types, and mount points. On a multi-disk VM, match the guest-visible disk to the VMware disk by capacity and layout before changing anything.
2. Extend the relevant partition
Use an appropriate partition-management tool such as fdisk or parted to extend the relevant partition into the added disk space. For example, parted can display the layout and resize a partition boundary:
sudo parted /dev/sdX print
sudo parted /dev/sdX
(parted) resizepart PARTITION_NUMBER 100%
(parted) quit
Use the actual partition number and disk device. Do not guess these values. With some partition layouts, especially when the partition is mounted or when the partition table must be recreated, a safer offline procedure is required. Preserve the original start sector if a tool asks you to recreate a partition entry; changing it can make the filesystem inaccessible.
If the storage uses LVM rather than a directly mounted partition, the workflow may instead involve resizing the partition, running pvresize, extending the logical volume with lvextend, and then growing the filesystem. Confirm the layout before selecting a procedure.
3. Grow the filesystem
Changing a partition boundary does not necessarily change the filesystem size. Use a command appropriate to the filesystem type and its mount state.
# ext4 example, using the correct partition device
sudo resize2fs /dev/sdXN
# XFS example, using the filesystem's mount point
sudo xfs_growfs /mount/point
Other filesystems have their own requirements. Consult the filesystem's documented growth procedure, and do not apply an ext4 command to an XFS, Btrfs, or other filesystem.
4. Verify all three layers
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
df -hT
sudo fdisk -l /dev/sdX
Check that the block device shows the enlarged disk, the partition occupies the intended space, and the mounted filesystem reports the increased usable capacity. A Linux root filesystem that still reports its old size usually needs the filesystem-growth step or an intermediate LVM step.
Practical examples
Windows VM needs application storage
- Shut down the Windows VM.
- Open its settings through Player > Manage > Virtual Machine Settings.
- Select the intended virtual hard disk and expand its maximum size.
- Boot Windows and open Disk Management.
- Extend the existing data volume into adjacent unallocated space.
- Confirm the larger capacity in Disk Management and File Explorer.
Linux VM root filesystem is running low
- Power off the Linux VM and expand the correct VMware virtual disk.
- Boot the VM and inspect the disk and partition layout.
- Use
partedorfdisk, as appropriate, to extend the relevant partition. - Grow the filesystem with the utility appropriate to its type.
- Verify the block device, partition, and mounted filesystem sizes.
VM has more than one virtual disk
First decide whether the operating-system volume or a separate data disk needs additional capacity. Select only the matching virtual disk in Virtual Machine Settings. After booting, match the guest-visible disk by size, partition layout, and mount point before extending a partition.
Expansion, compacting, and defragmenting
These maintenance tasks have different purposes:
- Expansion increases the virtual disk's maximum available capacity. It adds space that the guest can later assign to a partition and filesystem.
- Compacting attempts to reclaim unused physical storage on the host by reducing the space occupied by suitable parts of a virtual disk file. It does not increase guest capacity.
- Defragmenting rearranges data to reduce fragmentation. It does not increase the virtual disk's maximum size and does not replace partition or filesystem expansion.
Troubleshooting
The Expand option is unavailable
Likely causes include a VM that is not fully powered off, a disk that is mapped or mounted, existing snapshots, or a linked-clone relationship. Return the VM and disk to a supported state, confirm the correct disk, and retry.
VMware reports a larger disk, but the guest shows the old volume size
The guest may not have rescanned the disk, the added capacity may still be unallocated, or the partition and filesystem may not have been extended. Inspect the guest disk layout, locate the unallocated space, and complete the appropriate partition and filesystem steps.
Windows cannot extend the selected volume
Check whether the unallocated space is immediately adjacent to the volume. A different partition between them, or an unsupported disk arrangement, can prevent the built-in extension workflow. Review the layout before making any further changes.
Linux partition was enlarged but filesystem space did not change
Only the partition boundary may have changed. Run the filesystem-specific growth procedure, or complete the required LVM step, and then verify the mounted filesystem with df -hT.
The wrong disk may have been selected
Similar capacities and generic device names can cause confusion. Stop before making further changes and match the VMware disk to the guest disk using capacity, partition layout, filesystem type, and mount point.
Exam-relevant summary
- Expanding a VMware virtual disk increases its maximum capacity; it does not automatically resize a guest partition or filesystem.
- The guest sees the added capacity as unallocated space until a partition or volume is extended.
- Power off the VM, disconnect mapped or mounted disks, check for snapshots, and verify linked-clone restrictions before expanding.
- The supported expansion range is 0.001 GB through 2 TB, and the new size must be larger than the current size.
- Windows commonly uses Disk Management and requires suitable adjacent unallocated space.
- Linux may require a partition-table change followed by a filesystem-specific growth command.
- Always identify the correct virtual disk when a VM contains multiple disks and verify capacity from inside the guest afterward.
For a related reference in this course, see expanding a virtual hard disk.