VMware Cloud Community
pentium4forever
Contributor
Contributor

FAILED: Unable to obtain the lock on virtual disks

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

20 Replies
daphnissov
Immortal
Immortal

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?

Reply
0 Kudos
admin
Immortal
Immortal

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

Reply
0 Kudos
UmeshAhuja
Commander
Commander

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

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
Reply
0 Kudos
POCEH
VMware Employee
VMware Employee

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

Reply
0 Kudos
Svnyster
Contributor
Contributor

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!

Reply
0 Kudos
RNhelp
Contributor
Contributor

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!

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee

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

HTH

Reply
0 Kudos
RNhelp
Contributor
Contributor

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?

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee

For better investigation upload log bundle.

Otherwise try to run UI as administrator.

HTH

Reply
0 Kudos
JimBurd
Contributor
Contributor

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.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee

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

Reply
0 Kudos
liberty123de
Contributor
Contributor

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

Reply
0 Kudos
goldeneye_007
Enthusiast
Enthusiast

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.

Reply
0 Kudos
goldeneye_007
Enthusiast
Enthusiast

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

Worthless.

Reply
0 Kudos
goldeneye_007
Enthusiast
Enthusiast

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

Reply
0 Kudos
50chickens
Contributor
Contributor

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.

Reply
0 Kudos
heapik
Contributor
Contributor

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.

Reply
0 Kudos
VASILIS1977
Contributor
Contributor

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

fgerber
Contributor
Contributor

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

Reply
0 Kudos