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] Am I running under Xen?

To: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Am I running under Xen?
From: Matthew Haas <haas@xxxxxxxxxxxxxx>
Date: Sun, 02 Mar 2008 22:01:38 -0500
Delivery-date: Sun, 02 Mar 2008 19:02:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080302215654.6358d3b4@zooty>
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>
Organization: Corning Community College
References: <20080302215654.6358d3b4@zooty>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
Tom Horsley wrote:
Is there a standard idiom most folks use to ask the
question: Am I a linux that was just booted under Xen?

I'm thinking about fooling with some of my alternate
boot partitions so they can be booted as paravirt
VMs, but they'd need to do a bit of reconfiguring
of themselves when running under Xen early in the boot
process (like not trying to mount other partitions
that are gonna be used by other virtual machines
and use a different host name, and don't start so many
system services, etc).

I suppose I could just check and see if the kernel
name has "xen" in it, but I just wondered if there
was one true way to ask this question.


This is actually a question I've also found myself asking... I've got a couple custom-built Debian packages that unroll various configurations onto VMs, dom0s, and regular machines... I find myself writing in all sorts of weird checks to try and determine what it is (and always am finding new loopholes that I need to close).

If there is a nice guaranteed way of detecting a Paravirtualized domU (or if the machine is acting as a dom0), I would also be interested in knowing (basing it off strings in the kernel name isn't necessarily 100% guaranteed).

-Matthew
--
 Matthew Haas
 Visiting Instructor
 Corning Community College
 Computer & Information Science
 http://lab46.corning-cc.edu/haas/home/

  "Writing should be like breathing;
   It is one of those important things we do." -- me

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