Dynamically Increase a Virtual Disk Size in VMware ESXi and vSphere
Learn how to expand a running VMware virtual disk, rescan Windows or Linux storage, extend partitions and file systems, and validate the new capacity safely.
Expanding a VMware virtual disk is a two-stage operation. First, increase the virtual disk's configured capacity in vSphere. Then, use the guest operating system's storage tools to extend a partition, volume, and file system into the newly available space.
This procedure increases capacity only. It does not shrink a virtual disk, automatically extend a guest partition, or automatically make the new space usable by an application.
Virtual Disk Expansion Concepts
A virtual disk is the storage device presented to a virtual machine. Its VMware backing is commonly a VMDK, the virtual disk file format used to store the disk on a datastore.
Dynamic expansion, also called hot-add or hot-resize, means increasing the virtual disk while the VM remains powered on. The operation changes the capacity presented by VMware; it does not immediately change the guest's partition or file-system size.
| Layer | What changes | What you must do next |
|---|---|---|
| vSphere virtual hardware | The selected virtual disk receives a larger provisioned capacity. | Save the VM hardware change and verify the new size. |
| Guest disk | Windows or Linux detects additional capacity, usually as unallocated space at the end of the disk. | Rescan or refresh storage if necessary. |
| Partition, volume, or LVM | The storage container is enlarged to occupy the added space. | Extend the correct partition, physical volume, or logical volume. |
| File system | NTFS, ReFS, ext-family, XFS, or another file system is grown. | Verify usable capacity and application operation. |
Thin provisioning allocates datastore space as data is written. Thick provisioning reserves datastore capacity for the configured disk size. Therefore, expanding a thick disk may consume datastore capacity immediately, while a thin disk may consume more capacity later as the guest uses the new space.
Requirements for Online Expansion
For the described hot-expansion workflow, the VM is powered on and the disk is a supported flat disk using persistent mode. The VM must not have snapshots, and the administrator must have sufficient privileges to edit virtual hardware. The backing datastore must also have enough free capacity.
| Requirement | Why It Matters | How to Verify | Action If Not Met |
|---|---|---|---|
| Powered-on VM | Hot-resize is an online hardware operation. | Check the VM power state in the vSphere inventory. | Confirm that the guest and application support online storage changes. |
| Supported disk layout and mode | The documented procedure expects a flat disk in persistent mode. | Inspect the virtual disk configuration and compatibility settings. | Use an appropriate offline, migration, or rebuild strategy if unsupported. |
| No snapshots | Snapshots prevent the stated online disk-growth procedure. | Review the VM's snapshot manager and task history. | Safely remove or consolidate snapshots according to your change process. |
| Virtual hardware privileges | Editing the disk requires appropriate vSphere permissions. | Confirm the account's VM configuration privileges. | Request the required permission or use an authorized account. |
| Datastore capacity | The datastore must accommodate the allocation policy and growth. | Check free space, disk provisioning, and storage alarms. | Free space, add datastore capacity, migrate storage, or revise the plan. |
| Guest support | The OS, partition scheme, file system, and applications must support the extension. | Check guest documentation and inspect its storage layout. | Schedule downtime or use a different storage migration method. |
Pre-Expansion Checks
- Identify the VM. Confirm the inventory object, business owner, application, and maintenance authorization.
- Identify the disk. Match the disk number, SCSI controller and device position, datastore location, backing VMDK, and current capacity. On a VM with several disks, do not rely on capacity alone.
- Inspect snapshots. Do not begin the stated hot-expansion process while snapshots are present. Follow your backup and snapshot-removal process, then verify that consolidation has completed.
- Check the guest layout. Determine whether the target storage is a Windows volume, a Linux direct partition, or an LVM-backed logical volume. Confirm the file system and mount point or drive letter.
- Confirm application support. Some databases and applications require specific online-resize procedures, cache refreshes, or maintenance windows.
- Verify recovery readiness. Confirm that backups are recent and that recovery procedures are usable before changing storage.
- Assess datastore impact. Record whether the disk is thin or thick provisioned and calculate the potential increase in physical datastore consumption.
Expand the Virtual Disk in vSphere
- Open the vSphere Web Client and select the intended VM from the inventory.
- Open Edit Settings.
- Display the Virtual Hardware view.
- Locate the intended hard disk. Match its controller position, datastore, backing file, and current capacity with your pre-change notes.
- Enter a new capacity that is larger than the current capacity. A virtual disk expansion is generally a one-way increase; do not enter a smaller value.
- Save the change with Save or OK.
- Wait for the task to complete, then reopen the hardware settings or otherwise verify that the virtual disk reports the new provisioned capacity.
Rescan the Guest Operating System
Log in to the guest after the vSphere task completes. The operating system may detect the larger disk automatically, but a rescan or storage refresh may be required.
Confirm all of the following before extending anything:
- The disk identifier matches the disk changed in vSphere.
- The reported disk capacity is larger than before.
- The additional capacity appears at the end of the intended disk as unallocated or unpartitioned space.
- No unrelated disk has been selected.
If the guest still shows the old size, rescan its storage. Also check guest drivers, online-resize support, controller configuration, and the vSphere task result before repeating the operation.
Extend a Windows Partition and File System
Using Disk Management
- Open Disk Management in the guest.
- Locate the disk by number and compare its capacity with the vSphere disk. Identify the intended volume by drive letter, label, and file system.
- Confirm that unallocated space is directly after the target partition.
- Right-click the target volume and choose Extend Volume.
- Use the wizard to select the amount of unallocated space, then complete the operation.
- Refresh the view and confirm that the volume reports the expanded size and the expected NTFS or ReFS file system.
Using DiskPart
DiskPart is a command-line utility for managing Windows disks, partitions, and volumes. The following example is for identifying the target volume and extending it:
diskpart
list disk
select disk <number>
list volume
select volume <number>
extend
exitCheck every selection before running extend. DiskPart acts on the selected object, so selecting the wrong disk or volume can cause an unintended change.
Windows Extension Constraints
- Extend Volume unavailable: The unallocated space may not be contiguous and immediately after the target partition, or the wrong volume may be selected.
- Noncontiguous free space: Windows cannot always extend a volume across another partition. Use an approved partition redesign, migration, or backup-and-rebuild approach rather than moving partitions casually.
- Unsupported layout: System, recovery, dynamic-disk, encryption, and other layouts may impose additional requirements.
- System volume: Extending a boot or system volume requires extra care, including recovery planning and confirmation that the partition layout supports the change.
Extend a Linux Partition and File System
Linux storage can be arranged as a file system directly on a partition or as several layers using LVM. Identify the actual layout before changing it.
lsblk
fdisk -l
df -hlsblk shows block devices, partitions, and mount relationships. fdisk -l reports partition tables. df -h reports mounted file-system capacity. Use these outputs together to identify the correct disk, partition, logical volume, and mount point.
Direct-Partition Layout
In a direct-partition layout, a partition contains the file system without an LVM layer. The general sequence is:
- Rescan the disk and confirm that the device has the new size.
- Extend the correct partition with a suitable partitioning utility such as
partedorfdisk. Preserve the partition's original starting sector or alignment. - Ask the kernel to reread the partition table, for example with
partprobe, if required. - Grow the file system with the utility appropriate to its type.
- Verify the block device and mounted file system.
For an ext-family file system, the growth command commonly resembles:
resize2fs /dev/<partition>For XFS, grow the mounted file system by specifying its mount point:
xfs_growfs <mount-point>Partition-table changes require care. A partitioning command that recreates a partition with a different starting sector can make existing data inaccessible. Ensure backups and recovery procedures are available, and use a tool and method appropriate to the partition table and operating system.
LVM-Backed Layout
LVM, or Linux Logical Volume Manager, adds storage layers: a physical volume belongs to a volume group, and a logical volume is allocated from that group. A common expansion sequence is:
- Expand the underlying virtual disk in vSphere and rescan Linux.
- Extend the partition that contains the LVM physical volume, if the physical volume occupies a partition rather than the whole disk.
- Resize the physical volume so LVM can use the new partition or disk space.
- Extend the logical volume.
- Grow the file system on the logical volume.
- Verify the disk, physical volume, volume group, logical volume, and mounted file system.
Representative commands are:
lsblk
fdisk -l
partprobe
pvresize /dev/<partition-or-disk>
lvextend -L +<size> /dev/<volume-group>/<logical-volume>
resize2fs /dev/<volume-group>/<logical-volume>
df -hFor XFS on an LVM logical volume, use the mounted path instead of resize2fs:
xfs_growfs <mount-point>The exact device path, logical-volume name, size syntax, and partition operation depend on the installation. Confirm the file-system type with the guest's storage information before choosing a growth utility. Some LVM tools can grow a file system automatically, but performing and verifying each layer separately makes troubleshooting clearer.
| Guest Type | Detect New Capacity | Partition or Volume Action | File-System Action | Verification |
|---|---|---|---|---|
| Windows | Refresh Disk Management or rescan disks. | Extend the target volume into contiguous unallocated space. | Disk Management or DiskPart normally extends the supported file system with the volume. | Check disk size, volume size, drive letter, and NTFS or ReFS status. |
| Linux direct partition | Use lsblk, fdisk -l, and partprobe as needed. | Enlarge the correct partition with parted or fdisk. | Use resize2fs for ext-family systems or xfs_growfs for XFS. | Compare block-device output with df -h. |
| Linux LVM | Rescan and inspect the disk and partition. | Extend the partition if needed, run pvresize, then run lvextend. | Grow the ext-family or XFS file system using its specific utility. | Verify each LVM layer and the mounted file system. |
| Platform | Tool | Primary Purpose | Typical Use Case | Key Caution |
|---|---|---|---|---|
| Windows | Disk Management | Graphical disk and volume administration. | Extend a volume into adjacent unallocated space. | Check disk number, volume identity, and space contiguity. |
| Windows | DiskPart | Command-line disk, partition, and volume administration. | Scriptable or remote identification and extension. | Commands apply to the currently selected object. |
| Linux | lsblk | Display block devices and relationships. | Identify disks, partitions, and mount points. | It reports layout; it does not perform the resize. |
| Linux | fdisk or parted | Inspect and modify partition tables. | Enlarge a direct partition or an LVM-containing partition. | Preserve the original start and use a recovery plan. |
| Linux | pvresize | Make new space available to an LVM physical volume. | After the underlying disk or partition grows. | Target the correct physical volume. |
| Linux | lvextend | Increase an LVM logical volume. | Allocate free volume-group space to a logical volume. | Confirm the logical-volume path and available free extents. |
| Linux | resize2fs or xfs_growfs | Grow a file system. | Complete ext-family or XFS expansion. | Use the utility matching the actual file-system type. |
Validation and Operational Follow-Up
- In vSphere, verify the selected virtual disk's provisioned capacity.
- In the guest, verify the physical or virtual disk size.
- Verify the partition, Windows volume, LVM logical volume, or other storage container.
- Verify the mounted file system or drive volume reports the new usable capacity.
- Check application health, logs, database status, and monitoring alerts.
- Record the VM, disk identity, old size, new size, provisioning type, datastore, date, and operator.
- Monitor datastore utilization after the change, especially for thin-provisioned disks that consume space as data is written.
Common Failures and Resolutions
| Symptom | Likely Cause | Check | Resolution |
|---|---|---|---|
| The hard disk size cannot be edited. | Snapshots, unsupported disk mode or type, insufficient privileges, or unsupported VM configuration. | Check snapshots, disk characteristics, permissions, power state, and compatibility. | Resolve the snapshot state safely, obtain permissions, or use an offline or migration strategy. |
| The vSphere task completes but the guest shows the old size. | The guest has not rescanned, the wrong disk is being inspected, or online detection is unsupported. | Match controller position, disk identifiers, and capacities. | Rescan storage and investigate guest drivers or OS support. |
| The guest sees unallocated space but the volume is unchanged. | Only the VMDK was expanded. | Inspect the partition, volume, LVM, and file-system layers. | Complete the required extension at every remaining layer. |
| Windows Extend Volume is unavailable. | Free space is noncontiguous, the wrong volume is selected, or the layout has a limitation. | Review the complete disk layout and volume identity. | Use an approved redesign, migration, or rebuild approach if direct extension is impossible. |
| Linux partition extension succeeds but the file system remains unchanged. | The file-system growth command was omitted, the wrong target was used, or the wrong utility was selected. | Compare lsblk, mount information, file-system type, and df -h. | Run the correct file-system-specific growth procedure on the correct mounted storage. |
| Datastore capacity falls unexpectedly. | Thick allocation reserved space, thin disks consumed space as data was written, or several disks were expanded. | Review datastore usage, provisioning policy, and recent VM changes. | Add capacity, rebalance workloads, or adjust monitoring thresholds. |
Safety Limits and Exam Notes
- A virtual disk expansion is generally a one-way increase. Reducing a VMDK requires a separate migration, backup-and-rebuild, or replacement-disk strategy.
- Do not modify a disk based only on its size. Use disk number, controller position, datastore, VMDK identity, and guest mount or drive information.
- A vSphere-side increase does not automatically extend a guest partition or file system.
- Do not use the stated hot-expansion procedure while snapshots are present.
- Guest OS support, partition style, file-system type, encryption, LVM design, and application requirements can impose additional limitations.
- Remember the storage-layer order: VMware disk, guest disk, partition or physical volume, logical volume or Windows volume, then file system.
Practical Scenarios
Windows Server Data Volume
A running VM has a second VMDK containing a Windows data volume. Increase that specific disk in vSphere, refresh Disk Management, confirm unallocated space follows the target partition, and extend the volume with Disk Management or DiskPart. Validate the drive letter, file-system type, and reported capacity.
Linux Direct Partition
A Linux VM uses a partition directly formatted with an ext-family file system. Rescan the disk, enlarge the correct partition with a suitable partitioning utility, run partprobe if needed, grow the file system with resize2fs, and compare lsblk with df -h.
Linux LVM Volume
A Linux VMDK supplies an LVM physical volume, volume group, and logical volume. Expand the VMDK, rescan Linux, enlarge the containing partition if one exists, run pvresize, extend the logical volume with lvextend, grow the file system, and verify every layer.
Expansion Blocked by Snapshots
If a powered-on VM has snapshots and the disk cannot be enlarged, treat the snapshot state as a prerequisite failure. Follow the approved snapshot removal or consolidation process, verify completion, and retry only after the disk and VM meet the online-expansion requirements.