In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to do about vsphere6.0 VM virtual machine files are locked. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
A database virtual machine on vsphere6.0 fakes death, and cannot be POWER ON after forced shutdown. At boot time, the virtual machine file is locked. At this time, migration, snapshot, clone, etc. of the virtual machine are not available. Looking at the VM status, it was found floating back and forth on the 8 physical hosts within the cluster.
Solution:
1. First turn off HA function in cluster. If this function is not turned off, it is easy to cause deadlock, VM keeps beating, and keeps being locked between different ESXI hosts in the same cluster.
2, virtual machine disk file is locked, you must know which ESXI locked him, this is the key.
3. In VCenter, remove the locked VM from Inventory. The reason is simple, it's an unregister process. After finding the target host, of course, kill the process that locks the VM. The reason why it is locked is that HA migrates VM from other HOST, but there is no process of unregister and register, so when you view VM Summary, host ip still belongs to the host with problem. However, VM is forced to power on by the new host, so naturally it cannot be started.
Solution:
Enable SSH login for all EXSI hosts in the cluster
and then execute it on each machine.
~ # vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
10 C5cpyPdb1 [W56021_SY07_CP07PV1C16] C5cpyPdb1/C5cpyPdb1.vmx rhel6_64Guest vmx-08
17 C5ioAdm1 [W56021_SY01_CP07PV1C16] C5ioAdm1/C5ioAdm1.vmx windows8Server64Guest vmx-08
20 C5jkhyPdb1 [W56021_SY01_CP07PV1C16] C5jkhyPdb1/C5jkhyPdb1.vmx rhel6_64Guest vmx-08
Found locked host C5jkhyPdb1
Query the status of this virtual machine
~ # vim-cmd vmsvc/power.getstate 20
Retrieved runtime info
Powered off
If the virtual machine state is ON, you can execute the following command
~ # esxcli vm process list
C5jkhyPdb1
World ID: 109052730
Process ID: 0
VMX Cartel ID: 109052727
UUID: 42 0b d6 eb 00 13 b6 26-a2 c4 86 4e 2d ba 17 db
Display Name: C5jkhyPdb1
Config File: /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1.vmx
~ # esxcli vm process kill --type=hard --world-id=109052730
Run the following command on each esxi host in the cluster to find the locked file on the VM
# vmkfstools -D /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1.vmx
Lock [type 10c00001 offset 233738240 v 114, hb offset 3780608
gen 85, mode 0, owner 00000000-00000000-0000-000000000000 mtime 46362574
num 0 gblnum 0 gblgen 0 gblbrk 0]
Addr , gen 52, links 1, type reg, flags 0, uid 0, gid 0, mode 100755
len 3706, nb 1 tbz 0, cow 0, newSinceEpoch 1, zla 2, bs 8192
~ # vmkvsitools lsof | grep C5jkhyPdb1
131169563 vmx FILE 4 /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/vmware.log
131169563 vmx FILE 49 /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1.vmx.lck
131169563 vmx FILE 50 /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1.vmx
131169563 vmx FILE 51 /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1.vmx~
131169563 vmx FILE 94 /vmfs/volumes/56823cb8-c8a37260-f48f-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1-flat.vmdk
131169563 vmx FILE 96 /vmfs/volumes/56824c84-3e3e868c-5468-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1-flat.vmdk
131169563 vmx FILE 97 /vmfs/volumes/56824c84-3e3e868c-5468-6c0b84629718/C5jkhyPdb1/C5jkhyPdb1_1-flat.vmdk
131169563 vmx FILE 123 C5jkhyPdb1.nvram
# ps|grep C5jkhyPdb1
131136798 vmm0:C5jkhyPdb1
131169568 vmm1:C5jkhyPdb1
131169569 vmm2:C5jkhyPdb1
131136802 vmm3:C5jkhyPdb1
131169652 131169563 vmx-vthread-7:C5jkhyPdb1 /bin/vmx
131169653 131169563 vmx-vthread-8:C5jkhyPdb1 /bin/vmx
131169654 131169563 vmx-vthread-9:C5jkhyPdb1 /bin/vmx
131104119 131169563 vmx-mks:C5jkhyPdb1 /bin/vmx
131169656 131169563 vmx-svga:C5jkhyPdb1 /bin/vmx
131169658 131169563 vmx-vcpu-0:C5jkhyPdb1 /bin/vmx
131136891 131169563 vmx-vcpu-1:C5jkhyPdb1 /bin/vmx
131169660 131169563 vmx-vcpu-2:C5jkhyPdb1 /bin/vmx
131169661 131169563 vmx-vcpu-3:C5jkhyPdb1 /bin/vmx
Then kill the locked file process
#kill -9 131169563
After unlocking, log in to vcenter and remove the original VM name from the list (Note: Even if the VM is shut down, you can still see that the VM jumps to register with different hosts in the cluster. You need to remove it from the list many times. The name is UNKNOWN.
Finally add VMX for this VM from storage, select Move to Do not use Copy to at startup). After vmx added virtual machine to list, boot succeeded.
Remarks:
Per VMware KB 2088157
Before ESXi 5.5 Patch 4 Release ESXi550-201501001 (2015-01-27), there are problems such as virtual machine no response, status grayed out as inaccessible and operating virtual machine, vc console black screen unable to operate, network inaccessible, virtual machine process lock unable to reset, etc.
vSphere HA failed to reset the virtual machine due to bugs in the ESXi software itself.
To upgrade ESXi version to ESXi5.5 Patch 4 (build-2403361) or higher. However, this problem still exists in version 6.0.
About "vsphere6.0 VM virtual machine file is locked how to do" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 291
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.