From: Keir Fraser Subject: Re: Q: How to find own domid or uuid from domU? Date: Thu, 18 May 2006 11:01:59 +0100 Message-ID: <87882c2fef4a6cb52eeb9881d1b4ca4a@cl.cam.ac.uk> References: <87fyj7ravp.fsf@pike.pond.sub.org> <9c6da8341e7021597b69a4a4d941e993@cl.cam.ac.uk> <877j4jr7gd.fsf@pike.pond.sub.org> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <877j4jr7gd.fsf@pike.pond.sub.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Markus Armbruster Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 18 May 2006, at 10:46, Markus Armbruster wrote: > 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. Don't use DOMID. It can change across save/restore and migration. > Would you like to have an interface for obtaining one's UUID? What > about adding a XENVER_get_uuid code to HYPERVISOR_xen_version()? That might be okay, although even that might appear to change if we implement things like VM fork in future. Why does your guest need to know its ID? -- Keir