[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Accessing Xen on remote machine


  • To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
  • From: jd sw <jdsw2002@xxxxxxxxx>
  • Date: Mon, 26 Jun 2006 21:19:01 -0700 (PDT)
  • Cc: xendevel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 26 Jun 2006 21:19:30 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1pGVuByXJwUcJy+GCfBZghxNk+cTUpI6d2t/dL1wJwj88CrgXUDHtd+5+sRJe/ilIxbl74LDF4/rwyYm7J2TkNWL0fuALEDdunq8SwlqrtsS+6unuJkdgFGhpa4aq60A+4KVMNYSNjfRdnyK/JOPnot4yBkAdT/Ak2poURvAicE= ;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Thanks much. I really appreciate the prompt reply. I tried the tcp-xml rpc and it worked. (I will look in to Unix based scheme next)

Now, with the modification I can get stats, stop, kill remote vm.  I have couple of related questions..

a. How do I start a VM on a remote machine, given a (remote or local) conf file . (currently for local machine I use xen.xm.create.main(filename) )

b. Is it possible to get console of a remote domu ? currently I am  spawning, xm console with domid which works locally but not for remote doms.

c. Is it possible to save snapshot of a remote dom on a local machine directly? (This is similar to migrating to local machine and saving snapshot.)

Thanks in advance.
/Jd


Ewan Mellor <ewan@xxxxxxxxxxxxx> wrote:
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.
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)


How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.