Shvakov64
Contributor
Contributor

Problem with starting a VM (locked file error)

Hello!

I cannot start a VM. Symptoms:

If you try to start a VM you get an error:

  • Failed to lock the file
  • Cannot open the disk '/vmfs/volumes/***/DEVELOPER.msltd.local/DEVELOPER.msltd.local.vmdk' or one of the snapshot disks it depends on.

Then I connect via SSH and check what is blocking the file:

vmfsfilelockinfo -p /vmfs/volumes/***/DEVELOPER.msltd.local/DEVELOPER.msltd.local.vmdk -v 192.*.*.* -u administrator@esxi.msltd.local 

System shows:

vmfsfilelockinfo Version 2.0
Looking for lock owners on "DEVELOPER.msltd.local.vmdk"
"DEVELOPER.msltd.local.vmdk" is not locked by any ESX host and is Free

The file is not locked!

After that I try to consolidate disks:

An error occurred while consolidating disks: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot

What happened before: a backup job was initiated via synology active backup. A snapchot was created on the disk where the VM is placed. It didn't finish properly, it ran out of space. After that a VM couldn't start, because of insufficient disk space. I deleted all the snapshots via snaphot manager. The VM didn't start, because the config file was pointing to a wrong vmdk file. I edited it manually. Now I get what is descibed at the beginning of the post. Please, HELP!

0 Kudos
3 Replies
Shvakov64
Contributor
Contributor

UPDATE:

I was able to start a VM after manually creating a snapshot. But after I try to consolidate SS i recieve the following error:

Consolidate VMDisks
Key

haTask-1-vim.VirtualMachine.consolidateDisks-1215370093

Description

Consolidate disk files of this virtual machine

Virtual machine:
State

Failed - Unable to access file since it is locked

Errors

 

  • An error occurred while consolidating disks: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot.

 

What could be done???

Tags (1)
0 Kudos
continuum
Immortal
Immortal

Hi

when you start the VM with the new snapshot - does it come up with the expected state ?

If yes - add a new disk with the same size and boot the VM into a Linux LiveCD.
Clone disk to disk with ddrescue.

If that does not work or if the state is outdated - call me via skype.
Hurry up - next week I am not available ....

Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
0 Kudos
Shvakov64
Contributor
Contributor

Thank you for your reply. I will try your method as soon as possible!

0 Kudos