VMware Cloud Community

Cannot open the disk or one of the snapshot disks it depends on - Failed to lock the file

Hello fellas,

i have a vm server with 3 VPS mounted on HD1 and a second HD with volume disk "backup.vmdk" only for backup.

what i need is, on config of each VPS attache this second virtual disk for backup proposes.

I was able to attach VPS1 to this virtual disk, using Add... (hardware tab).  BUT when i try to attach this same "backup.vmdk" to the second VPS2 i got an error.

So i Power off the VPS2 and the attach works, when i try to power On this vps2, i got another error and and don't Up.

Cannot open the disk  or one of the snapshot disks it depends on.

Failed to lock the file


2 Replies

Read this blog post for sharing VMDK between two machines: New method of enabling Multiwriter VMDK flag in vSphere 6.0 Update 1 (UI + API) | virtuallyGhetto

Davoud Teimouri - https://www.teimouri.net - Twitter: @davoud_teimouri Facebook: https://www.facebook.com/teimouri.net/
0 Kudos

Davoud - you seem to like one line answers - this is the second one in a very short time that makes me think that you do not really care about the results of your oneliners.
I do not think we need  posts of that category here.
OP did not d mentioned that he uses VMs with a guestOS that can handle shared disk access. The majority of guests can NOT handle shared disks safely.
So we have to assume that his guests are not prepared to handle parallel access at all.
Thats why we have to expect that your tip - assuming OP tries

it - will have the result in a corruppted filesystem on backup.vmdk.
Congratulations - that user will be cured from VMTN for a while ....
Was it so hard to write a responsible answer instead ?
ESXi does not allow that a normal vmdk is opened by more than one VM as that would normally corrupt the filesystem.
Only cluster-aware filesystems in special onfigurations would survive parallel access of more than one VM.
- Consider sharing the backup.vmdk via regular procedures like Windows-filesharing.
- Also consider that regular and frequent dismount by guest A and remount by guest B has to be very carefully scripted.
The known backuptools run into that issue regularly - while temporarily giving a Veeam backup-appliance for example direct access to a vmdk that has to be backed up - the mount/dismount routines fail and the results are snapshots that ant be cleaned up and sometimes also really serios problems.
Avoid scripting mount/dismounts - even the backuptool vendors have problems with this tasks.

Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...