VMware vSphere

 View Only
Expand all | Collapse all

FAILED: Unable to obtain the lock on virtual disks

  • 1.  FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 08, 2018 01:02 AM

    Hello,

    Several years back I successfully converted a physical machine to a virtual with VMware's converter standalone tool. That was several versions back obviously. Now, I am trying to do the same thing and failing. I have been looking to see why it is happening.

    FAILED: Unable to obtain the lock on virtual disks.

    This is the error I am getting above.

    Any advice is welcome. Verion of converter is 6.2.0 build-7348398

    Thanks,

    Nick



  • 2.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 08, 2018 02:37 AM

    With that error it sounds like you're trying to convert a powered-on virtual machine to another format. Can you provide more information on what you have and what exactly you're trying to do here?



  • 3.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 08, 2018 05:43 AM

    Is seems as though the problem is  the lock files. Could you please confirm what  you are trying to do  P2V or V2V ?

    can you attache VMware Converter log here to do further investigation .

    Regards,

    Randhir



  • 4.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 08, 2018 06:06 AM

    Hi,

    Might be some of this reasons behind the issue you have mention

    – Shut down the VM before conversion

    – Try the live conversion by Powered-on machine

    – The VM was not shut down safely, restart and shut down it properly

    – Delete all .TMP files associated with the virtual disk

    – Delete all .WRITELOCK files associated with the virtual disk

    – Delete all .LCK folders associated with the virtual disk



  • 5.  RE: FAILED: Unable to obtain the lock on virtual disks

    Broadcom Employee
    Posted Jan 08, 2018 08:16 AM

    This is because of rights of share folder and used credentials, could you describe the share rights and used user rights?

    As fast solution try to give to share "everyone" full control and try again.

    HTH



  • 6.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 13, 2018 08:31 PM

    I was experiencing the same issue.  The "Unable to obtain the lock on virtual disks" error occured after selecting the source machine and during the "retrieving source machine information" phase.

    POCEH​ had the correct solution for me.  My VM datastore is located in an NFS share with restricted access except for my ESXi hosts.  After granting permission to the machine running the converter, I was able to complete the conversion setup and the conversion is currently running.  Thanks for your help!



  • 7.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 15, 2018 08:23 AM

    I'm recieving the same notification whilst trying to P2V convert a server.

    The same settings did work on a Client(P2V as a test), but when i use the powered on option on a windows 2008 server i also recieve the 'Unable obtain the lock on virtual disks'.

    The server was up and running while recieving the notification.

    Any suggestions?

    Thanks in advance!



  • 8.  RE: FAILED: Unable to obtain the lock on virtual disks

    Broadcom Employee
    Posted Jan 15, 2018 08:26 AM

    Check (and fix) permissions on shared folder. For less troubles add full access to everyone for share.

    HTH



  • 9.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 15, 2018 09:24 AM

    Thanks for the reply!

    The permissions on the shared (destination) folder, were changed to full access.

    Yet i still recieve the same notification.

    Any other suggestions?



  • 10.  RE: FAILED: Unable to obtain the lock on virtual disks

    Broadcom Employee
    Posted Jan 15, 2018 09:47 AM

    For better investigation upload log bundle.

    Otherwise try to run UI as administrator.

    HTH



  • 11.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Jan 22, 2018 06:41 AM

    I'm getting the same message.  Also running Converter 6.2. 

    I'm attempting to convert an ESXi 5.1 VM to VMPlayer v7/12.  The VM is powered off on the ESXi server.  I'm running the Convert GUI on a windows machine, logged in as Administrator.  I'm copying the VM to a Windows network share. 

    There are no lock files, or anything else that looks out-of-place on the datastore.  I'm attaching the log files, and a screen shot of the datastore.

    Update: I ran it once more, attempting to copy to a local disk, and this time it worked.  This is very strange, as I'm logged in (and running the Converter) as Administrator on the Windows box, and I have full permissions on the network share.  (I created and deleted files in Windows Explorer, just to be 100% sure.)  But something about it seems to be messing up the conversion job.



  • 12.  RE: FAILED: Unable to obtain the lock on virtual disks

    Broadcom Employee
    Posted Jan 22, 2018 08:05 AM

    It's all about permissions of share:

    2018-01-21T23:01:01.628-07:00 warning vmware-converter-worker[09816] [Originator@6876 sub=Default] [,0] FILE: FileIO_Lock on '\\JMB-6\VM Images\esx-Win10-test (converted)\esx-Win10-main\esx-Win10-main.vmdk' failed: Lock timed out

    I've suggest to add full permissions to everyone on "\\JMB-6\VM Images", also check for sufficient volume securities if share is on NTFS.

    HTH



  • 13.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Feb 02, 2018 02:25 PM

    It´s very simple: Add permission r/w for user "__VMware_Conv_SA__" to destination folder.



  • 14.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Feb 13, 2018 10:11 PM

    I will also chime in that this is not working for me either.

    I have added Everyone and VM_Conv_SA users to the share with full rights.

    The job is logged in as Administrator on both client and server.

    It creates a folder for the VM on the server, creates a .vmdk and a .vmx file

    and a folder labelled, testpc.vmdk.lck. Inside are two .lck files. Then the job

    exits with "Unable to obtain the lock on virtual disks". The above mentioned files

    are then deleted.

    The remote system is a powered on windows 10 PC with a locally deployed agent.



  • 15.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Feb 14, 2018 12:20 AM

    Well,5 hours of $#@% with this. I could have rebuilt it from scratch by now.

    Worthless.



  • 16.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Feb 14, 2018 10:17 PM

    I believe the issue to be in this instance, the motherboard chipset is nVidia nForce.

    The converter software is not able to retrieve complete disk information which may be

    a Windows issue. nForce is not a supported Windows 10 chipset, but a machine so

    upgraded will continue to function using the previously installed chipset drivers.

    I have seen other disk related issues surrounding nForce machines updated to Windows 10.

    This is what I am seeing in the log.

    2018-02-14T16:15:59.265-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Parsing \\Vm1\u\demo1\demo1.vmx
    2018-02-14T16:15:59.281-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] [BaseDiskSetComputer::OpenDiskSet] Will use open retries count 3
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] Disk number 1 has been skipped because of errors while reading partition table
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] Disk number 1 has been skipped because of errors while reading dynamic disks header or LDM database is corrupted
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] [MoveActiveDiskIfNeeded] GetFirstBootDisk failed, mntapi error: 176
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] Partition:Invalid sector magic number.
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] Partition:Invalid sector magic number.
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] [PopulateCapabilities] Volume-based cloning was disabled due to: <no volumes are recognized>
    2018-02-14T16:15:59.314-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] [LogMessagesForQA] System volume is not detected.
    2018-02-14T16:15:59.314-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] [BaseComputerImpl::Open] Config file: \\Vm1\u\demo1\demo1.vmx
    2018-02-14T16:15:59.314-05:00 warning vmware-converter-worker[03864] [Originator@6876 sub=Default] Partition:Invalid sector magic number.
    2018-02-14T16:15:59.316-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ---------------------------
    2018-02-14T16:15:59.316-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ....Creating MBR Partition Table ....
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ..... Partition Entry: 0 .....
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] .....Current Partition Offset 0: .....
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Boot Indicator: 0X80
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Partition Type Id 0X7
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Starting Head 32
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Starting Sector 33
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Starting Cylinder 0
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Ending Head 45
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Ending Sector 63
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Ending Cylinder 1023
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Relative Sectors 2048
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] ...Total Sectors 124119040
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] --------------------------
    2018-02-14T16:15:59.317-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Partition 0: offset: 0
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Disk signature found 489802585, disk size in sectors 124125184, sector size 512
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Partition found type HPFS/NTFS(7) name:HPFS/NTFS start:2048 size:124119040 attribs:0x0 active primary 
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Disk with signature 489802585, recognized partitions 1
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] TargetVmManagerImpl::PartitionTargetDisks: Target Disk Id: disk-5
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] TargetVmManagerImpl::PartitionTargetDisks: Source volume Id: \WindowsBitmapDriverVolumeId=[59-CB-31-1D-00-00-10-00-00-00-00-00] Target Volume Id: 95;,13=10000010000000000
    2018-02-14T16:15:59.320-05:00 info vmware-converter-worker[07292] [Originator@6876 sub=ThreadPool] Thread enlisted
    2018-02-14T16:15:59.322-05:00 info vmware-converter-worker[03864] [Originator@6876 sub=Default] Scheduled timer canceled, StopKeepAlive succeeds
    2018-02-14T16:15:59.391-05:00 info vmware-converter-worker[03856] [Originator@6876 sub=Default] Stopped impersonating in session 52b8335a-5624-fccb-77e6-f9ab9d4dfed8
    2018-02-14T16:15:59.391-05:00 info vmware-converter-worker[03856] [Originator@6876 sub=Default] Session is closing, releasing cached session objects



  • 17.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Feb 21, 2018 10:28 PM

    this maybe a solution for some people. i installed the converter on a physical server. when writing the image out to a local disk it all worked ok, but when i specified the target as a unc path (eg \\server\share) i got the 'unable to obtain lock on virtual disk' error. eventually i found the solution as changing the vmware converter server and worker services to run under a domain account that had permissions to the unc share and path (eg, permissions on the share, and permissions on the filesystem on that share) rather than localsystem. once i did that the export worked fine.

    the odd part is if you run the converter on a third party (eg your workstation) and then try and convert a remote machine, it asks you for credentials that have access to the remote share. this does not work (in my case). i think it's because the kerberos delegation is not enabled on the AD object for the target computer account so the account you specified cannot be impersonated.



  • 18.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Mar 21, 2018 10:37 PM

    Hi,

    I have the same issue, trying to convert phy machine to remote location which is smb share ... I have mounted the share as VM_Conv_SA user... but its still failing with error Unable to obtain the lock on virtual drive. I do not use AD. Is this normal? why you are not providing what users are required to that .. this is pretty solid stupidity of VMware to provide a software for a conversion which is partially black box or doesn't work.



  • 19.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Mar 28, 2018 11:46 AM

    I had the same problem..i chose from the options in vcenter the virtual hdd as pre-alocated and now the conversion has started. My problem solved but error again at 98%

    https://prnt.sc/ixi4jb



  • 20.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Apr 14, 2018 10:24 AM

    I set the permission on the destination-share to everyone-full access and then it worked.



  • 21.  RE: FAILED: Unable to obtain the lock on virtual disks

    Posted Dec 13, 2018 12:02 PM

    Run VMware Vcenter Converter like Administrator. Run -> as-> Administrator.