VMware Cloud Community
haverer
Contributor
Contributor

Unable to access file <unspecified filename> since it is locked

Hi,

I am running 2 ESX Hosts. On each host I was running just the 1 virtual machine (both of which connect to disks on the same SAN). I have now created another Virtual Machine to run on each host (4 virtual machines in total, 2 virtual machines on each host).

I have added the virtual disks into my new VM's (by using option 'use an existing virtual disk'). However when I try to power on my new Virtual Machines I am presented with the error:

"Unable to access file since it is locked"

On Host 1, I have powered off the 'old' Virtual Machine incase it was holding onto some files. I then powered up my new virtual machine and it works! However, I then go to power on the 'old' Virtual Machine and this has the same error!!

AARGH!!

Reply
0 Kudos
30 Replies
mbx369
Enthusiast
Enthusiast

If I understand ur question correctly, actually that's the way it works.

Unless u are doing a raw device mapping & sharing the SCSI bus controller, the 2 VMs cannot share the same disks.

So if you need the 2 VMs to share the disks for things like cluster setup, then please use the raw device mapping method instead.

Hope this helps.






~~~~~ To Live Is To Die ~~~~~

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

Hi,

Yes one Virtual machine 1, the disks are setup as Raw Device Mappings and SCSI Bus Sharing is set to 'Physical'. On the new virtual machine I cannot set these up as additional Raw Device Mappings, they need to be created as "use an existing virtual disk" and SCSI Bus Sharing is None.

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

Hi,

Can you set the bus sharing on the new VM as "Physical" as well?






~~~~~ To Live Is To Die ~~~~~~

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

No, when I try to set it to Physical it errorsL

Device 'SCSI Controller 1' is a SCSI Controller engaged in bus sharing

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

If my guess is right, the 1st VM is not powered off ya?

Both VMs have to be powered off to configure the RDM.

Let me know if that works.






~~~~~ To Live Is To Die ~~~~~

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

Hi, no I had powered off both VMs before adding the RDM. Still saying a file is locked

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

u mean u did:

1) power off both the VMs

2) add RDM on 1st VM, physical bus sharing

3) add RDM, existing disk on 2nd VM, physical bus sharing

4) Able to power on only one of the VMs at one time.

Is this correct?

Both the bus sharing have to be "physical" sharing.

Are you able to set that on the 2nd VM while both VMs are powered off?

If you can't try again, delete the bus and retry.

By the way, the bus for sharing RDM disks have to be a separate one from the one that is assigned to the non-sharing disks.

Example, disk1 = C drive, no sharing on bus #1. disk2 = quorum disk, sharing on bus #2.






~~~~~ To Live Is To Die ~~~~~

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

Yes, that is correct.

Q:Both the bus sharing have to be "physical" sharing. Are you able to set that on the 2nd VM while both VMs are powered off?

A: No

The setup is:

Disk 1 C:\ (Virtual Disk) No Bus Sharing

Disk 2 Q:\ (Raw Device Mapping) Physical Bus Sharing

However on the SCSI Controller 2 (for the 2nd VM) I cannot set SCSI Bus sharing to physical. Returns an error:

Device SCSI Controller 2 is a SCSI Controller engaged in bus-sharing

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

Will it be possible if you could upload a screenshot of the "edit settings" window for both VMs?






~~~~~ To Live Is To Die ~~~~~

VCP3&4

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

Sure. Have uploaded them now. Thanks

Reply
0 Kudos
haverer
Contributor
Contributor

Sure, have uploaded now. thanks

Reply
0 Kudos
haverer
Contributor
Contributor

Yeh sure, uploaded now. Many thanks

Reply
0 Kudos
haverer
Contributor
Contributor

Do you think that if, perhaps, I shut down the Virtual Machine that is on the other host this may free up any locks on the SAN and then I can add my new virtual machine disks and set SCSI to 'Physical'? I was just wondering if the other VM may be holding onto anything? Even though I have tried adding disks to the new VM that are NOT being accessed by any other VM

Reply
0 Kudos
haverer
Contributor
Contributor

Or even if I rebooted ESX Host 1 - perhaps any file locks would be released?

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

hmm, think the screenshot was not attached in ur last post.

I have 2 VMs with v-RDM. Do yours look like these?






~~~~~ To Live Is To Die ~~~~~

VCP3&4

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
haverer
Contributor
Contributor

I just tried changing all RDM SCSI Controllers on VM1 from Physical to None. I then tried changing all SCSI Controllers on VM2 (my new VM) from none to 'Physical' and it the 'engaged in SCSI bus sharing message' appeared again!

I then changed all RDM SCSI Controllers on VM1 from None back to Physical and no errors appeared.

Totally bamboozled...

Reply
0 Kudos
haverer
Contributor
Contributor

Sorry i have reposted the screenshots

Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

Bro,

will it be possible for you to:

1) Remove all RDM disks on VM#2, SCSI Controller #1 and 2. click ok.

2) Restart your mgmt-vmware services on both ESX servers.

3) Add the SCSI Controller #1 to VM#2. Try adding only 1 RDM disk first. Ensure that the disk is pointing to the correct SCSI device.

4) Power-on both VMs if (3) is ok.






~~~~~ To Live Is To Die ~~~~~

VCP3&4

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos
mbx369
Enthusiast
Enthusiast

Another thing, is either VMs having snapshots?






~~~~~ To Live Is To Die ~~~~~

VCP3&4

Please awards points if this was useful. :) ~~~~~ To Live Is To Die ~~~~~ VCP3/4/5
Reply
0 Kudos