Reducing virtual disk (VMDK) size after accidental expansion
search cancel

Reducing virtual disk (VMDK) size after accidental expansion

book

Article ID: 440497

calendar_today

Updated On:

Products

VMware vSAN VMware vSphere ESXi

Issue/Introduction

 VMware vSphere does not support shrinking a virtual disk (VMDK) in-place. Once a disk is expanded via the vSphere Client or CLI, the provisioned size is updated in the VM configuration (.vmx) and descriptor files. This action cannot be reverted directly. This guide provides supported workarounds to reclaim space or correct the provisioned size of a VMDK.

Environment

 

  • VMware vSAN (All Versions)
  • VMware ESXi (All Versions)
  • Guest OS: Windows, Linux

 

 

Cause

This is a design limitation. The ESXi hypervisor is not aware of the Guest OS filesystem layout and cannot safely truncate a disk without risking data corruption

Resolution

 Before proceeding, ensure a full backup of the virtual machine is available.

 

Method 1: Using VMware vCenter Converter Standalone

  1. Download Broadcom support Portal.
  2. Launch the Convert Machine wizard for the impacted virtual machine.
  3. In the Data to copy section, select Edit.
  4. Specify the desired destination disk size.
  5. Complete the conversion and power on the new virtual machine to verify data integrity.

Method 2: Manual Data Migration

  1. Add a new VMDK of the correct size to the Virtual Machine.
  2. Initialize and format the new disk within the Guest OS.
  3. Copy all data from the oversized disk to the new disk using tools such as rsync (Linux) or Robocopy (Windows).
  4. Unmount the old disk from the Guest OS.
  5. Remove the oversized VMDK from the VM hardware configuration and delete it from the datastore.

Note: If the virtual disk is thin-provisioned and the additional capacity was never initialized or partitioned within the Guest OS, the expansion has no impact on physical datastore consumption.

Additional Information

 

 

Growing, thinning, and shrinking virtual disks in ESXi

VMware vCenter Converter Standalone 9.0 Release Notes 

Product Interoperability Matrix- VMware standalone converter