VMware vSphere

 View Only
  • 1.  Cannot open the disk Failed to lock the file

    Posted Aug 22, 2013 08:20 AM

    Error when attempting to share a disk across two vm's.  I have two VM web servers and a shared disk for data, each web server has 20GB drives for OS and they share a 500GB drive for data.  I will be using OCFS2 clustered file system later.

    Both see the 500GB disk but when we power up both VM's the second throws the following error:

    "An error was received from the ESX host while powering on VM Myweb1.

    Cannot open the disk '/vmfs/volumes/MyWeb1/MWeb1.vmdk' or one of the snapshot disks it depends on.

    Failed to lock the file"

    I have read about this error before but cant find where and understand that it is either because I didnt configure them right to start with or that there is some extra config that I can do in the *.vmx flat files???

    Here is what we done when creating the VMs and sharing a disk, is there anything missing

    Create 2 New VMs for Web Servers with basic 40GB Disks for the OS then add a new hard disk to one of the VMs in vSphere BUT must be configured correctly for sharing across multiple VMs.

    So, Edit Settings > Add > Hard Disk > Create a new virtual disk > Choose size and choose "Thick Provision Eager Zeroed" > under "Virtual Device Node" choose a "SCSI (1:0)" then finish.

    After the disk has been zero'd out go back into "Edit Settings" > click the new SCSI controller 1 and choose "Physical" Virtual disks can be shared between virtual machines on any server.

    Edit the settings for the 2nd VM and choose add hard disk, choose existing, browse to where you created the disk for VM 1 , make sure you assign it the same SCSI (1:0).

    Many Many Many thanks for any help in advance



  • 2.  RE: Cannot open the disk Failed to lock the file
    Best Answer

    Posted Aug 22, 2013 10:37 AM

    Have you done below step on 2nd VM also

    After the disk has been zero'd out go back into "Edit Settings" > click the new SCSI controller 1 and choose "Physical" Virtual disks can be shared between virtual machines on any server.


  • 3.  RE: Cannot open the disk Failed to lock the file

    Posted Aug 22, 2013 10:59 AM

    Very good point I will give it ago

    Many thanks

    I will let you know if it works



  • 4.  RE: Cannot open the disk Failed to lock the file

    Posted Aug 22, 2013 11:21 AM

    Works

    Great!!!!

    Many Thanks