VMware {code} Community
AlexanderPD
Contributor
Contributor

VDDK 6.0.0 (also 6.0.1) cannot connect to ESXi

Hi, i'm developing some ESXi backup feature and i already have implemented a working system using VDDK 5.5.3.

I successfully upgraded to 5.5.4, but when trying 6.0.0 or 6.0.1 i always have connection problems.

I just run those functions:

- VixDiskLib_InitEx

- VixDiskLib_ConnectEx

- VixDiskLib_PrepareForAccess

- VixDiskLib_Open

and all the needed to close disk, connection and backup..

I have bot VDDK's output log for 5.5.4 and 6.0.1, they are pretty similar except for issues.

Note: i correctly fill the thumbprint parameter in both 5.5.4 and 6.0.1 with the same value, but in 6.0.1 i also fill the nfcHostPort parameter

orange bold text is the "odd text" that i don't have in 5.5.4 log

*VixDiskLib_InitEx called

OBJLIB-LIB: Objlib initialized.

VixDiskLib: Attempting to locate advanced transport module in "C:\Stuff\ESXi\VDDK 6.0.1".

VixDiskLib: Advanced transport plugin C:\Stuff\ESXi\VDDK 6.0.1\bin\disklibplugin.dll was successfully loaded into vixDiskLib.

VixDiskLib: Enabling advanced transport modes.

OBJLIB-LIB: Objlib initialized.

VixDiskLib: Initialize transport modes.

VixDiskLib: Available transport modes: file:san:hotadd:nbdssl:nbd.

2015-09-23T12:54:45.558+02:00 info -[11200] [Originator@6876 sub=ThreadPool] Thread enlisted

VMware VixDiskLib (6.0) Release build-2942432

2015-09-23T12:54:45.558+02:00 info -[17932] [Originator@6876 sub=ThreadPool] Thread enlisted

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

PREF early PreferenceGet(poll.forceSelect), using default

POLL Using the WSAPoll API Implementation for PollDefault

VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.

*VixDiskLib_ConnectEx called

VixDiskLib: VixDiskLib_ConnectEx: Establish connection using (null).

VixDiskLib: VixDiskLib_Connect: Establish connection.

VixDiskLib: Resolve host.

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (183)

2015-09-23T12:54:48.216+02:00 error -[11200] [Originator@6876 sub=HttpConnectionPool-000000] [ConnectComplete] Connect failed to <cs p:0000002571c258a0, TCP:192.168.0.23:902>; cnx: (null), error: class Vmacore::Ssl::SSLException(SSL Exception: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)

2015-09-23T12:54:48.223+02:00 error -[23592] [Originator@6876 sub=HttpConnectionPool-000000] [ConnectComplete] Connect failed to <cs p:0000002571c258a0, TCP:192.168.0.23:902>; cnx: (null), error: class Vmacore::Ssl::SSLException(SSL Exception: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)

2015-09-23T12:54:48.226+02:00 error -[26320] [Originator@6876 sub=Default] Cannot use advanced transport modes for 192.168.0.23/moref=202/: Other error encountered: SSL Exception: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol.

VixDiskLib: VixDiskLib_ConnectEx: Advanced transport modes not available for opening moref=202. (Cannot use advanced transport modes for 192.168.0.23/moref=202/: Other error encountered: SSL Exception: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol.)

*VixDiskLib_PrepareForAccess called

VixDiskLib: VixDiskLib_PrepareForAccess: Prepare to access disk.

VixDiskLib: VixDiskLib_Connect: Establish connection.

VixDiskLib: Resolve host.

VixDiskLibVim: VixDiskLibVim_AllowVMotion: Disable VMotion.

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (140733193388215)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (140733193388215)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (140733193388215)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (140733193388215)

FILE: FileCreateDirectoryRetry: Non-retriable error encountered (C:\ProgramData\VMware): Unknown error 183 (0xb7) (140733193388215)

VixDiskLibVim: Error 18000 (listener error GVmomiFaultInvalidResponse).

VixDiskLibVim: Login failure. Callback error 18000 at 2439

VixDiskLibVim: Failed to find the VM. Error 18000 at 2511.

VixDiskLibVim: VixDiskLibVim_FreeNfcTicket: Free NFC ticket.

VixDiskLib: VixDiskLib_PrepareForAccess: Disable Storage VMotion failed. Error 18000 (Cannot connect to the host) (fault (null), type GVmomiFaultInvalidResponse, reason: (none given), translated to 18000) at 4000.

*VixDiskLib_Open called

VixDiskLib: VixDiskLib_OpenEx: Open a disk.

VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [SATA_3TB] Esxi 4.0/Esxi 4.0-000001.vmdk.

VixDiskLibVim: Error 18000 (listener error GVmomiFaultInvalidResponse).

VixDiskLibVim: Login failure. Callback error 18000 at 2439

VixDiskLibVim: Failed to find the VM. Error 18000 at 2511.

VixDiskLibVim: VixDiskLibVim_FreeNfcTicket: Free NFC ticket.

VixDiskLib: Error occurred when obtaining NFC ticket for [SATA_3TB] Esxi 4.0/Esxi 4.0-000001.vmdk. Error 18000 (Cannot connect to the host) (fault (null), type GVmomiFaultInvalidResponse, reason: (none given), translated to 18000) at 1989.

VixDiskLib: VixDiskLib_OpenEx: Cannot open disk [SATA_3TB] Esxi 4.0/Esxi 4.0-000001.vmdk. Error 18000 (Cannot connect to the host) at 4680.

VixDiskLib: VixDiskLib_Open: Cannot open disk [SATA_3TB] Esxi 4.0/Esxi 4.0-000001.vmdk. Error 18000 (Cannot connect to the host) at 4718.

So VixDiskLib_Open fails trying to open. I repeat: using VDDK 5.5.4 it work like a charm!

I didn't find any documentation on "how to upgrade your VDDK 5 program to VDDK 6" and the only differences i can see are the nfcHostPort parameter for VixDiskLibConnectParams struct (also, not documented in doc folder documentation) and some async read/write i don't use.

How i can fix this?

Reply
0 Kudos
5 Replies
yeahokhello
Contributor
Contributor

New in VDDK 6.0.1 Releases

New setting to control NFC port. The VDDK 6.0.1 release provides a new variable cnxParams.nfcHostPort to set the NFC data copy port when connecting to ESXi hosts. The Virtual Disk Programming Guide section “Connect to VMware vSphere” shows six elements in the cnxParams structure, including port, but not just-added nfcHostPort. The cnxParams.port is where vCenter Server and ESXi hosts listen for API queries. Specifying null allows the library to select the port for SOAP requests, usually 443 (HTTPS). The data copy port is then determined by the NFC ticket resulting from your program's vmxspec. As of VDDK 6.0.1, cnxParams.nfsHostPort sets the host NFC data copy port. Specifying null allows the library to select the host NFC port, usually 902. This is the port for NFC data copy only when directly connected to an ESX/ESXi host, in cases where your program never presents vmxspec. When connecting directly to an ESXi host:

  • If vmxspec is specified, all the port details are retrieved from the NFC ticket.
  • If vmxspec is not specified, the NFC port defaults to 902, unless customers set nfcHostPort explicitly.

For a list of new feaures in the VDDK 6.0 release, see the VDDK 6.0 Release Notes.

Reply
0 Kudos
pprandive
Contributor
Contributor

In my case, a simple C program using VDDK 5.5.4 is failing with below errors-

CnxAuthdConnect: Returning false because CnxAuthdProtoReadResponse2 failed

CnxConnectAuthd: Returning false because CnxAuthdConnect failed

Cnx_Connect: Returning false because CnxConnectAuthd failed

Cnx_Connect: Error message: Connection terminated by server

[NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: Connection terminated by server

Is your suggestion applicable in this case as well?

Could you please let me know? Need help please as I am badly stuck with this issue- Accessing .VMDK using VDDK 5.5.4 library.

Thanks!

Reply
0 Kudos
ebl44
Contributor
Contributor

Hello,

I just got the same message while porting my code from 5.5.4 to 6.0.1, and in my case, I was using "port=902" in the connection struct, while it should be port=443 and nfcHostPort=902. It was working before, but it's no longer the case. Just put port=0 and nfcHostPort=0, and it should be OK.

Bye

Reply
0 Kudos
suyog123
Contributor
Contributor

Hi all,

I have updated the vddk version from 5.5.4 to vddk 6.0.I have changed the  nfcHostPort to 0 as well but while trying to create a connection using API's to v sphere esxi host, i am getting following errors.

VMware VixDiskLib (6.0) Release build-3566099

VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.

VixDiskLib: VixDiskLib_ConnectEx: Establish connection using (null).

VixDiskLib: VixDiskLib_Connect: Establish connection.VixDiskLib: A thumbprint is required for SSL certificate validation. vixDiskLib.c line 2447

VixDiskLib: VixDiskLib_Connect: Failed to allocate connection. Error 3 (One of the parameters was invalid) at 3925.

vixError = 3. in vddk ApiVixDiskLib_ConnectEx

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

Also i have tried to create a disk locally on my linux vm host,using following command i am able to create a disk successfully but while converting a disk

i got following errors.

xyz@stest:~/vmware-vix-disklib-distrib/bin64$ sudo vmware-vdiskmanager -r myDisk.vmdk -t 6 -h 10.100.x.x -u root -f password.txt "[datastore2] oracle-centos-iso/targetDisk.vmdk"

VixDiskLib: Invalid configuration file parameter. Failed to read configuration file.

Can't create connection.

Please help me out, if i am missing something.

Reply
0 Kudos
suyog123
Contributor
Contributor

Update:

I am able to execute command on vddk 5.5.4 successfully but in vddk 6.0 it fails.

Reply
0 Kudos