vSphere 5.x Consolidation fails
I got a problem where a VM needs consolidation because of 90 delta files on the datastore. Consolidation is a new feature in vSphere 5.x, which merges all delta file into the base vmdk, althought they a not showing up in the Snapshot Manager. When I try to use Consolidate I got the following error message.
Unable to access file since it is locked
The fastest way to get rid of this message is to connect to the ESXi console with ssh and run the following command:
/sbin/services.sh restart
This command restarts the management Agents and releases the lock from the files. One cause of this problem is that the VMware host held a lock on that snapshot, typically due to a communication error between the host and the VC.