Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 169668

How to break locks ?

$
0
0

I've reproduced a problem I'm having with my code using the standard vix-disklib-sample, on some VM's I can't read their disk when they are powered on.

 

This sounds like other's issues, but I'm not using change tracking.

 

LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/vmware-vix-disklib/lib64 ./vix-disklib-sample -info -initex cfg -libdir /usr/local/lib/vmware-vix-disklib/lib64/   -user root -password 'vmware' -host 192.168.0.9 -vm vmPath='/UK/vm/Windows Build'  '[local-192.168.0.12] Windows Build/Windows Build.vmdk'

Log: VixDiskLib: linuxVerifySSLCertificates is 0

Log: VixDiskLib: config options: libdir '/usr/local/lib/vmware-vix-disklib/lib64/', tmpDir '<null>'.

Log: OBJLIB-LIB : Objlib initialized.

Log: VixDiskLib: Attempting to locate advanced transport module in "/usr/local/lib/vmware-vix-disklib/lib64/".

Log: VixDiskLib: Could not load default plugins from /usr/local/lib/vmware-vix-disklib/lib64//lib64/libdiskLibPlugin.so: Cannot open library: /usr/local/lib/vmware-vix-disklib/lib64//lib64/libdiskLibPlugin.so: cannot open shared object file: No such file or directory.

Log: VixDiskLib: Transport modes available: file:nbdssl:nbd.

Log: VixDiskLib: Advanced transport module not loaded.

Log: VMware VixDiskLib (5.1) Release build-1042608

Log: VixDiskLibVimResolveHostName: Resolving IP address for hostname 192.168.0.9.

Log: VixDiskLibVimResolveHostName: Resolved to 192.168.0.9.

Log: VixDiskLibVim: VixDiskLibVimLogin

Log: VixDiskLibVim: TicketFindVMByInvPath: vmxPath = -/UK/vm/Windows Build-

Log: VixDiskLibVim: VixDiskLibVimLoadVM

Log: VixDiskLibVim: VixDiskLibVimLoadAuthMgr

Log: VixDiskLibVim: VixDiskLibVimLoadVMCb

Log: VixDiskLibVim: VixDiskLibVimLogout

Log: VixDiskLibVimResolveHostName: Resolving IP address for hostname 192.168.0.9.

Log: VixDiskLibVimResolveHostName: Resolved to 192.168.0.9.

Log: VixDiskLibVim: VixDiskLibVimLogin

Log: VixDiskLibVim: TicketFindVMByInvPath: vmxPath = -/UK/vm/Windows Build-

Log: VixDiskLibVim: VixDiskLibVimLoadVM

Log: VixDiskLibVim: TicketLoadInternalSic

Log: VixDiskLibVim: VixDiskLibVimLoadVMCb

Log: VixDiskLibVim: TicketLoadNfcTicket: Request RandomAccessRO diskKey = 2000, readOnly = 1, openSnapshot = 0

Log: VixDiskLibVim: VixDiskLibVimLogout

Log: VixDiskLib: Thumbprint for 192.168.0.12 not found in memory database

Log: VixDiskLib: Added thumbprint 1B:E8:B1:C7:62:C4:7C:DF:A7:1F:24:88:30:2D:29:A5:AA:44:93:70 to sslIdDb for 192.168.0.12

Log: NBD_ClientOpen: attempting to create connection to vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902

Log: [NFC DEBUG] Using proxy/session authentication, sessionId=52 1b 4c af 61 50 43 b8-6a 53 52 e5 ff e8 48 dd, useSSL=0

Log: Opening file [local-192.168.0.12] Windows Build/Windows Build.vmdk (vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902)

Log: [NFC DEBUG] NfcFssrvrClientOpen: opening disk [local-192.168.0.12] Windows Build/Windows Build.vmdk, flags=30

Warning: [NFC ERROR] NfcFssrvrProcessErrorMsg: received diskLib error 16392 from server: NfcFssrvrOpen: Failed to open '[local-192.168.0.12] Windows Build/Windows Build.vmdk': Failed to lock the file

Log: DISKLIB-DSCPTR: : "vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902" : Failed to open NBD extent.

Log: DISKLIB-LINK  : "vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902" : failed to open (Failed to lock the file). 

Log: DISKLIB-CHAIN : "vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902" : failed to open (Failed to lock the file).

Log: DISKLIB-LIB   : Failed to open 'vpxa-nfc://[local-192.168.0.12] Windows Build/Windows Build.vmdk@192.168.0.12:902' with flags 0x1e Failed to lock the file (16392).

Error: [vixDiskLibSample.cpp:608]  40080000000f The file is already in use

Log: VixDiskLibVimResolveHostName: Resolving IP address for hostname 192.168.0.9.

