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: "Matthew Haas" <haas@xxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Am I running under Xen?
From: "Todd Deshane" <deshantm@xxxxxxxxx>
Date: Sun, 2 Mar 2008 22:21:44 -0500
Cc: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 02 Mar 2008 19:22:19 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=qXEXTrQSBB2HtdTyjUOWfUeS8K6iNzMr7FVPkhhJYfQ=; b=jKnHoA8CedY+zJJWYDE/BXwf2xF00NWM1zPXceOiuW8zmlsNJNdiNoamC1Y1tKUBaNtIGQ2v0zwjwLCUXWKlxdTfuI4s/Jfa/Mr5Q/qJs61fh0mNEentNluVbtxofmO8oGTDcVflbpfNAPwBkFV1HcANGgDHvkaIaVbO3L6kKfM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=mcWp8V2Guj22er7wt1HdjXO1c/EeneoO9b4YbopW+mDabyU7xnnA79bytcxyGqHrotcDNZ+qgb9V5Plp9UYERJoya1uV4iUIiCnW3pf8n9CW1SGxhML6V2HApSH0ApSEEWTZfijvsW0sAVgO67OKZx23Mtb+zpOiApO+4y0PJp0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47CB6A12.6020401@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: <20080302215654.6358d3b4@zooty> <47CB6A12.6020401@xxxxxxxxxxxxxx>
Reply-to: deshantm@xxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx


On Sun, Mar 2, 2008 at 10:01 PM, Matthew Haas <haas@xxxxxxxxxxxxxx> wrote:
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 thread might be useful

http://xen.markmail.org/search/?q=Shell%20test%20for%20pv%20vs%20hvm#query:Shell%20test%20for%20pv%20vs%20hvm+page:1+mid:nqh2wxik3qqqyugp+state:results

In particular, Alex Williamson has a little script that seems to do the detection.


Regards,
Todd


 

 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

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