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-devel

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

To: "Kareem Dana" <kareem.dana@xxxxxxxxx>
Subject: Re: [Xen-devel] python xs.read/write in domU
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received: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; bh=tbGX7khappqdgGDLrjHQkifXxGydRgAg2/27l0ULOyU=; b=LSsLSFB6/oPWdYjR5TEuv3ob/Wz5ekUERTuEwqW2h2GmC++3P1fJppkjW1fa2SwPR/bVZHwxhIOHgfdLp1+H3i1efks0TKYC58K0ID8p+V0FwQz/fH9myeiLX+iqbd9PzEM8iYkamfFkrLJ1JMMqq2ifxmFSUPN7SVcU3hYsfIk=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <3bb76bfe0802190800p54071d5p127c3166a84d3b5c@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3bb76bfe0802190800p54071d5p127c3166a84d3b5c@xxxxxxxxxxxxxx>
Reply-to: Derek.Murray@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

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