From: Markus Armbruster Subject: Re: Q: How to find own domid or uuid from domU? Date: Thu, 18 May 2006 11:46:42 +0200 Message-ID: <877j4jr7gd.fsf@pike.pond.sub.org> References: <87fyj7ravp.fsf@pike.pond.sub.org> <9c6da8341e7021597b69a4a4d941e993@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <9c6da8341e7021597b69a4a4d941e993@cl.cam.ac.uk> (Keir Fraser's message of "Thu, 18 May 2006 09:55:03 +0100") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser writes: > On 18 May 2006, at 09:32, Markus Armbruster wrote: > >> I can access xenstore /local/domain/DOMID in domU's kernel through the >> xen/xenbus.h API. What I can't figure out for love or money is how to >> determine DOMID. Or UUID, for that matter. Ideas? > > DOMID is ephemeral so we don't want guests looking at it. UUID is a > different matter -- I think we simply don't have an interface for > obtaining it right now. > > -- Keir I can map from domid to uuid by reading /local/domain/DOMID/vm. I got that to work by trying DOMIDs starting with 0 until the read succeeds, but that's kind of gross. I can think of some less gross methods to find my domid, but I'd still be glad to hear suggestions. Would you like to have an interface for obtaining one's UUID? What about adding a XENVER_get_uuid code to HYPERVISOR_xen_version()?