Error removing vmdk from a VM: "Invalid configuration for device '0'"
search cancel

Error removing vmdk from a VM: "Invalid configuration for device '0'"

book

Article ID: 375284

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When attempting to remove a hard disk from the virtual machine, an error message stating “Invalid configuration” is encountered.

The error indicates that one of the parent disks is included in a snapshot of the virtual machine.

"Invalid configuration for device '0'. Cannot remove virtual disk from the virtual machine because it or one of its parent disks is part of a snapshot of the virtual machine"

In environments where the target VM is a vCenter Server Appliance (VCSA), consolidation attempts may cause the management interface to freeze or become unresponsive (ping drops) before failing with an "Unable to access file since it is locked" error. This typically indicates that orphaned snapshots are being held by a third-party backup process

Environment

VMware vSphere ESXi 6.x

VMware vSphere ESXi 7.x

VMware vSphere ESXi 8.x

Cause

The affected VM will reference the snapshot vmdk.

It's a recognized issue that a snapshot VMDK cannot be deleted without consolidation if one or more of its parent disks are included in the virtual machine's snapshot.





This condition frequently occurs when a backup proxy VM (e.g., Veeam) utilizing "HotAdd" transport mode fails to unmount the disks after a backup job. If a storage outage or backup failure occurs, the proxy retains a Read-Only lock on the base disks. This creates a metadata conflict: the proxy cannot release the disk because it is part of an active snapshot chain, and the target VM cannot consolidate because the proxy holds a lock.

Resolution

First, we need to consolidate the snapshots of the virtual machine.

Consolidation integrates the changes between snapshots and the previous delta disks into the base parent disk, merging them with the base virtual machine disk.

Once the consolidation is complete, we will be able to successfully remove the disk from the virtual machine.

Additional Information

You may came across similar below error when you try to remove the disk from backup proxy server for disk consolidation issue. 

   "Invalid configuration for device '0'. Cannot remove virtual disk from the virtual machine because it or one of its parent disks is part of a snapshot of the virtual machine"

As workaround you can follow the below steps: 

  • Power off the Proxy server and then attempt to consolidate the disks on the target virtual machine.
  • After consolidation is successful, remove the affected VM disk from the backup proxy server configuration.
  • If disk removal via the UI fails (e.g., repeating the "Invalid configuration" error), the disk can be manually removed by editing the Proxy VM's .vmx file to delete the orphaned disk entries.

For vCenter Server Appliances, it is a Broadcom best practice to utilize Native File-Based Backup (VAMI) instead of image-based snapshot backups to avoid "stuns" and stale "HotAdd" locks.