VMware {code} Community
kublikhan
Contributor
Contributor
Jump to solution

Errors 22002 and 22003 with VixHost_Connect()

I am getting started working with the vmware API's. I wrote a c++ tool that calls them. It is working fine on my build machine with both VMware Workstation and our ESX server. However when I copy the tool to a test machine that has VMware Player installed, I can't get either player or the esx server working. Is there something additional I have to install on my test box to get this working? Is there something else that I have to change in my linker settings?

Build system:

Windows 7

VIX 1.8.1.10141

VMware Workstation 6.5.1.5078

Test system:

Windows XP SP2

Vmware Player 3.0.0.9911

ESX Server:

VMWare ESX Server 3i, 3.5.0, 111522

code:

m_ConnType = VIX_SERVICEPROVIDER_DEFAULT;

m_jobHandle = VixHost_Connect(VIX_API_VERSION, m_ConnType, W2A(lpsHostName), 0, W2A(lpsHostUser) , W2A(lpsHostPassword), 0, VIX_INVALID_HANDLE, NULL, NULL);

m_err = VixJob_Wait(m_jobHandle, VIX_PROPERTY_JOB_RESULT_HANDLE, &m_hostHandle, VIX_PROPERTY_NONE);

Runtime results:

Build machine: Both workstation and esx server work fine.

Test machine with esx server: Error 22002 – VIX_E_WRAPPER_VERSION_NOT_FOUND

The specified version was not found.

Test machine with Player: Error 22003 – VIX_E_WRAPPER_SERVICEPROVIDER_NOT_FOUND

The specified service provider was not found.

I have also tried setting the connection type to either VIX_SERVICEPROVIDER_VMWARE_VI_SERVER, VIX_SERVICEPROVIDER_VMWARE_WORKSTATION, or VIX_SERVICEPROVIDER_VMWARE_PLAYER, but the same error occurs.

Test machine Log File:

Feb 03 18:38:42.752: app-3892| Log for VixWrapper pid=3876 version=1 build=build-207905 option=Release

Feb 03 18:38:42.752: app-3892| The process is 32-bit.

Feb 03 18:38:42.752: app-3892| Host codepage=windows-1252 encoding=windows-1252

LOG NOT INITIALIZED | W32Util_IsDirectorySafe: Failed DACL num entries check, "..."

Feb 03 18:38:42.752: app-3892| Error: VIX wrapper config file (null)\vixwrapper-config.txt not found.

Feb 03 18:38:42.752: app-3892| Failed to load wrapper configuration file

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws_server_esx-4\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-5\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-3\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-3\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\ws-2\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| config points to non-existent implementation library '(null)\server-1\32bit\vix.dll'

Feb 03 18:38:42.752: app-3892| Player installed version is 3.0.0

Feb 03 18:38:42.752: app-3892| No implementation found for service provider 4, apiVersion -1 installedVersion 3.0.0

Feb 03 18:38:42.752: app-3892| No Vix library found for provider 4 revision -1

Feb 03 18:38:42.752: app-3892| No implementation libraries loaded, cannot call 'VixJob_OnFinishAsynchOpWithHandle'

Build machine log file:

Feb 03 19:47:24.747: app-4260| Log for VixWrapper pid=4496 version=1 build=build-207905 option=Release

Feb 03 19:47:24.747: app-4260| The process is 32-bit.

Feb 03 19:47:24.747: app-4260| Host codepage=windows-1252 encoding=windows-1252

Feb 03 19:47:24.747: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.748: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.768: app-4260| config points to non-existent implementation library 'C:\Program Files (x86)\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'

Feb 03 19:47:24.769: app-4260| passed in VIX_SERVICEPROVIDER_DEFAULT, computed hostType as 10

Feb 03 19:47:24.769: app-4260| Loading Vix implementation library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_AddRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_RemoveRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixVM_ListRollingTier from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:25.276: app-4260| unable to load func VixHost_OpenVM from library C:\Program Files (x86)\VMware\VMware VIX
VIServer-2.0.0\32bit\vix.dll (127)

Feb 03 19:47:29.021: app-4260| No such function 'VixHost_OpenVM' for version 4

0 Kudos
1 Solution

Accepted Solutions
stanguturi
VMware Employee
VMware Employee
Jump to solution

On your build machine, you have installed VIX package. On your test machine, you didn't install VIX package. You should install VIX package on your test machine.


Feb 03 18:38:42.752: app-3892| Error: VIX wrapper config file (null)\vixwrapper-config.txt not found.
Feb 03 18:38:42.752: app-3892| Failed to load wrapper configuration file

Since VIX Package is not installed, it didn't find config file (metadata for properly loading libraries]). Please install VIX on your test machine and post if you find any issues.

-Thanks

Sankar.

View solution in original post

0 Kudos
3 Replies
stanguturi
VMware Employee
VMware Employee
Jump to solution

On your build machine, you have installed VIX package. On your test machine, you didn't install VIX package. You should install VIX package on your test machine.


Feb 03 18:38:42.752: app-3892| Error: VIX wrapper config file (null)\vixwrapper-config.txt not found.
Feb 03 18:38:42.752: app-3892| Failed to load wrapper configuration file

Since VIX Package is not installed, it didn't find config file (metadata for properly loading libraries]). Please install VIX on your test machine and post if you find any issues.

-Thanks

Sankar.

0 Kudos
kublikhan
Contributor
Contributor
Jump to solution

After installing VIX on my test machine the problem went away. Thanks!

I misread the documentation. I thought player came with vix, but the doc says only workstation and server install vix.

0 Kudos
assafk
Contributor
Contributor
Jump to solution

i've experianced the same issue , but i think there is somthing that i am missing here

these are the steps that i've done :

1 . install the vmware vix API over my local machine (nothing special here) got only some asseblies and several code example

2. created a c++ project over VS2017  i've used the VixAllProductsDyn.dll

2.1 - project complies and runs without but VixHost_Connect failes to connect with error code 22003

this is the code sample

VixError err;

char *vmxPath;

VixHandle hostHandle = VIX_INVALID_HANDLE;

VixHandle jobHandle = VIX_INVALID_HANDLE;

VixHandle vmHandle = VIX_INVALID_HANDLE;

jobHandle = VixHost_Connect(VIX_API_VERSION,

//VIX_SERVICEPROVIDER_DEFAULT,

VIX_SERVICEPROVIDER_VMWARE_VI_SERVER,

"THE_VC_IP_ADDRESS", // *hostName,

0, // hostPort,

"THE_VC_USER_NAME", // *userName,

"THE_VC_PASSWORD", // *password,

0, // options,

VIX_INVALID_HANDLE, // propertyListHandle,

NULL, // *callbackProc,

NULL); // *clientData);

err = VixJob_Wait(jobHandle,

VIX_PROPERTY_JOB_RESULT_HANDLE,

&hostHandle,

VIX_PROPERTY_NONE);

if (VIX_FAILED(err)) {

std::cout << "connection failed " << err;

}

i dont believe i need to install the VIX over my VC

am i missing somthing ?

0 Kudos