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] xenstore and "my domid" on hvm guest

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xenstore and "my domid" on hvm guest
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 22 May 2008 08:12:29 +0100
Delivery-date: Thu, 22 May 2008 00:12:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080521140311578.00000007168@djm-pc>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci7fbCQN74keaLETaexZML8kgZkYAAXYFex
Thread-topic: [Xen-devel] xenstore and "my domid" on hvm guest
User-agent: Microsoft-Entourage/11.4.0.080122
I think xenstore accesses in a domU have a 'current working directory' of
/local/domain/<domid>/. What happens if you try accesses without an initial
/ in the path?

 -- Keir

On 21/5/08 21:03, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> It appears that if an hvm guest has /proc/xen/xenbus, the
> xenstore-* tools can be made to work inside this guest.
> For example, inside an hvm guest which (according to
> "xm list" in domain0) has a domid of 2, I can do:
> 
> # xenstore-ls /local/domain/2
> 
> and it works fine, whereas:
> 
> # xenstore-ls /local/domain/0
> 
> fails properly with "Permission denied".
> 
> So I can use xenstore-read and xenstore-write inside the
> guest but I need to know "my" domid to do so.
> 
> Is there any way from inside the guest to determine
> its domid?  Alternately, is there any syntax for the
> xenstore tools that allows me to refer to "self"?
> 
> By using xenstore-exists repeatedly marching through the
> numerals, I can figure it out, but is there a better
> way?
> 
> Thanks,
> Dan
> 
> ===================================
> Thanks... for the memory
> I really could use more / My throughput's on the floor
> The balloon is flat / My swap disk's fat / I've OOM's in store
> Overcommitted so much
> (with apologies to the late great Bob Hope)
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel