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

Re: [Xen-devel] python xs.read/write in domU


  • To: "Kareem Dana" <kareem.dana@xxxxxxxxx>
  • From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
  • Date: Tue, 19 Feb 2008 16:30:01 +0000
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 19 Feb 2008 08:30:25 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=aVf02qMMCtTkp7ocTogtECWunD+v+wPNVJcDqvactjhEiuhByCjAWBOdM0JgofnrLTq8jUj3Kzy2cB/QzQXy/eVSedoI4IhLHvzqAr2z4+WX3wrhYPRSX2koScE03+4xcFiVVQAw6zYHHbGDL1RNdwSMmVxda961P6Xh8tMWtUk=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi Kareem,

On Feb 19, 2008 4:00 PM, Kareem Dana <kareem.dana@xxxxxxxxx> wrote:
> This code works fine in dom0. I've found that if i do xenstore-read -s
> it will give me the same No such file or directory error. The -s
> parameter forces xenstore-read to call xs_daemon_open() instead of
> xs_domain_open(). The python lowlevel xs file always calls
> xs_daemon_open(). Is this the issue? What is the difference between
> daemon and domain_open?

I expect that this is the issue. xs_daemon_open() uses a UNIX domain
socket for communication with the xenstore daemon, which is a process
running in Dom0. xs_domain_open() uses a kernel module and the xenbus
to talk to xenstore. Therefore, only xs_domain_open() will work in a
DomU. You could probably add a function to lowlevel/xs.c to do this so
that you can use the Python functions in your DomU script.

> Also just to test, I tried to run xend inside domU. Xend fails with an
> operation not permitted error, but then when I run test.py after that
> I get a Connection Refused error instead of No such file or directory.
> Not sure what is going on. I'm using Ubuntu 7.10 with Xen 3.1.0 from
> their prebuilt packages.

A rough guess here would be that starting xend also starts xenstored
in your DomU, which initialises the relevant sockets. Your program
would then be attempting to connect to the xenstore running in your
DomU, which is being refused for some reason.

Regards,

Derek.

_______________________________________________
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®.