Unable to Configure VM Disk: “Data capacity cannot be zero” Error
search cancel

Unable to Configure VM Disk: “Data capacity cannot be zero” Error

book

Article ID: 437640

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vSphere ESXi 8.0

Issue/Introduction

Virtual machine (VM) is unable to reconfigure, such as adding or removing devices because the virtual hard disk (HDD) is reported as having 0 MB capacity.

While saving the VM configuration gives a message: "Data capacity cannot be zero"

Environment

  • VMware vSphere ESXi 8.0.x

  • VMware VCF 9.x

  • VMware vCenter 8.0.x

Cause

This issue occurs when vSphere cannot validate a virtual disk because one or more associated VMDK files are reported as 0 MB in size, subsequently blocking any configuration changes to the virtual machine typically triggered by an underlying storage or file-level inconsistency.

Resolution

In such scenarios, the virtual disk cannot be properly interpreted, which results in failures when attempting to save or modify the VM configuration, regardless of the VM’s power state.

As a workaround, it is recommended to remove (detach) the affected disk and then save the configuration before proceeding further.

Before performing the steps below, ensure that a valid and recent backup or snapshot of the affected virtual machine is available. Additionally, verify datastore accessibility and confirm that sufficient free space exists to avoid further inconsistencies during the process.

  1. Power off the virtual machine.

  2. Right-click the VM and select Edit Settings.

  3. Identify the affected hard disk and click the “X” icon to remove it. Ensure that the option to delete the disk files from the datastore remains unchecked.

  4. Save the changes and exit the settings.

  5. Reopen Edit Settings for the same VM.

  6. Click Add New Device and select Existing Hard Disk.

  7. Browse to the virtual machine’s datastore folder and attach the appropriate VMDK file.

  8. Save the configuration and power on the virtual machine.

  9. Verify that the VMDK now shows the correct size in both vCenter and the ESXi Host Client.