Unable to delete the virtual machine snapshot due to locked files

Sharing is caring!

<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;"><span itemprop&equals;"articleBody">To work around this issue&colon;<&sol;span><&sol;p>&NewLine;<ol style&equals;"text-align&colon; left&semi;">&NewLine;<li>Power down the backup server&comma; or remove the <span itemprop&equals;"articleBody"><code>&period;vmdk<&sol;code><&sol;span> from the backup virtual appliance or the other virtual machine the disk is attached to&period;<span itemprop&equals;"articleBody"><&sol;span><b> Warning&colon;<&sol;b> Do not select Delete option as it will result in data loss&period;<&sol;li>&NewLine;<li>Create a new snapshot of the affected virtual machine and then Perform a <strong>Delete All<&sol;strong> from the snapshot manager to consolidate all snapshots&period; <b><br &sol;><&sol;b><&sol;li>&NewLine;<li>If the delete succeeds&comma; check the folder of the virtual machine to ensure that all the snapshots are consolidated&period;&nbsp&semi;<&sol;li>&NewLine;<li>If the delete fails again with lock messages&comma; determine which host still has a lock on the <span style&equals;"font-family&colon; Courier New&semi;"><i>name<&sol;i>-flat&period;vmdk<&sol;span> or <span style&equals;"font-family&colon; Courier New&semi;"><i>name<&sol;i>-delta&period;vmdk<&sol;span> file&period;<&sol;li>&NewLine;<li>If it continues to fail with lock messages&comma; restart the management agents on the ESX&sol;ESXi host where the virtual machine is running&period;&nbsp&semi;<&sol;li>&NewLine;<li>If you are unable to determine the process or virtual machine holding the lock on the file in the error&comma; consider migrating the running virtual machines of the ESX host that is holding a lock and reboot&period;&nbsp&semi;<a href&equals;"http&colon;&sol;&sol;kb&period;vmware&period;com&sol;selfservice&sol;search&period;do&quest;cmd&equals;displayKC&amp&semi;docType&equals;kc&amp&semi;docTypeID&equals;DT&lowbar;KB&lowbar;1&lowbar;1&amp&semi;externalId&equals;1013193" target&equals;"&lowbar;blank"><&sol;a><&sol;li>&NewLine;<&sol;ol>&NewLine;<p>Alternatively&comma; if you are unable to reboot ESX host&comma; you can consider cloning the disk in question and create a new disk&period;<&sol;p>&NewLine;<p>To clone and attach the new disk back&colon;<&sol;p>&NewLine;<ol>&NewLine;<li>Power off the virtual machine with the locked disk&period; <&sol;li>&NewLine;<li>Clone the latest snapshot disk &lpar;i&period;e&period; <span style&equals;"font-family&colon; Courier New&semi;"><i>name<&sol;i>-000003&period;vmdk<&sol;span>&rpar; from the command line&period;&nbsp&semi; <&sol;li>&NewLine;<li>Once clone is complete&comma; remove the locked disk from the virtual machine using <span itemprop&equals;"articleBody"><strong>Remove from virtual machine <&sol;strong>option&period; <&sol;span><&sol;li>&NewLine;<li>Attach the cloned <span style&equals;"font-family&colon; Courier New&semi;">&period;vmdk<&sol;span> as to the virtual machine and power it up&period; <&sol;li>&NewLine;<&sol;ol>&NewLine;<&sol;div>&NewLine;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.