Failed to Power On the vm as the “File is locked”

Found an issue today , as the vm was failing to power on. There were no changes made to it.

Saw that there some kind of HA failure on the vm, however the lock on the disks was coming from the same host.

After further findings, saw that the same vmdk was attached to the vm twice as SCSI 0:0 and SCSI 0:1. Removed SCSI0:1 and the problem was solved .

However, question was how did it happen ? Tested it in my lab.

Actually, the UI does allow to add the same disk to the vm multiple times once the vm is in a power off state. Believed this behavior should be changed and a check should be done while adding the disks.

snap1 snap2

Happy Thinking 🙂