WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] Authentication on XenAPi

To: lestat thor <lestathor@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] Authentication on XenAPi
From: Saurabh Garg <saurabh.g.garg@xxxxxxxxxx>
Date: Fri, 06 Jul 2007 10:11:44 +0530
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Jul 2007 21:40:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070705143920.EB3A5CA0A4@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <20070705143920.EB3A5CA0A4@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.12 (Windows/20070509)
In the file /etc/xen/xend-config.sxp, append the following:

(xen-api-server ((9363 'none' '' )(unix none)))

and restart the xend service. This will allow you to connect to the api-server on port 9363 (unconditional access, no authentication.... you can modify this for conditional access/authentication as per your requirements, which is explained at the top of the same file)....

Verify by "telnet <xenhost> 9363", and see if you are able to connect..

You will not need any other configuration (for http/tcp xmlrpc-server etc.), and may very well comment them out... Just make sure, there are no more uncommented lines in the file which specify some other service to use the port 9363....

I'm not very much sure about perl as such, but at the first look:
   new("http://$xenhost:$xenhosts{$xenhost}{'port'}");
seems to be not what you want.... your url must be of the format "http://xenhost:port";...

Saurabh.

lestat thor wrote:
Hi,

I'm making a Webmin module to monitor my Xen servers, based on a perl script, writed 
by Ingard Mevåg (thank a lot).

But I am not able to connect me on a XenApi session, because I don't understand 
how to configure xend-config.sxp file.

Here the lines i'm using to connect to a session on my perl script :

##### CONFIG ######
my %xenhosts = ("192.168.0.12" => {"port" => "9363"},"localhost" => {"port" => "9363"} ); ##### CONFIG END ###

##### STATIC VARS #####
my %host_info;
#######################
my $xen = RPC::XML::Client->new("http://$xenhost:$xenhosts{$xenhost}{'port'}");
            my $session = $xen->simple_request("session.login_with_password", " "," 
");
              if (! $session)
              {
                       print "Can't connect to $xenhost :(\n";
                       $xenhosts{$xenhost} = {'xen' => $xen, 'session' => ""};
               }
               else
               {
                       $xenhosts{$xenhost} = {'xen' => $xen, 'session' => 
$session->{'Value'}};
                       print "Connected successfully to $xenhost..\n";
               }

When I Launch my script, there result "Can't connect to $xenhost :(".

Where are the loggin and password authentication,in which file?
Could you help me to choose the good parameter  in :
(xend-http-server no)
(xend-unix-server no)
(xend-tcp-xmlrpc-server no)
(xend-unix-xmlrpc-server yes)
(xend-relocation-server no)
(xend-relocation-server yes)
(xend-unix-path /var/lib/xend/xend-socket)
...

Thanks

=




_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>