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

[Xen-devel] xenstore and "my domid" on hvm guest

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] xenstore and "my domid" on hvm guest
From: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 21 May 2008 14:03:11 -0600
Delivery-date: Wed, 21 May 2008 13:04:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Organization: Oracle Corporation
Reply-to: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci7fbCQN74keaLETaexZML8kgZkYA==
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