VMware Cloud Community
sopon
Contributor
Contributor

Swap: vm 5342: 2457: Failed to open swap file '/volumes/4c37ac59-627d1cd5-5799-001018253b96/NTVDICOM-2/NTVDICOM-2-7307ada8.vswp': Lock was not free

Hello, we're running ESX 4.0 on our hosts. when i backup or copy larg file (More than 1TB) the host is disconnect and vCentter acnnot connect guest but guest it can run normally.

We can use SSH to login HOST.

Vcenter cannot connect  any guest on host.

"error log"

WARNING: Swap: vm 5342: 4521: Swap initialization failed Lock was not free.

WARNING: Swap: vm 5342: 4356: Failed to initialize swap file '/volumes/4c37ac59-627d1cd5-5799-001018253b96/NTVDICOM-2/NTVDICOM-2-7307ada8.vswp': Lock was not free.

We try to restart host and reconnect host when it down.

do you have the solution to solve this issue.

Thanks.

Reply
0 Kudos
7 Replies
raj196
Enthusiast
Enthusiast

Hi sopon ,

welcome to the community .

  To prevent duplicate access to active virtual machine files, ESX hosts establish a lock on these files. In certain circumstances, these locks may not be released when the virtual machine is powered off. The files cannot be accessed if they are locked, and the virtual machine cannot power on.  These virtual machine files are commonly affected by lock issues:      .vswp    vmware.log    -flat.vmdk    .vmx  Identifying the locked file To identify the locked file, try to power on the virtual machine. During power on, an error may display or be written to the virtual machine’s log. The error and the log entry identify the virtual machine.      Connect VMware Infrastructure (VI) Client to either the ESX host or to the VirtualCenter Server.    Locate the affected virtual machine, and try to power it on.    Open a remote console window for the virtual machine.    If the virtual machine is unable to power on, an error on the remote console screen may display with the name of the affected file. If an error does not display, proceed to the next step to look in the vmware.log file for the virtual machine.    Log in as root to the ESX host using an SSH client.    To confirm that the virtual machine is registered on the server and to obtain the full path to the virtual machine, run the command:      [root@esxhostname]# vmware-cmd -l      The output returns a list of the virtual machines registered to the ESX host. Each line contains the full path of a virtual machine’s .vmx file. For example:      /vmfs/volumes///.vmx      Record this information as it will be required in the remainder of this process. This is the  referenced in the remainder of the article.      Verify that the affected virtual machine appears in this list. If it is not listed, the virtual machine is not registered on this ESX host. The host on which the virtual machine is registered typically holds the lock. Ensure that you are connected to the proper host before proceeding.          To move to the virtual machine’s directory, run the command:      [root@esxhostname]# cd /vmfs/volumes//          Use a text viewer to read the contents of the vmware.log file. At the end of the file, look for error messages that identify the affected file.

If at first you don't succeed; call it version 1.0"
Reply
0 Kudos
orthohin
Enthusiast
Enthusiast

Here is a kb.

Please read ..........

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051

Regards,
Milton

Never trust a computer you can't throw out a window
Reply
0 Kudos
sopon
Contributor
Contributor

hi all

If i update ESX4.0 to ESX4.1can solve this issue or not?

Reply
0 Kudos
vHaridas
Expert
Expert

Hi,

file lock is not an issue, it is a feature to prevent more than host take ownership of VM or its file.

even if you upgrade the ESXi version, its going to be there.

refer above KB provided by orthohin & try to remove the lock.

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
Reply
0 Kudos
sopon
Contributor
Contributor

I'm not sure that the file lock is a real problem or is  it just me, but I find the log when the ESX host disconnect the guest is still running normally. I can not use ssh and screen on ESX do not work.
I restart ESX only and reconnect host.
Reply
0 Kudos
vHaridas
Expert
Expert

Well, there is no attachment in your message.

can you upload vmware.log file of the vm for which you are facing problem & the host vmkernel.log file?

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
Reply
0 Kudos
sopon
Contributor
Contributor

HI

I attach the log file already.

Thankyou.

Reply
0 Kudos