Log: VixDiskLibVimResolveHostName: Resolved to 192.168.0.9.

Log: VixDiskLibVim: VixDiskLibVimLogin

Log: VixDiskLibVim: TicketFindVMByInvPath: vmxPath = -/UK/vm/Windows Build-

Log: VixDiskLibVim: VixDiskLibVimLoadVM

Log: VixDiskLibVim: VixDiskLibVimLoadAuthMgr

Log: VixDiskLibVim: VixDiskLibVimLoadVMCb

Log: VixDiskLibVim: VixDiskLibVimLogout

Log: VixDiskLib: VixDiskLib_Exit called. Unmatched Init calls so far: 1.

Log: OBJLIB-LIB : ObjLib cleanup done.

 

Of course there's a lock file in the VM's directory - its powered on. But there is in other VM's and they work okay.

 

 

/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build # ls -l

-rw-------    1 root     root     2147483648 Aug 10 12:01 Windows Build-09934fa9.vswp

-rw-------    1 root     root            13 Aug 10 11:59 Windows Build-aux.xml

-rw-------    1 root     root     42949672960 Aug 10 12:23 Windows Build-flat.vmdk

-rw-------    1 root     root          8684 Aug 10 12:02 Windows Build.nvram

-rw-------    1 root     root           625 Aug 10 12:01 Windows Build.vmdk

-rw-r--r--    1 root     root             0 Aug 10 11:59 Windows Build.vmsd

-rwxr-xr-x    1 root     root          3506 Aug 10 12:05 Windows Build.vmx

-rw-------    1 root     root             0 Aug 10 12:01 Windows Build.vmx.lck

-rw-r--r--    1 root     root           268 Aug 10 11:59 Windows Build.vmxf

-rwxr-xr-x    1 root     root          3507 Aug 10 12:05 Windows Build.vmx~

-rw-------    1 root     root        329406 Aug 10 11:59 vmware-2.log

-rw-------    1 root     root        394721 Aug 10 11:59 vmware-3.log

-rw-------    1 root     root        218825 Aug 10 11:59 vmware-4.log

-rw-------    1 root     root        219409 Aug 10 11:59 vmware-5.log

-rw-------    1 root     root        215107 Aug 10 11:59 vmware-6.log

-rw-------    1 root     root        218725 Aug 10 11:59 vmware-7.log

-rw-r--r--    1 root     root        196713 Aug 10 12:05 vmware.log

-rw-------    1 root     root     113246208 Aug 10 12:01 vmx-Windows Build-160649129-1.vswp

 

 

If the VM is powered off, then it's working, so are other VMs on the same host (and local datastore).

 

 

The host's vpxa.log contains

 

2013-08-10T12:27:05.989Z [FFAADB90 verbose 'provisioningvpxNfcServer' opID=task-internal-197952-121e1d84] [VPXNFCSERVER] Starting NFC server loop

2013-08-10T12:27:05.989Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] NfcServerProcessClientMsg: NFC Client authenticity check skipped!

2013-08-10T12:27:06.097Z [FFAADB90 verbose 'vpxavpxaVmprovUtil' opID=task-internal-197952-121e1d84] [VpxaVmprovUtil] DsPathToLocalPath conversion: [local-192.168.0.12] Windows Build/Windows Build.vmdk -> /vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.097Z [FFAADB90 verbose 'vpxavpxaDatastoreContext' opID=task-internal-197952-121e1d84] [VpxaDatastoreContext] Resolved DsPath [local-192.168.0.12] Windows Build/Windows Build.vmdk to localPath /vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.098Z [FFAADB90 verbose 'provisioningvpxNfcServer' opID=task-internal-197952-121e1d84] [VPXNFCSERVER] Received request to access ds:///vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.098Z [FFAADB90 verbose 'vpxavpxaVmprovUtil' opID=task-internal-197952-121e1d84] [VpxaVmprovUtil] DsPathToLocalPath conversion: [local-192.168.0.12] Windows Build/Windows Build.vmdk -> /vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.098Z [FFAADB90 verbose 'vpxavpxaDatastoreContext' opID=task-internal-197952-121e1d84] [VpxaDatastoreContext] Resolved DsPath [local-192.168.0.12] Windows Build/Windows Build.vmdk to localPath /vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.098Z [FFAADB90 verbose 'vpxavpxaDatastoreContext' opID=task-internal-197952-121e1d84] [VpxaDatastoreContext] No conversion for localpath /vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk

2013-08-10T12:27:06.118Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 0)

2013-08-10T12:27:06.420Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 1)

2013-08-10T12:27:06.720Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 2)

2013-08-10T12:27:07.021Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 3)

2013-08-10T12:27:07.324Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 4)

