From: Ewan Mellor Subject: Re: Accessing Xen on remote machine Date: Mon, 26 Jun 2006 08:21:49 +0100 Message-ID: <20060626072149.GA787@leeni.uk.xensource.com> References: <20060626063935.28949.qmail@web35810.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Return-path: Content-Disposition: inline In-Reply-To: <20060626063935.28949.qmail@web35810.mail.mud.yahoo.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: jd sw Cc: xendevel List-Id: xen-devel@lists.xenproject.org --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 25, 2006 at 11:39:35PM -0700, jd sw wrote: > Hi > What do I need to do to access Xen on a remote machine ? Currently my > program is using the 'server' object from the XendClient.py. > > There seems to be http, unix, tcp-xmlrpc, unix-xmlrpc servers. When > should each one of them be enabled/used. What port do they listen to ? http and unix are s-expressions or HTML pages over HTTP/TCP or HTTP over Unix domain sockets respectively. These are deprecated. tcp-xmlrpc and unix-xmlrpc is XML-RPC over HTTP/TCP or HTTP/Unix respectively. These are what you want to use. You can: a) use unix-xmlrpc, with Anthony Liguori's recent patch to transparently SSH into your local machine and issue commands to the Unix socket. This uses your SSH authentication scheme. See xm serve for details. b) enable and use tcp-xmlrpc, using the attached patch. This will listen on port 8005, and will use no authentication / encryption at all (SSL support is planned). Only use this on a secure network, obviously. > Also, relocation server uses which protocol. I would really appreciate if > someone can point me to some document/details. It's a proprietary protocol -- a small handshake and exchange of VM config, and then a dump of all the pages in memory. You'll have to dig into the code for details -- tools/python/xen/xend/{XendCheckpoint,XendDomainInfo}.py and tools/libxc/xc_linux_save.c should start you off. Ewan. --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="remote-xm.patch" diff -r 187180382772 tools/python/xen/xend/XendClient.py --- a/tools/python/xen/xend/XendClient.py Tue May 23 16:23:10 2006 +0100 +++ b/tools/python/xen/xend/XendClient.py Sun May 28 17:54:47 2006 +0100 @@ -25,4 +25,4 @@ ERROR_GENERIC = 2 ERROR_GENERIC = 2 ERROR_INVALID_DOMAIN = 3 -server = ServerProxy('httpu:///var/run/xend/xmlrpc.sock') +server = ServerProxy('http://:8005/RPC2') diff -r 187180382772 tools/python/xen/xend/server/XMLRPCServer.py --- a/tools/python/xen/xend/server/XMLRPCServer.py Tue May 23 16:23:10 2006 +0100 +++ b/tools/python/xen/xend/server/XMLRPCServer.py Sun May 28 17:54:47 2006 +0100 @@ -89,7 +89,7 @@ class XMLRPCServer: if self.use_tcp: # bind to something fixed for now as we may eliminate # tcp support completely. - self.server = TCPXMLRPCServer(("localhost", 8005), logRequests=False) + self.server = TCPXMLRPCServer(('', 8005), logRequests=False) else: self.server = UnixXMLRPCServer(XML_RPC_SOCKET, False) diff -r 187180382772 tools/examples/xend-config.sxp --- a/tools/examples/xend-config.sxp Tue May 23 16:23:10 2006 +0100 +++ b/tools/examples/xend-config.sxp Sun May 28 17:55:54 2006 +0100 @@ -16,7 +16,7 @@ #(xend-http-server no) #(xend-unix-server no) -#(xend-tcp-xmlrpc-server no) +(xend-tcp-xmlrpc-server yes) #(xend-unix-xmlrpc-server yes) #(xend-relocation-server no) (xend-relocation-server yes) --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --W/nzBZO5zC0uMSeA--