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-users

Re: [Xen-users] getting domain info from inside a guest

To: Juan Walker <juan@xxxxxxxxxxx>
Subject: Re: [Xen-users] getting domain info from inside a guest
From: "Andrew D. Ball" <aball@xxxxxxxxxx>
Date: Mon, 14 Aug 2006 15:42:05 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 14 Aug 2006 12:42:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <91be47c60608141208r7c4421faxea5085856d2f3aae@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <91be47c60608141208r7c4421faxea5085856d2f3aae@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Try looking for

/sys/hypervisor/type

and

/sys/hypervisor/uuid inside of the domU.

On recent versions of Xen, the first will have 'xen' in it, and the
second will have the domU.

To determine whether you're in a domU or a dom0, the best way I've seen
so far is to look for control_d in /proc/xen/capabilities.  It's there
for dom0, but not for domU's.  Does someone know of a better way to do
this?

Peace.
Andrew

On Mon, 2006-08-14 at 15:08 -0400, Juan Walker wrote:
> Does anyone know if there is a way to programatically determine if
> code is running in a guest domain? Also, is there a way to get some
> information from the host? I'd like for example for a program running
> on a guest to find out the UUID of the guest. Is this possible at
> all? 
> 
> Thanks for your help.
> 
> Juan
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

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