"Invalid configuration for device '0' error when removing a VMDK from Backup Proxy VM
search cancel

"Invalid configuration for device '0' error when removing a VMDK from Backup Proxy VM

book

Article ID: 375284

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

An error is encountered when attempting to remove a hard disk from a virtual machine. 

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

  • Additionally, the failure may be accompanied by the following lock violation error: Unable to access file since it is locked

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 7.x

VMware vSphere ESXi 8.x

Cause

The affected virtual machine references a snapshot VMDK. A backup proxy virtual machine utilizing "HotAdd" transport mode has failed to unmount the disks following a backup job.

Consequently, a Read-Only lock is retained on the base disks by the backup proxy. A metadata conflict is created where the proxy cannot release the disk because it remains part of an active snapshot chain, and the target virtual machine cannot consolidate because the proxy actively holds a lock on the underlying files.

Resolution

The following steps must be executed to manually unmount the disks from the backup proxy virtual machine:

  1. Verify that no active backup jobs are currently targeting the affected virtual machine.

  2. Inspect the hardware configuration of the backup proxy virtual machine. Identify if any virtual disks belonging to the affected virtual machine are currently mounted to the proxy.

  3. Attempt to safely unmount the identified virtual disks from the backup proxy virtual machine. (Ensure the option to delete files from the datastore is strictly avoided). This action is required to release the file lock on the base virtual disks.

  4. If the unmount operation is successful: Initiate a snapshot consolidation task on the affected virtual machine to clear the remaining snapshot files.

  5. If the unmount operation fails: An attempt to unmount the locked disk directly from the proxy may fail with the Invalid configuration for device '0' error. If this occurs, the following sequence must be executed to bypass the error:

    1. Power off the backup proxy virtual machine.

    2. Initiate a snapshot consolidation task on the affected target virtual machine.

    3. Once the snapshot consolidation is verified as successful, safely remove the affected virtual disk from the hardware configuration of the powered-off backup proxy virtual machine.

    4. If disk removal via the vSphere Client interface continues to fail, the disk must be manually detached by modifying the backup proxy virtual machine's .vmx configuration file to remove the associated disk entries. (Refer to KB- 339996)

Additional Information

Note: For vCenter Server Appliance (VCSA) environments, utilizing Native File-Based Backup via the Virtual Appliance Management Interface (VAMI) is the recommended best practice. This method mitigates the risk of environment stuns and stale HotAdd transport locks associated with image-based snapshot backups.