2013-08-10T12:27:07.564Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 7 (vpxa VM id), 307 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.566Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 14 (vpxa VM id), 721 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.567Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 15 (vpxa VM id), 723 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.569Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 16 (vpxa VM id), 726 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.570Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 17 (vpxa VM id), 729 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.571Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 29 (vpxa VM id), 769 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.573Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 30 (vpxa VM id), 771 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.574Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 163 (vpxa VM id), 22729 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.576Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 368 (vpxa VM id), 33494 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.577Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 371 (vpxa VM id), 33497 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.579Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 374 (vpxa VM id), 33501 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.580Z [FFF52B90 verbose 'hostdstats'] Set internal stats for VM: 536 (vpxa VM id), 34 (vpxd VM id). Is FT primary? false

2013-08-10T12:27:07.624Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] OBJLIB-FILEBE : FileBEOpen: can't open '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' : Failed to lock the file (262146).

2013-08-10T12:27:07.625Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-VMFS  : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk" : failed to open (Failed to lock the file): ObjLib_Open failed. Type 3

2013-08-10T12:27:07.625Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-LINK  : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk" : failed to open (Failed to lock the file).

2013-08-10T12:27:07.625Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-CHAIN : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk" : failed to open (Failed to lock the file).

2013-08-10T12:27:07.625Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-LIB   : Failed to open '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk' with flags 0x1e Failed to lock the file (16392).

2013-08-10T12:27:07.651Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 0)

2013-08-10T12:27:07.951Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 1)

2013-08-10T12:27:08.253Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 2)

2013-08-10T12:27:08.555Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 3)

2013-08-10T12:27:08.855Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] AIOMGR: AIOMgr_OpenWithRetry: Descriptor file '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' locked (try 4)

2013-08-10T12:27:09.156Z [FFAADB90 info 'Libs' opID=task-internal-197952-121e1d84] OBJLIB-FILEBE : FileBEOpen: can't open '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk' : Failed to lock the file (262146).

2013-08-10T12:27:09.156Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-VMFS  : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build-flat.vmdk" : failed to open (Failed to lock the file): ObjLib_Open failed. Type 3

2013-08-10T12:27:09.156Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-LINK  : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk" : failed to open (Failed to lock the file).

2013-08-10T12:27:09.156Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-CHAIN : "/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk" : failed to open (Failed to lock the file).

2013-08-10T12:27:09.156Z [FFAADB90 info 'DiskLib' opID=task-internal-197952-121e1d84] DISKLIB-LIB   : Failed to open '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk' with flags 0x5a Failed to lock the file (16392).

2013-08-10T12:27:09.156Z [FFAADB90 warning 'Libs' opID=task-internal-197952-121e1d84] [NFC ERROR] NfcFileDskOpenDisk: Failed to open '/vmfs/volumes/5150e097-16b0a50b-a4e3-00266cf04f88/Windows Build/Windows Build.vmdk': Failed to lock the file (16392).

2013-08-10T12:27:09.157Z [FFAADB90 warning 'Libs' opID=task-internal-197952-121e1d84] [NFC ERROR] NfcFile_Open: Open failed:

2013-08-10T12:27:09.157Z [FFAADB90 warning 'Libs' opID=task-internal-197952-121e1d84] [NFC ERROR] Sending diskLib error 16392: NfcFssrvrOpen: Failed to open '[local-192.168.0.12] Windows Build/Windows Build.vmdk': Failed to lock the file

2013-08-10T12:27:09.157Z [FFAADB90 warning 'Libs' opID=task-internal-197952-121e1d84] [NFC ERROR] NfcProcessStreamMsg: fssrvr failed with NFC error code = 13

2013-08-10T12:27:09.157Z [FFAADB90 warning 'Libs' opID=task-internal-197952-121e1d84] [NFC ERROR] NfcServerLoop: NfcServer_HandleRead returned an error : NFC_FILE_LOCKED

2013-08-10T12:27:09.157Z [FFAADB90 error 'provisioningvpxNfcServer' opID=task-internal-197952-121e1d84] [VPXNFCSERVER]  Nfc server failed with return value : NFC_FILE_LOCKED

2013-08-10T12:27:09.157Z [FFAADB90 verbose 'provisioningvpxNfcServer' opID=task-internal-197952-121e1d84] [VPXNFCSERVER] Closing NFC session

2013-08-10T12:27:09.157Z [FFAADB90 info 'commonvpxLro' opID=task-internal-197952-121e1d84] [VpxLRO] -- FINISH task-internal-197952 --  -- VpxNfcServerLro --

2013-08-10T12:27:09.157Z [FFAADB90 info 'Default' opID=task-internal-197952-121e1d84] [VpxLRO] -- ERROR task-internal-197952 --  -- VpxNfcServerLro: vmodl.fault.SystemError:


Viewing all articles
Browse latest Browse all 169668

Trending Articles