After some testing with Veeam backup and Replication i noticed the following warning in my vSphere Web client


Virtual Machine consolidation Needed

So looked simple enough and i right clicked the VM and navigated to snapshot -> consolidate. But that would have been to easy.

the detail error says the file was locked.


First i did some basic steps

  • Took an new snaphost
  • deleted the snaphost again. hoping that it would delete corretly now.
  • tried consolidatin again. but still the same error
  • tried migrating the vm but not available at the moment.

Nothing worked. so after searching the web i found that you need to restart the hostd service on the esxi server

/etc/init.d/hostd restart

make sure you move all your running vm’s to another host. in my case it was my home lab, so i just shut down all VM’s and run the above command in an shh terminal (example putty)
After that you can consildate the VM without any problems

Turns out that the backup software (in my case Veeam Backup and Replication) creates a lock during the backup/snapshot but didnt release it correctly.