
This is common with backup software like Veeam.
At this stage, you may find, like me another server has mounted the VMDKs and that why a lock exists. Run a list open files with the name of your server. In your vCenter, find the host with that mac address. "servername_1-flat.vmdk" is locked in Read-Only mode by host having mac address. Eventually you should see an alternative mac address, different to the one listed above. "servername_1-000004-delta.vmdk" is locked in Read-Only mode by host having mac address. "servername-000001-delta.vmdk" is locked in Read-Only mode by host having mac address. You will see lots of locks associated to a mac address on the host that the VM currently resides.
ls | while read x do vmfsfilelockinfo -p $x| grep -i "is locked" done. ls | while read x do vmkfstools -D $x| grep -i "is locked" done. Check to see what locks are applied to the files in that directory. List the contents of that directory to see what pain you have to go through. Change to that directory found in the above command. SSH on to the host where the VM is running and log in as root. So I did what I haven’t done in a long time and put a ticket in, and the next day a lovely man called Ramy from VMware called me and resolved it incredibly quickly. I half expected Pat Gelsinger to turn up, but nope – he didn’t. Unbelievably, none of them work, not even that last one. Wait until the moon is full, stand on your head and pray for the VMware Gods to save you. Shutdown the VM, take a snapshot, delete all the snapshots, power it on and consolidate. vMotion to another host and try and consolidate.
So you do what every good techie does and Google it right? You’ll come across all number of solutions: But what if it doesn’t work and you get something like the error below: You will no doubt just right-click on the VM > Snapshots > Consolidate and vSphere does its magic and fixes it.
So if you’ve got a warning on your vCenter (6.5 U3) against a particular VM that looks something like this: Had a problem recently where I had a VM with a lot of snapshots which somehow failed to get noticed, so following a vCenter upgrade it lit up like a Christmas Tree! So here is how it was fixed with the help from a very kind man at VMware Support