Failed to lock the file vmware что делать
I just took on a new position and new to VMWare. One of my VSpheres has this error streaming:
I know failing to lock a file means its in use. How do I find out what's using it?
I'm a little fuzzy (OK, a lot fuzzy) on the terms and their relation to each other. ESXi is the bit that makes the VMs on the physical box, and vCenter is the part that manages all the ESXi boxes? And then the vSphere Client connects to vCenter to let you administer all of it?? I have an app called VMWare Horizon Client. it seems to be something like Remote Desktop Manager?
Here's the different versions of things I can find. I probably need to update some components. I saw on one website that version 6.0 of . something? was end of life.
vSphere Web Client: Version 6.0.0 Build 3617395
vSphere Client: Version 6.0.0 Build 14472085
VMWare vCenter Server: Version 6.0.0 Build Build 3634793
VMWare ESXi: Version 6.0.0 Build 4510822
VMWare Horizon Client: 4.5.0 build-5650915
Tim_Myth
Popular Topics in VMware
16 Replies
scottbrindley
What's the type of storage ? Have you got any backups running or snapshots pending?
OP Tim_Myth
scottbrindley wrote:
What's the type of storage ? Have you got any backups running or snapshots pending?
The storage is a Nimble-HF20 AF-209660 (S/W Version:5.0.7.200), something else I am not very familiar with. I know it takes an hourly and a daily recovery point and replicates them to our other location. The circuit between the two locations is a super crappy 10mbps pipe, so the hourly snapshots never transfer. Their retention policy is only 24 hours. The daily ones queue up as well because it takes days to transfer one snapshot. If I'm looking at this correctly, our last valid backup is from 5-18. This is better than when I started 2 weeks ago; replication had stopped because only 1 of the 2 smaller Nimbles at the remote site was being used to store the two volumes from the main Nimble, and that machine was full.
JustSayin
Anyone else smell broken snapshot chain?
JustSayin
Your assumptions about ESXi, vCenter and vSphere client are right on. I'm wondering if those nimbles are using the built in vmware snapshotting to somehow replicate the VMs to the off-site Nimble? I bet you got snapshots, from within vSphere, can you check to see if this VM has any snapshots or needs consolidation?
The Needs Consolidation is a column that can be added to the view.
taurex
Looks like there is an active snapshot somewhere that needs to be consolidated. By the way, vSphere 6.0 is EOL and you need to migrate asap since there is no support (as long as your servers are on the VMware HCL for the current versions). Does the organisation you work for have an active support contract with VMware? It entitles you to upgrades of any paid VMware products you have.
You can set up the free community version for Veeam One monitoring app that would give you a good rundown of your vSphere environment and alert you if there is anything wrong with it. Also, there is an excellent desktop tool for Windows called RVtools that you can download for free as well. It gives you a pretty good idea about your vSphere environment.
Supaplex
- check 72 Best Answers
- thumb_up 517 Helpful Votes
Tim_Myth wrote:
The circuit between the two locations is a super crappy 10mbps pipe, so the hourly snapshots never transfer. Their retention policy is only 24 hours. The daily ones queue up as well because it takes days to transfer one snapshot. If I'm looking at this correctly, our last valid backup is from 5-18.
OP Tim_Myth
I looked at that VMWare article and tried running the commands they mention to find out what has the file locked. I see nothing
There are no lock files in the directory, so I proceeded to the article referenced in the one CrankyAvenger recommended to verify the integrity of the vm files. After following those steps and reregiistering the VM, I still have the same issue. :(
PCC Bob
- check 44 Best Answers
- thumb_up 192 Helpful Votes
You spelled the command incorrectly. The command is 'vmfsfilelockinfo' - you used 'vmsfilelockinfo'
OP Tim_Myth
taurex wrote:
Looks like there is an active snapshot somewhere that needs to be consolidated. By the way, vSphere 6.0 is EOL and you need to migrate asap since there is no support (as long as your servers are on the VMware HCL for the current versions). Does the organisation you work for have an active support contract with VMware? It entitles you to upgrades of any paid VMware products you have.
You can set up the free community version for Veeam One monitoring app that would give you a good rundown of your vSphere environment and alert you if there is anything wrong with it. Also, there is an excellent desktop tool for Windows called RVtools that you can download for free as well. It gives you a pretty good idea about your vSphere environment.
"Does the organisation you work for have an active support contract with VMware?" . Good question. I need to figure that out.
The 3 servers are all Lenovo System X 3650's, and they appear on the HCL, so *phew*!
No virtual machines need consolidation according to the Needs Consolidation column.
OP Tim_Myth
PCC Bob wrote:
You spelled the command incorrectly. The command is 'vmfsfilelockinfo' - you used 'vmsfilelockinfo'
Fuu! Good catch! I should have copied and pasted.
Here's the results of the correct command:
So the files aren't locked by another process. but the VM won't boot because it can't lock the file. I unregistered and reregistered the VM, and that didn't correct the issue, so the file itself must be hosed. This is one machine in a pool of machines. I don't think there's much about it that is unique from the other 9. If I can verify that is true, I'll just dump this one entirely and clone one of the other 9 VMs as a new DSM_Basic10.
PCC Bob
- check 44 Best Answers
- thumb_up 192 Helpful Votes
Your error says " Cannot open the disk '/vmfs/volumes/5cf9314c-6b2d7742-4325-000af79b9fd0/DSM_Basic10/DSM_Basic10.vmdk' or one of the snapshot disks it depends on." so there could still be a possible snapshot issue. If you are positive there are no snapshots of the VM . no files named VM-NAME-000001.vmdk which would be the delta file of the disk VM-NAME.vmdk, then you should take a look at the VMX file to see if there's an entry in it for a snapshot delta file.
Here's what a section of VMX file from one of my test VM's looks like with an active snapshot:
sata0:0.present = "TRUE"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "xxxx-xxxx-000001.vmdk"
the 'xxxx-xxxx' is the actual VM name.
PCC Bob
- check 44 Best Answers
- thumb_up 192 Helpful Votes
Here is the same section of the VMX file after removing the snapshot:
sata0:0.present = "TRUE"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "xxxx-xxxx.vmdk"
If you are feeling gutsy, download the VMX file, edit the fileName entry appropriately, and upload it back to the datastore. See if there's any change in power-on behavior.
OP Tim_Myth
"then you should take a look at the VMX file to see if there's an entry in it for a snapshot delta file." What you say makes sense. WinSCP and edittingb text files is something I think I can handle. ;)
Sadly, no dice. The vmx file makes no mention of an file with 000001 in the filename (or anything remotely close to that).
However, I also looked at the log file and saw that DSM_Basic10-flat.vmdk was having issues, so I ran VMFSfilelockinfo on it and found that it was locked. Now I just need to find the machine with that MAC address.
I've also learned that there is an ongoing issue with client getting a black screen on login. My googling suggests this is an issue with differing versions of VMView Horizon client. I think my bigger issue right now is upgrading all the components from version 6 to 6.7, then making sure all the Horizon clients are installed correctly.
I'll circle back to this once that's handled, until then thanks for all the help gents. It is greatly appreciated!
CrimsonKidA
Tim_Myth wrote:
I'm a little fuzzy (OK, a lot fuzzy) on the terms and their relation to each other. ESXi is the bit that makes the VMs on the physical box, and vCenter is the part that manages all the ESXi boxes? And then the vSphere Client connects to vCenter to let you administer all of it??
Yes, all of this is correct, except vSphere = management of multiple vCenters (and yes, vCenter = mgmt of multiple ESXi hosts). I would personally use the term ESXi "host" and/or ESXi server instead of "box," but yes, you have the concept of vSphere.
I have an app called VMWare Horizon Client. it seems to be something like Remote Desktop Manager?
Not exactly. The Horizon Client connects you to a VDI desktop, which is hosted on a Horizon View Connection Server (in conjunction with a VM in vSphere). Conceptually yes, it's similar to Remote Desktop, but it's very different from technical perspective in how it works. You could just google "VDI vs RDS" to get the overview.
CrimsonKidA
When a VM has multiple snapshots it is literally like a house of cards. if you pull one from the middle or the bottom, boom - the whole thing comes crashing down! These middle pieces are known as "delta" files and if/when they go missing, it's usually a death-sentence for the VM.
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.
Snap! AD Auth failures, HP BIOS updates, Tech Salaries, & Google I/O
Your daily dose of tech news, in brief. The weekend is right around the corner. While there are a lot of articles about Google I/O going around the internet right now, don't worry, there are plenty of other things going on that you'll want to know .
Do you use service tag or serial number for insurance and inventory purposes?
We're having a discussion about whether to use the service tag or the serial number for inventory and insurance purposes for the Dell devices. This is obviously not a problem for non-Dell devices that only use a serial number, but since Dell uses both, I'.
Sleep mode won't work on new laptop
I have a Dell Latitude 9420 2-in-1 laptop which I was issued about three weeks ago which I plug into a docking station at work and also take home some days as well. I have noticed that when I try to put my computer into sleep mode when leaving work, the c.
Announcements from Google I/O 2022
Today was Google I/O (I/O stands for Input/Output), the company's annual conference for developers. I already see various stories popping up across the internet, but here are some of the main takeaways I've seen so far. Android 13 [1:12:50] -- The be.
Snap! Patch Tuesday, Win10 20H2 EOS, Joint Cybersecurity Advisory, & a Marsquake
Your daily dose of tech news, in brief. You need to hear this. Microsoft Releases Fix for New Zero-Day with May 2022 Patch Tuesday Updates Today's theme will be Microsoft as we have a few stories across the internet that are fairly important .
Cannot open the disk 'vmfs/volumes/x/x/x.vmdk' or one of the snapshot disks it depends on.
There are several solutions posted for this that tell you to delete the .lck files. I don't see any .lck files.
I have 5 other VMs on the ESX host that work. I have been trying to replicate this VM with Veeam. It worked for a few months and then stopped working (the replication, not the VM). I checked again today to see if there were snapshots and it showed nothing. I created a snapshot to see if it would reveal the Consolidated Helper and it did. I deleted my snapshot and not the Consolidated Helper and the VM crashed, which was also the vCenter Server.
When I pull it back up I get that error.
Popular Topics in Virtualization
This KB has saved me from this problem before
I had to recreate the descriptor files
Step 1 should help you identify what the problem is before trying to fix
22 Replies
The initial error I received had Reason: 12 cannot allocate memory.
I removed (but did not delete) the disk that I use as the e:drive, since it is large, 1TB. After that, I could open the VM. I shut it down, reattached the disk, opened again and got the file lock error.
B-C
looks like you're going to be doing a vmdk restore process. yuck!
unless you have a decent backup!
I don't have a recent backup because of this problem. How do I do a vmdk restore?
B-C
hopefully other have had to do something recently. last time I was able to use a delta because I had done several snapshots. gave me at least a base even though I lost my changes..
vmdk restores have all sorts of options but there are a couple of vmware experts on here that might know a few more options before you have to go that route.
was just hoping they'd chime in.
This KB has saved me from this problem before
I had to recreate the descriptor files
Step 1 should help you identify what the problem is before trying to fix
StorageNinja
I don't have a recent backup because of this problem. How do I do a vmdk restore?
Do you have snapshots still open?
Also, Call support they will webex in and fix it.
B-C, Thanks for the quick reply and getting things going.
Daniel, I made the changes and relinked some broken CIDs, but still no.
John773, called VMWare. I hate waiting for them. I use them as my last resource because the trouble that I get into is usually too complex for the first guy that I get. I was hoping this would be relatively easy, but after all of the KBs that I've been through, I don't know what to do.
I can get the VM going if I don't have the second disk attached, but with it attached I get the Failed lock error, even after the CID fix. To do that fix, I had to jump a range (.000031.vmdk to .000043.vmdk). I don't know if I have to try to rebuild those lost files.
StorageNinja
Is there an actual vmdk as well as the flat vmdk in the vm folders directory. Can you post the contents of the dirrectory as well as the VMX and the full datastore path. Are there any snapshot files (deltas) referenced within the base vmdk Orin the directory?
StorageNinja
What is your storage (local, San NAS) have you rebooted the host/storage array that last had a lock. What is the backup system in use here?
B-C
trying to replicate this VM with Veeam. It worked for a few months and then stopped working (the replication, not the VM)
looks like Veeam primarily.
Daniel, I made the changes and relinked some broken CIDs, but still no.
Relinking the CIDs was only one of the possible fixes.
Since the machine can boot without the secondary vmdk, it sounds like the VMDK is corrupt of missing the descriptor (another possibility is the VMX file, but I would think removing and re-adding the vmdk would resolve that)
Recreating the VMDK descriptor
Recreating the VMDK descriptor for delta disks (Snapshot)
Validating the VMX
Would you mind posting the directory listing of your VM folder on the datastore and posting the contents of the VMX file?
StorageNinja
De is write on for my thoughts. Make sure veeam doesn't thing it still has the disk hot added to its VM
I appreciated all the help. I don't know if any of the particular things added to the success, but ultimately, when I rebooted the host it worked. I have other production servers on it so I couldn't take it down during the day, but I rebooted last night.
And Daniel, I went through some of the other things yesterday that were involved in that first shortcut that you sent. Nothing else seemed to be in error.
Standard IT response: Reboot!
PS. I do believe that the CID configuration helped a lot.
B-C
sidebar question for me -
so Veeam is your primary backup for vm DR right?
I haven't used it and have been looking at it but haven't had the budget for a bigger install of esxi / vsphere just yet. ~4-5k with veeam in the picture and essentials.
That said just wondering how it all works from a high level overview and what your total upgrade into the current SAN / NAS Solution ~ Costs were? (trying to asses budget for 2012/13
Also what you upgraded from?
I bought 3 HP DL180s. I have all 3 with VMWare ESX 4.1 (I've upgraded twice). Initially, I used vReplicator and vRanger for backup and replication. They combined the products and I was no longer able to use the products how I needed.
Veeam came highly recommended from 3 sources. It worked very well for months and then something happened that is causing it not to finish 2 of the machines. It keeps giving me snapshot errors. I haven't contacted them about it yet, because it seemed to be a VMWare issue. Then yesterday happened. Looking at all of the KBs I read yesterday, everything points to 3rd party software, hence Veeam.
My servers were 3 TB each and cost me around 10 grand a piece (after software, etc. That is an average because I only have two quad processors in one of them.)
vReplicator/vRanger was a cheap solution, but Veeam isn't too expensive either. Based on 4 processors, like I have, and getting the software (B&R for VMWare x 2), I think it was $1200.
Each host is a complete set of our servers. I have the 2 hosts local, using some servers off of one and some off of the other to load balance, (but still, each one has the complete set of VMs). The third server is at another branch of ours, receiving regular replications.
Veeam has a good setup and feel to it. I'm not the best one to ask about reliability until I get the current problem resolved (I fixed one of the two problem VMs, but still haven't fixed the final server, which was the cause of yesterday's problem).
Is that too high level? I can get some functional details if you want.
StorageNinja
Can you copy the veeam errors from the backup report email it sends you. It can't leverage CBT if there is an existing snap open, and may refuse to backup a VSS setup VM till you give it credentials or tell it to ignore authentication failures. I'm pretty familiar with the various error messages, however support is pretty good, and I have back channels all the way to C level if you are not satisfied with them (we are a partner as well as a user of veeam).
B-C
Perfect for what I was looking for!
I may PM you about some of the other fun when I get around to it again but at least that gave me a good general setup.
So no SAN / NAS just 3tb in each box then replicating.
Derek_A
Very similar setup here. I love Veeam. It saved my arse this week! We had a production server suddenly shutdown in VMWare. Would not restart, something fubar'd it. Luckily Veeam had just replicated 10 minutes before the crash. I fired up the replica and away we went!
Veeam also comes in Essential packs so that you can use some of their other features like monitor and reporter. Also the file level restore is great too, I use that often.
Derek_A
One more thing on your snapshot errors. Can you go into snapshot manager on vSphere and delete the existing snapshots on that server (if there are any)??
I had a server do something similar to this. Veeam would not back it up because of a snapshot issue. Turns out a Snapshot was stuck and I could not even delete it from vSphere. Once I cleared up the snapshot issue in VMWare Veeam was happy again.
John773, I'll get the logs when I can get to that. Thanks for your help and input.
B-C, I'm happy to share.
Derek-A, You're right. I do have to say that the replications have saved me several times. I don't even know how many times I have had to go to a Replication server to get files, but that includes replications from vReplicator as well. It's also nice when you need to work on a live server and you put up the replication temporarily (as long as everyone knows not to add new files to it:)).
I have even shut down the server and deleted the snapshots, because the Consolidate Helper snapshot can remain a looooonnnng time until it gets the required I/O. It was deleting snapshots (evidently when another major process was running, according to documents that I read) that caused yesterdays catastrophe. I've had that work successfully in times past and the replication was successful, but not yesterday.
For whatever reason, when I went back to get the logs, I saw that the replication worked! I don't get it. It must be the power of SpiceHeads! It's not just the knowledge that we have and share, it is our ability to dominate machines and make them bow to our will! (after they torture us beyond all recognition, but a Pyrrhic victory is still a victory!)
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.
Snap! AD Auth failures, HP BIOS updates, Tech Salaries, & Google I/O
Your daily dose of tech news, in brief. The weekend is right around the corner. While there are a lot of articles about Google I/O going around the internet right now, don't worry, there are plenty of other things going on that you'll want to know .
Do you use service tag or serial number for insurance and inventory purposes?
We're having a discussion about whether to use the service tag or the serial number for inventory and insurance purposes for the Dell devices. This is obviously not a problem for non-Dell devices that only use a serial number, but since Dell uses both, I'.
Sleep mode won't work on new laptop
I have a Dell Latitude 9420 2-in-1 laptop which I was issued about three weeks ago which I plug into a docking station at work and also take home some days as well. I have noticed that when I try to put my computer into sleep mode when leaving work, the c.
Announcements from Google I/O 2022
Today was Google I/O (I/O stands for Input/Output), the company's annual conference for developers. I already see various stories popping up across the internet, but here are some of the main takeaways I've seen so far. Android 13 [1:12:50] -- The be.
Snap! Patch Tuesday, Win10 20H2 EOS, Joint Cybersecurity Advisory, & a Marsquake
Your daily dose of tech news, in brief. You need to hear this. Microsoft Releases Fix for New Zero-Day with May 2022 Patch Tuesday Updates Today's theme will be Microsoft as we have a few stories across the internet that are fairly important .
I am unable to power on one Windows Virtual Machine i am getting error. Failed to lock the file.
The server was having snapshots which i have also deleted. i have migrated the VM from one host to another host. I can see the message Virtual machine disks consolidation is needed. i have also clicked Consolidate but no luck, experts guide me.
Popular Topics in VMware
chivo243
I would check the location of the disk, and check that storage location for files that are locked. I had this issue years ago after a power outage. I seem to remember changing the storage location moved only the required files, leaving the offender behind? So migrate files to another location? I would stop all backup activity for that VM before hand. As mentioned by JasonValentine , you should have VMware support guide you through this one on a production VM if you have a support contract.
3 Replies
JasonValentine
- check 137 Best Answers
- thumb_up 403 Helpful Votes
You may have a backup software like Veeam that is trying to work on that system.
You may have an issue with your storage system.
You may have a problem with the files of that specific virtual machine.
Without more information it is hard to guide you further than that.
If this is a production issue then you may want to call support so they can guide you into cloning the disk using the command line.
chivo243
I would check the location of the disk, and check that storage location for files that are locked. I had this issue years ago after a power outage. I seem to remember changing the storage location moved only the required files, leaving the offender behind? So migrate files to another location? I would stop all backup activity for that VM before hand. As mentioned by JasonValentine , you should have VMware support guide you through this one on a production VM if you have a support contract.
Supaplex
- check 72 Best Answers
- thumb_up 517 Helpful Votes
risingflight wrote:
The server was having snapshots which i have also deleted. i have migrated the VM from one host to another host. I can see the message Virtual machine disks consolidation is needed. i have also clicked Consolidate but no luck, experts guide me.
Login or sign up to reply to this topic.
Didn't find what you were looking for? Search the forums for similar questions or check out the VMware forum.
Snap! AD Auth failures, HP BIOS updates, Tech Salaries, & Google I/O
Your daily dose of tech news, in brief. The weekend is right around the corner. While there are a lot of articles about Google I/O going around the internet right now, don't worry, there are plenty of other things going on that you'll want to know .
Do you use service tag or serial number for insurance and inventory purposes?
We're having a discussion about whether to use the service tag or the serial number for inventory and insurance purposes for the Dell devices. This is obviously not a problem for non-Dell devices that only use a serial number, but since Dell uses both, I'.
Sleep mode won't work on new laptop
I have a Dell Latitude 9420 2-in-1 laptop which I was issued about three weeks ago which I plug into a docking station at work and also take home some days as well. I have noticed that when I try to put my computer into sleep mode when leaving work, the c.
Announcements from Google I/O 2022
Today was Google I/O (I/O stands for Input/Output), the company's annual conference for developers. I already see various stories popping up across the internet, but here are some of the main takeaways I've seen so far. Android 13 [1:12:50] -- The be.
Snap! Patch Tuesday, Win10 20H2 EOS, Joint Cybersecurity Advisory, & a Marsquake
Your daily dose of tech news, in brief. You need to hear this. Microsoft Releases Fix for New Zero-Day with May 2022 Patch Tuesday Updates Today's theme will be Microsoft as we have a few stories across the internet that are fairly important .
Some VMware users are reporting that they cannot start one or more virtual machines that they configured on their computer. Upon powering on the virtual machine, the window displays the following error: “An unexpected error was received from the ESX host while powering on VM VM_name. Failed to lock the file.”
Failed to lock the file on VMware Workstation
What is causing the Failed to lock the file issue?
We investigated this particular issue by looking at various user reports and the repair strategies that are commonly used to fix this particular error message with WMware. Based on our investigations, there are several different culprits that are known to trigger this particular error message:
- A second virtual machine is already using the .vmx file – As it turns out, this particular issue can occur if you attempt to start a second virtual machine that is using the same virtual machine configuration (.vmx) file as another machine that was configured first. In this case, you can resolve the issue by deleting the .lck folders & logs.
- The virtual machine contains mounted disks – As several users have reported, this issue can also occur if you try to power on a virtual machine with mounted disks that we’re enforced via the VMware-mount utility. If this scenario is applicable, you can resolve the issue by deleting the .lck folders & logs.
- The virtual machine is started during snapshot operation – We actually tested this and it lead us right to the “Failed to lock the file” error. You’ll see this exact error if you try to turn on the virtual machine through the user interface facilitated during the snapshot operation. If this is what’s causing the issue, deleting the logs & the .lck folders from the virtual machine folder will resolve the issue.
- The virtual machine is already in use – You might also be encountering this issue if the virtual machine you are trying to start is already in use. This typically happens if you’re running a dual configuration. In this case, all you need to do is close the other instance that is running the same virtual machine and the error will stop occurring.
- VMware Workstation doesn’t have admin access – As it turns out, this particular issue can also occur if you VMware Workstation is not granted admin access. If this scenario is applicable, you can resolve the issue by forcing your OS to allow administrative privileges.
If you’re currently encountering this exact issue and you’re looking for a way to resolve it without losing any data, this article will provide you with some troubleshooting suggestions. Down below, you’ll find a collection of potential repair strategies that other users in a similar situation have commonly used to fix this particular error.
For the best results, we advise you to follow the methods below in the order that they are presented since they are ordered by difficulty and efficiency. If you go through with them in order without skipping any steps, one of them is bound to resolve the problem regardless of the culprit that is causing the issue.
Method 1: Running VMware as admin
In some cases, the fix is as simple as ensuring that the VMware application has administrative privileges. This should happen by default, but certain settings might prevent the application from getting admin access.
Some users that were encountering the “Failed to lock the file” error have reported that the issue stopped occurring after they launched VMware Workstation in admin mode.
Here’s a quick guide on how to do this:
- On your desktop, right-click on the VMware shortcut and choose Run as administrator.
Note: If you don’t have a desktop shortcut, navigate to the installation folder of WMware and right-click on vmplayer.exe. Unless you set up a custom location, you will be able to find it in: C:\Program Files (x86)\VMware\VMware Player - At the UAC (User Account Control), click Yes to grant administrative privileges.
- Launch the virtual machine that was previously triggering the issue to see if the issue has been resolved. If you no longer encounter the “Failed to lock the file” error, continue with the steps below to make the change permanent.
Note: In the current state, you will have to repeat Step 1 & Step 2 every time you launch VMware in order to circumvent the issue. - Right-click on the VMware Workstation executable or shortcut and choose Properties.
- Inside the Properties screen, go to the Compatibility tab, check the box associated with Run this program as an administrator (under Settings) and click Apply to save the current configuration.
- Open VMware normally and see if the issue has been resolved.
If the issue is still occurring, move down to the next method below.
Method 2: Deleting the LCK folders of the virtual machine
Several affected users have managed to resolve this issue by locating the physical location of the virtual machine that was failing with the “Failed to lock the file” and deleting the LCK folders. After doing this and restarting their computer, most affected users have reported that the issue has been resolved.
If you haven’t established a custom location for it, your virtual machine will typically be located inside the Documents folder under the Virtual Machines folder.
Here’s what you need to do:
- Make sure that VMware is completely closed and the virtual machine is powered off.
- Open File Explorer and navigate to Documents > Virtual Machines, then select the virtual machine that you’re encountering the issue with.
Note: If you saved your virtual machine in a custom location, use the File Explorer to navigate there. - If you have multiple virtual machines, double-click on the one that is creating the issue.
- Inside your virtual machine folder, you should be able to find one or two folders with the name ending in “lck“. Select both, then right-click and choose Delete to remove them. If you find any .log files outside the .lck folders, delete them also.
Note: Deleting these folders will not have any negative effect on your virtual machine. The next time you start the virtual machine, VMware will automatically recreate the two folders once again.
Unable to Consolidate Virtual Machine Snapshot disks.
Unable to Clone VM.
It gives below Symptoms.
1. While attempting to power on giving below error.
"Power On virtual machine:Failed to lock the file
See the error stack for details on the cause of this problem.
Time: 10/9/2020 6:37:25 AM
Target: MYVM001
Error Stack
An error was received from the ESX host while powering on VM MYVM001.
Failed to start the virtual machine.
Cannot open the disk '/vmfs/volumes/594d0000-d290000-500-00000000002/MYVM001/MYVM001-000002.vmdk' or one of the snapshot disks it depends on.
Failed to lock the file"
2. Virtual Machine showing warning " Consolidation Needed". But unable to perform snapshot consolidation. It gives below error.
Failed to open file 'MYVM001-delta.vmdk'; Requested flags 0x4008, world: 1197120 [vmx-vthread-8], (Existing flags 0x4008, world: 43796 [unknown]): Busy
4. Command "vmkfstools -e vmfs/volumes/00000003-000230-000b-0123211000/VM001-000001.vmdk" shows below output.
Failed to open disk link /vmfs/volumes/5b4d1233-3e1234-1f5b-0123211000/VM001-000001.vmdk :Failed to lock the file (16392)Disk chain is not consistent : Failed to lock the file (16392)
5. virtual machine disk descriptor file shows normal and CID chain is not broken.
The VMDK or Delta VMDK is locked by one of the esxi in the cluster. Even if we move the VM in the particular Host, VM will fail to power on or consolidate disk.
To identify which disk is locked, refer the /var/log/vmkernal.log
Identify the ESXI host which is currently have lock on the Delta vmdk or VMDK with below command.
[root@I-MY-ESXI-01:/vmfs/volumes/152525252-26252526122-ED3455555555/MYVM001] vmfsfilelockinfo -p MYVM001-000001-delta.vmdk -v 172.11.13.3 -u administrator@vsphere.local
vmfsfilelockinfo Version 1.0
Looking for lock owners on "MYVM001-000001-delta.vmdk"
"MYVM001-000001-delta.vmdk" is locked in Exclusive mode by host having mac address ['00:20:b2:01:10:01']
Found 2 ESX hosts from Virtual Center Server.
MAC Address : 00:20:b2:01:10:01
Total time taken : 0.38 seconds.
Steps to Clear ESXi Lock:
1. Put the host in maintenance.
2. reboot the host.
Lock will be cleared during ESXi reboot and we will be able to power on or consolidate snapshot of VM.
Читайте также: