Quantcast
Channel: VMware Communities : Unanswered Discussions - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 872

Connection/login problems

$
0
0

I'm playing around with VixDiskLib_Clone and VixDiskLib_Read for creating a simple backup application with CBT. My program works if I connect as user root, but if I create a new service account (e.g. 'backup') each call to VixDiskLib_Open fails with the following output:

 

12-04-27 22:12:50 [10        ] DEBUG CnxConnectAuthd: Returning false because CnxAuthdProtoAuthenticate failed
12-04-27 22:12:50 [10        ] DEBUG Cnx_Connect: Returning false because CnxConnectAuthd failed
12-04-27 22:12:50 [10        ] DEBUG Cnx_Connect: Error message: Login (username/password) incorrect
12-04-27 22:12:50 [10        ] DEBUG [NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: Login (username/password) incorrect
12-04-27 22:12:50 [10        ] DEBUG NBD_ClientOpen: Couldn't connect to xxxxxx:902 Login (username/password) incorrect

 

This only applies for the VixDiskLib connection. Calls to the web service API succeed with my service account 'backup'.

 

This is how I try to connect:

 

VixDiskLibConnectParams params = {0};

params.serverName = "esxihost"
params.creds.uid.userName = "backup";
params.creds.uid.password = "somesecret";
params.credType = VIXDISKLIB_CRED_UID;
params.port = 902;

 

VixDiskLibConnection conn = {0};
VixError res = VixDiskLib_Connect(&params, &conn);
CHECK_AND_THROW(res);

 

This connect stuff succeeds every time (also with account 'backup'). But subsequent calls to VixDiskLib_Open fail with the upper error message. I created the 'backup' service account with the vSphere client and added Administrator permissions to this account for the ESXi host context.

 

Once more:

- the code works if I use the root credentials of the ESXi host

- I can connect to the web service APIs with my 'backup' service account, but not via VixDiskLib_Connect/VixDiskLib_Open

- another ESXi host with same version (4.1.0, 381591), the same program and the same 'backup' service account also works

 

Any hints what's wrong or how I could figure out why this fails? vmware_hostd.log did not reveal any more useful information...


Viewing all articles
Browse latest Browse all 872

Trending Articles