I am working on Windows XP. I have VMware Server 2.0 Beta and the Vix Api that comes with that. I have successfully compiled on Visual C++ Toolkit 2003 as well as on Visual Studio 2005 the Vix Perl package. I am using Active Perl 5.8.0.802 build. I am getting the following error when i run findhosttest.pl:
VmhsHostInfoPopulateSystem: Could not get model of host.
VmhsHostInfoPopulateSystem: Could not get vendor of host.
Connect failed, 1 Unknown error
I have modifies the following variables in findhosttest.pl:(The hostname and connType/hostHandle entries are as per some of the previous discussions in the Community forum)
$connType = VIX_SERVICEPROVIDER_VMWARE_VI_SERVER;
my $hostname = "[http://127.0.0.1:8307/sdk]";
my $hostport = 0;
my $username = undef;
my $password = undef;
When the actual username and password for the current user on the localhost are given as
my $username = "username" ; my $password = "passwd";
with the hostport and hostname being the same as above then i get the following error:
VmhsHostInfoPopulateSystem: Could not get model of host.
VmhsHostInfoPopulateSystem: Could not get vendor of host.
vimService.wsdl:1: parser error : Opening and ending tag mismatch: HR line 1 and body
able.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body>
^
vimService.wsdl:1: parser error : Opening and ending tag mismatch: HR line 1 and html
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
vimService.wsdl:1: parser error : Premature end of data in tag body line 1
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
vimService.wsdl:1: parser error : Premature end of data in tag html line 1
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
noname.xml:1: parser error : Opening and ending tag mismatch: HR line 1 and body
able.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body>
^
noname.xml:1: parser error : Opening and ending tag mismatch: HR line 1 and html
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
noname.xml:1: parser error : Premature end of data in tag body line 1
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
noname.xml:1: parser error : Premature end of data in tag html line 1
u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
^
Connect failed, 1 Unknown error
I am not able to debug the vimService.wsdl file (as i am totally new to WebServices) located for me in C:\Program Files\VMware\VMware Server\hostd\docroot\sdk. It reads as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2008 VMware, Inc. All rights reserved.
-->
<definitions targetNamespace="urn:vimuberService"
xmlns="[http://schemas.xmlsoap.org/wsdl/]"
xmlns:soap="[http://schemas.xmlsoap.org/wsdl/soap/]"
xmlns:interface="urn:vimuber"
>
<import location="vim.wsdl" namespace="urn:vimuber" />
<service name="VimService">
<port binding="interface:VimBinding" name="VimPort">
<soap:address location="[https://localhost/sdk/vimService]" />
</port>
</service>
</definitions>
I am trying to connect to my localhost as the current user. But when i actually try to get the url http://127.0.0.1:8307/sdk its not able to connect to that page in Explorer. It gives the Page Cannot be displayed error. I have actually tried to use various combinations of ports and ip's (including localhost, machine name ip https/http) without much success in terms of both connecting directly to the /sdk url and also by giving it in the perl code. I got the 8307 port number by looking at the proxy.xml and config.xml files by looking in E:\Documents and Settings\All Users\Application Data\VMware\VMware Server\hostd. Normally i am able to connect to VMware Server UI : http://127.0.0.1:8308/ui. I am able to manually do all operations like starting and stopping VMs etc.
I dont know if the VI sdk is fully installed. I have as of now tried out only what has been the default installation of VMware Server 2.0. It seems by going thorugh the docs that VI sdk is for VMware Virtual Center and ESX Server. I am using only VMware Server 2.0 in my machine and no Virtual Center/ ESX Server.
I have also tried using the Vix Perl that gets installed when i try to run the VMware Vix exp installer.(Vix API 1.5) I built and compiled the package without errors on Visual Studio 2005. But when i run the Perl code i get the same results. The reason why i am now using the Vix Perl which comes bundled with the VMware Server 2.0 is that for previuos VMware Server 1.0 versions i have been able to successfully run the sample scripts on both Linux and Windows only if i use the one which comes with the Servers. If i install Vix API 1.1.4 it seems to give problems.
Any help in this regard is appreciated. I am new to VMware Server 2.0 and dont know what other changes to make in the perl scripts vimServiice file.