File is being locked by a consumer on host with exclusive lock

Please tell me fix for File is being locked by a consumer on host with a exclusive lock in vmware
tkgj11Sr. System EngineerAsked:
Who is Participating?
 
tkgj11Sr. System EngineerAuthor Commented:
Hey guysit is working all of sudden now. I logged into the host and seen that the VM was turned off and I turned it on from there. The funny thing is when you log into vcenter it shows the vm is migrating and you can't ping it. I really don't know what the fix was but I greatly appreciate your help.
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
Rebooting host is easy fix .
0
 
tkgj11Sr. System EngineerAuthor Commented:
host is greyed out to where I can't reboot the host. logging into the host of the VM it says I can power on but it says another consumer which shows host 7. Host 3 is where the VM lives but when turning on the vm it says it locked by a consumer on host 7. Please assist.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
if the options is grayed out , I am suspecting that you host is disconnected from vcenter

other possibilities

1# check if you can access host directly

2# for checking which host is locking , ssh  to host

gi to vm directory  run below command

vmkfstools -D   VMNAME.VMDK

you will get mac of host which is locking
0
 
tkgj11Sr. System EngineerAuthor Commented:
When I go to events it says Error message from host 3. cannot open the disk /vmfs/volumes/169dd623-63a4ec86/vm/vm.vmdk or one of the snapshot disks it depend on
0
 
tkgj11Sr. System EngineerAuthor Commented:
the host is connected which it has 6 vms online except the one virtual machine I can't turn on.
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
Need to know file name which files is locked main  ?
did we checked if the backup server is mounting the disk  on host 3?
do we have backup server as physical server or virtual server ?

got to VM directory run   -> touch * and share output
0
 
tkgj11Sr. System EngineerAuthor Commented:
No I don't know which file is locked, I am sorry.
what do you mean if the backup server is mounting the disk on host 3?
All servers are virtual
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
This is very common issue - >   usually backup server  mount the disk to itself  to backup.

looking or that prospective if you can give input if you have any backup server as virtual ?

did you tried edit the backup VM and see if the disk is mounted.
0
 
tkgj11Sr. System EngineerAuthor Commented:
I think I understand you. I wish I could fix this common issue quickly, this just happened out the blue when the vm migrated on its own.
When I click on edit at the VM itself and I see cd/dvd drive 1, I look down to virtual device node this is what I see highlighted
IDE(1:0) CD/DVD drive 1
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
May I know how you are getting impacted and what you are looking for accomplish. Esxi locking mechanism is common but how you are impacted based on that troubleshoot begins.

for the CD / DVD you can change that to client device will release the lock. (Mostly)
0
 
tkgj11Sr. System EngineerAuthor Commented:
the print server is down and i'm trying to get it back up and running. Device Type it is selected Client Device.

Goal that I am trying to get to accomplish is to be able to turn the Virtual machine on. When I click power on it says it is locked by another host which is host 7 with exclusive lock
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
Thanks for sharing that.  Here is your options now.

option 1 # you can access host 7 directly and register the print server there ( it might be already running) -> power on the VM


option 2# if the above fails  you need to kill the VM stale process to execute any where else.
 SSH to host 7

run
esxcli vm process list  | less

pressing space-bar will show you next page.

search for the wold Number.

esxcli vm process kill --type=force --world-id= WorldNumber

reference - https://kb.vmware.com/s/article/1014165

once the process is killed you can power on VM
0
 
tkgj11Sr. System EngineerAuthor Commented:
Ok so this won’t delete the server at all correct ? When I log into the host of the thick client I see the print server there listed as well which gives the only option to migrate the server but when I try too it just sit there and think. When I log into vcenter with the client it shows it’s at 73 % migrating but been that way for a while . All I want to be able to do is turn the virtual machine on and it turn on without the file lock error
0
 
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
The above process will not delete the VM.

so your VM migrating to which host to which ? did you initiated that ?

I am surprised to see if powered off VM taking so time.

in case above doesn't work.
other way to do this  unregister VM to from vCenter , login directly to host7 via vsphereclient if you see VM there power on , if not register the VM and then power on.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
0
 
R@f@r P@NC3RVirtualization SpecialistCommented:
Hello

Please try:

a) Restart the administration agents of each Host. Restarting agents does not affect your VMs.
Enter by ssh to both host and restart the administration agents, I indicate the command: services.sh restart

b) After the restart of both hosts, try to turn on the vm.

c) If the ignition is not successful, migrate it to another host to validate if the migration and the ignition are successful.

d) Validate if your server has an iso image connected, validate that in the options of the vm the client option device has been selected in the DVD unit.

According to the error you are indicating: can not open the disk /vmfs/volumes/169dd623-63a4ec86/vm/vm.vmdk or one of the snapshot disks it depends on, please tell us:

Yes Your backup server is physical or virtual. Do you use VDP as a backup server?

e) If it is virtual it validates if your backup server has one of the disks of your affected server, if so, remove that disk from the backup server and then turn on the vm where you present the problem.

If you can share a printer where you can view the files of the vm in the datastore.

Since you can also have ctk files that prevent you from restarting the VM.

Regards..
0
 
R@f@r P@NC3RVirtualization SpecialistCommented:
Good Morning

excellent, best regards.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Please do not forget to close, and I would suggest selecting your own answer to close as the solution.
0
 
tkgj11Sr. System EngineerAuthor Commented:
I figured the issue out on my own.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.