VMware Disk Consolidation unable to access file since it is locked
I wanted to write up a quick post concerning an error I received recently with consolidating disks on a few VMs. Disk consolidation is needed when snapshot disks fail to compact after a Delete or Delete All operation or if the disk did not consolidate. Sometimes a snapshot deletion doesn’t commit back to the base disk. I had this warning in the summary of a particular VM I was working with recently. However, when running the consolidate operation an ominous error presented – VMware disk consolidation unable to access file since it is locked. Let’s take a look at this issue and how it was resolved in my case.
VMware Disk Consolidation unable to access file since it is locked
As mentioned above, in logged into the web client recently I saw a virtual machine that was presenting with the warning that Virtual machine disks consolidation is needed. In looking at the issue initially my suspicion is the deltas were not committed in a backup software run that went down dirty perhaps.
Most know where to find this, but in case you didn’t know, you have the Consolidate option under your Snapshots menu. Here you see it greyed out as this particular VM doesn’t need disk consolidation.
The error I ran into was the below error. When I kicked off the Consolidate process, it came back with a Unable to access file since it is locked error.
Resolution
There is a pretty helpful VMware KB article on Unable to delete the virtual machine snapshots issue. One of the troubleshooting steps therein was to restart the management agents on the particular host the VM is running on. It can be that the host has a lock on the disk files in question. Thinking this could be the culprit, this is exactly what I did. You can do this from the command line of the ESXi host itself by running the command:
services.sh restart
After restarting the management agents of the host the particular VM was running on, I was able to successfully run the consolidation process and delete the delta disks.
Tidak ada komentar:
Posting Komentar