To work around this issue:
- Power down the backup server, or remove the
.vmdkfrom the backup virtual appliance or the other virtual machine the disk is attached to. Warning: Do not select Delete option as it will result in data loss.
- Create a new snapshot of the affected virtual machine and then Perform a Delete All from the snapshot manager to consolidate all snapshots.
- If the delete succeeds, check the folder of the virtual machine to ensure that all the snapshots are consolidated.
- If the delete fails again with lock messages, determine which host still has a lock on the name-flat.vmdk or name-delta.vmdk file.
- If it continues to fail with lock messages, restart the management agents on the ESX/ESXi host where the virtual machine is running.
- If you are unable to determine the process or virtual machine holding the lock on the file in the error, consider migrating the running virtual machines of the ESX host that is holding a lock and reboot.
Alternatively, if you are unable to reboot ESX host, you can consider cloning the disk in question and create a new disk.
To clone and attach the new disk back:
- Power off the virtual machine with the locked disk.
- Clone the latest snapshot disk (i.e. name-000003.vmdk) from the command line.
- Once clone is complete, remove the locked disk from the virtual machine using Remove from virtual machine option.
- Attach the cloned .vmdk as to the virtual machine and power it up.