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/
Home Products Support Community News


[Xen-devel] Re: How to get user domain UUID from dom0

To: Liran Schour <LIRANS@xxxxxxxxxx>
Subject: [Xen-devel] Re: How to get user domain UUID from dom0
From: Mike Day <ncmike@xxxxxxxxxx>
Date: Wed, 27 Sep 2006 08:54:37 -0400
Cc: "Fischer, Anna" <anna.fischer@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 27 Sep 2006 05:44:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <OF8D4C55C0.CDAAE807-ONC22571F5.00309499-C22571F5.003129A5@xxxxxxxxxx>
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: IBM Linux Technology Center
References: <86FE9B2B91ADD04095335314BE6906E871B4C8@xxxxxxxxxxxxxxxxxxxxxxxxx> <OF8D4C55C0.CDAAE807-ONC22571F5.00309499-C22571F5.003129A5@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On 26/09/06 11:56 +0300, Liran Schour wrote:

"Fischer, Anna" <anna.fischer@xxxxxx> wrote on 25/09/2006 19:31:32:

One option to get the UUID is to read it from the Xenstore. The Xenstore
can be accessed in user space (using xenstore-read/write) and in kernel
space using the kernel API. The API is defined in tools/xenstore/xs.h.

All domains are indexed by their UUID in the Xenstore in the path /vm.
There're different ways to find the UUID. If you have the domain ID then
you can find the UUID under /local/domain/$DOMID/vm/$UUID.

You might want to have a look in the Xenstore reference of the XenWiki.
There's some sample code, too. Is that what you were looking for?

I need to get the UUID from kernel space. As I have noticed the kernel API
(xenbus_scanf) assumes you are already in /local/domain/0 and starts the
lookup from that point. I need to go back in the path to /local/domain/X I
don't know how to do this from kernel space.

I started to look at this issue with the intent of making each
domain's uuid and other info available in via sysfs, which means it
would also be available in kernel space.
However I concluded that it was too ugly and would run in to
previously expressed skepticism in the kernel community regarding xen
information in sysfs.
What I determined at the time (a couple of months ago) was that the
kernel needed an API to xenstore, via xenbus. The path would entail
going through xenbus to register for an event (creation of a new
domain), then exporting that information back to userspace through
sysfs. I just didn't make a lot of sense.
Any other approach, I beleive, would run in to similar issues, because
kernel space has no idea what its UUID is.


Mike D. Day
Virtualization Architect Sr. Technical Staff Member, IBM LTC
Cell: 919 412-3900 Office: 919 543-4283
AIM: ncmikeday  Yahoo: ultra.runner

Xen-devel mailing list

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