Hello,
I'm trying to install the VMware VIX Perl API on a Linux machine (Debian Etch, 2.6.18-3-686-bigmem), but haven't found any clear and complete documentation on how to do this, so I've tried a couple things, both of which result in a run-time error (perhaps related to they way I installed it). I'm trying to use this with VMware Server 1.0.x that's running on the same host.
I downloaded VMware-vix-1.1.4-93057.i386.tar.gz and untarred it. Then I cd'd to vmware-vix-distrib and ran vmware-install.pl, accepting default answers.
At this point, I tried "perl -MVMware::Vix::Simple" to check if it was installed and it wasn't yet. So, I spot /usr/lib/vmware-vix/lib/api/vix-perl.tar.gz and untar that. I do a normal CPAN type installation sequence (perl Makefile.PL; make; make install) and everything seems to go okay.
I do the installation check again and see some error that leads me to believe that libvix.so was not being found. (Sorry, the exact error message has scrolled off of my terminal history.)
So, I copied /usr/lib/vmware-vix/lib/server-1/32bit/libvix.so to /usr/lib (could have done a symlink too). This solved that error and there were no errors from trying to load the VMware::Vix::Simple class, so I assume everything is installed okay.
Skip forward a few days till I'm trying some actual Perl coding with the API. I write a simple script that starts off with a HostConnect(). HostConnect() returns a error 3 ("One of the parameters was invalid"). I try changing parameters and using the Perl debugger. I also tried findhosttest.pl from vix-perl/samples ($useWorkstation set to 0) and get the same error. So I eventually conclude that the invalid parameter must be the API version number that is the first argument. (Couldn't it just have said this?)
So next I try coping libvix.so from the vix-perl package to /usr/lib instead; this is the same as the libvix.so under /usr/lib/vmware-vix/lib/ws-5/32bit/libvix.so.
Running findhosttest.pl with $useWorkstation set to 0 now yields a Segmentation fault. (It doesn't SEGV with $useWorkstation set to 1, but doesn't find any VMs either since I'm actually using VMware Server.)
I tried running strace and appended the end of the trace below.
Any suggestions?
Thanks.
=========
access("/usr/sbin/vmware-authd", X_OK) = 0
access("/usr/sbin/vmware-authd", X_OK) = 0
socketpair(PF_FILE, SOCK_STREAM, 0, ) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7db1928) = 24716
waitpid(24716, NULL, 0) = 24716
close(39) = 0
read(38, "2", 1) = 1
read(38, "2", 1) = 1
read(38, "0", 1) = 1
read(38, " ", 1) = 1
read(38, "V", 1) = 1
read(38, "M", 1) = 1
read(38, "w", 1) = 1
read(38, "a", 1) = 1
read(38, "r", 1) = 1
read(38, "e", 1) = 1
read(38, " ", 1) = 1
read(38, "A", 1) = 1
read(38, "u", 1) = 1
read(38, "t", 1) = 1
read(38, "h", 1) = 1
read(38, "e", 1) = 1
read(38, "n", 1) = 1
read(38, "t", 1) = 1
read(38, "i", 1) = 1
read(38, "c", 1) = 1
read(38, "a", 1) = 1
read(38, "t", 1) = 1
read(38, "i", 1) = 1
read(38, "o", 1) = 1
read(38, "n", 1) = 1
read(38, " ", 1) = 1
read(38, "D", 1) = 1
read(38, "a", 1) = 1
read(38, "e", 1) = 1
read(38, "m", 1) = 1
read(38, "o", 1) = 1
read(38, "n", 1) = 1
read(38, " ", 1) = 1
read(38, "V", 1) = 1
read(38, "e", 1) = 1
read(38, "r", 1) = 1
read(38, "s", 1) = 1
read(38, "i", 1) = 1
read(38, "o", 1) = 1
read(38, "n", 1) = 1
read(38, " ", 1) = 1
read(38, "1", 1) = 1
read(38, ".", 1) = 1
read(38, "0", 1) = 1
read(38, ",", 1) = 1
read(38, " ", 1) = 1
read(38, "M", 1) = 1
read(38, "K", 1) = 1
read(38, "S", 1) = 1
read(38, "D", 1) = 1
read(38, "i", 1) = 1
read(38, "s", 1) = 1
read(38, "p", 1) = 1
read(38, "l", 1) = 1
read(38, "a", 1) = 1
read(38, "y", 1) = 1
read(38, "P", 1) = 1
read(38, "r", 1) = 1
read(38, "o", 1) = 1
read(38, "t", 1) = 1
read(38, "o", 1) = 1
read(38, "c", 1) = 1
read(38, "o", 1) = 1
read(38, "l", 1) = 1
read(38, ":", 1) = 1
read(38, "V", 1) = 1
read(38, "N", 1) = 1
read(38, "C", 1) = 1
read(38, " ", 1) = 1
read(38, "\r", 1) = 1
read(38, "\n", 1) = 1
write(38, "GLOBAL server-vmdb\r\n", 20) = 20
read(38, "2", 1) = 1
read(38, "0", 1) = 1
read(38, "0", 1) = 1
read(38, " ", 1) = 1
read(38, "C", 1) = 1
read(38, "o", 1) = 1
read(38, "n", 1) = 1
read(38, "n", 1) = 1
read(38, "e", 1) = 1
read(38, "c", 1) = 1
read(38, "t", 1) = 1
read(38, " ", 1) = 1
read(38, "G", 1) = 1
read(38, "l", 1) = 1
read(38, "o", 1) = 1
read(38, "b", 1) = 1
read(38, "a", 1) = 1
read(38, "l", 1) = 1
read(38, "\r", 1) = 1
read(38, "\n", 1) = 1
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 24712 detached
=========
Thank you. Installing the vmware-vix package from inside the VMware Server
distribution corresponding to my version of VMware Server worked. I did
both the vmware-install.pl and install of the vix-perl that was inside that.
At that point, there was no libvix.so to worry about.