#include "vix.h"
#include <stdlib.h>
#include <stdio.h>
VixHandle hostHandle = VIX_API_VERSION;
/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:21: undefined reference to `VixHost_Connect'
/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:31: undefined reference to `VixJob_Wait'
/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:37: undefined reference to `Vix_ReleaseHandle'
/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:38: undefined reference to `VixHost_Disconnect'
I know that is mean the function is not defined.
but that should be defined as the api.......
Any can tell me how to solution the problem???
Thank
When a user executes 'vmrun' command, vmrun checks for library location and loads all the necessary libraries in a specific order. The order in which the libraries are loaded is specified in a file named 'manifest.txt'. In your test scenario, since you are trying to connect to the remote end ESX server, the library location is /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit. The manifest.txt is located at /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit/manifest.txt.
To resolve the issue, you need to change the library load order little bit.
Open the manifest.txt file. The current order to load the libraries is as follows:
....
libgobject-2.0.so.0
libgthread-2.0.so.0
.....
Modify the order to load libgthread first before loading the libgobject. The new content should be as follows:
....
libgthread-2.0.so.0
libgobject-2.0.so.0
.....
Save the manifest.txt. Remember, all you need to do is to just change the order for gobject and gthread libraries. You don't need to make any other changes. Run 'vmrun' command. Let us know if it works.
-Thanks
Sankar.
Addition Information
I am using ubuntu 64but .
Before i write the porgram to try connection , I have try to use vmrun commend to connection remoterly esxi server
but that notify Segmentation fault (core dumped) for me.
I has try run vmrun on the gdb , the result is following:
(gdb) run
Starting program: /usr/bin/vmrun -T esx -h https://myEsXIServer/sdk -u name -p password list
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3485700 (LWP 7598)]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) where
It has any relationship for my issue?
When a user executes 'vmrun' command, vmrun checks for library location and loads all the necessary libraries in a specific order. The order in which the libraries are loaded is specified in a file named 'manifest.txt'. In your test scenario, since you are trying to connect to the remote end ESX server, the library location is /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit. The manifest.txt is located at /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit/manifest.txt.
To resolve the issue, you need to change the library load order little bit.
Open the manifest.txt file. The current order to load the libraries is as follows:
....
libgobject-2.0.so.0
libgthread-2.0.so.0
.....
Modify the order to load libgthread first before loading the libgobject. The new content should be as follows:
....
libgthread-2.0.so.0
libgobject-2.0.so.0
.....
Save the manifest.txt. Remember, all you need to do is to just change the order for gobject and gthread libraries. You don't need to make any other changes. Run 'vmrun' command. Let us know if it works.
-Thanks
Sankar.
Please check https://www.vmware.com/support/developer/vix-api/vix111_reference/intro.html#13_95619 for information about compiling programs in linux.
Sample command:
gcc -I/usr/include/vmware-vix vixapp.c -o vixapp -lvixAllProducts -ldl -lpthread You need to specify -l option with the vix library name. Check http://bit.ly/vixapi for programming guide.
I following your guide, but it not work,following is my compile code
gcc -O0 -g3 -Wall -lvixAllProducts -ldl -lpthread -I/usr/include/vmware-vix -MMD -MP -MF"src/Connection.d" -MT"src/Connection.d" -o "src/Connection.o" "../src/Connection.c"
Any idea for the issue???
> gcc -O0 -g3 -Wall -lvixAllProducts -ldl -lpthread -I/usr/include/vmware-vix -MMD -MP -MF"src/Connection.d" -MT"src/Connection.d" -o "src/Connection.o" "../src/Connection.c"
When you execute the above command, what error did you get?
Ok, now i fix the complier error, but i don't know what issue onced...
i has try
gcc -o "src/Connection.o" "../src/Connection.c" -I/usr/include/vmware-vix
Maybe the issue that is onced by eclipse, i found only cannot compiler from the eclipse.
stanguturi wrote:
When a user executes 'vmrun' command, vmrun checks for library location and loads all the necessary libraries in a specific order. The order in which the libraries are loaded is specified in a file named 'manifest.txt'. In your test scenario, since you are trying to connect to the remote end ESX server, the library location is /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit. The manifest.txt is located at /usr/lib/vmware-vix/Workstation-8.0.0-and-vSphere-5.0.0/64bit/manifest.txt.
To resolve the issue, you need to change the library load order little bit.
Open the manifest.txt file. The current order to load the libraries is as follows:
....
libgobject-2.0.so.0
libgthread-2.0.so.0.....
Modify the order to load libgthread first before loading the libgobject. The new content should be as follows:
....
libgthread-2.0.so.0
libgobject-2.0.so.0.....
Save the manifest.txt. Remember, all you need to do is to just change the order for gobject and gthread libraries. You don't need to make any other changes. Run 'vmrun' command. Let us know if it works.
-Thanks
Sankar.
... -why- this needs to be done, on a > version 1.0 product is baffling.
-JMills, very curious to know what the VMware PR # is for this bug and how few digits is has. *sigh*