From: Keir Fraser Subject: Re: xenstore and "my domid" on hvm guest Date: Thu, 22 May 2008 08:12:29 +0100 Message-ID: References: <20080521140311578.00000007168@djm-pc> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080521140311578.00000007168@djm-pc> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "dan.magenheimer@oracle.com" , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org I think xenstore accesses in a domU have a 'current working directory' of /local/domain//. What happens if you try accesses without an initial / in the path? -- Keir On 21/5/08 21:03, "Dan Magenheimer" 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@lists.xensource.com > http://lists.xensource.com/xen-devel