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/
Home Products Support Community News


Re: [Xen-users] How to detect if a machine is a Virtual machine ??

To: <xen-users@xxxxxxxxxxxxxxxxxxx>, "Sachin Goel" <SACHIN.GOEL@xxxxxxxxxx>
Subject: Re: [Xen-users] How to detect if a machine is a Virtual machine ??
From: "Nick Couchman" <Nick.Couchman@xxxxxxxxx>
Date: Mon, 21 Dec 2009 13:59:51 -0700
Delivery-date: Mon, 21 Dec 2009 13:01:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
There are a few ways that you can determine that you're in a virtual platform.  
First, if the platform is PV platform, you either use uname to find the kernel 
name (usually contains a reference to Xen) or look for the /proc/xen directory. 
 You can also look in /sys/hypervisor/type, which exists on Xen platforms.  On 
PV domUs, /proc/xen/capabilities should be empty - on dom0 it will have the 
various available types of domUs listed.  Of course, this is mainly for 
Linux-based PV domUs - other platforms will have indications elsewhere.

For HVM domUs it's much harder to tell - probably the best way is to look at 
the hardware specs and see if they match what Xen (Qemu) emulates as hardware.  
Since many HVM kernels are not "aware" of the fact that they are running as 
virtual machines, there isn't necessarily anything you can look for to make 
that determination.  Some HVM domUs run PV drivers (e.g. the Windows GPL PV 
drivers) that could tip you off, but it just depends on the configuration of 
the domU kernel and drivers.


>>> On 2009/12/21 at 11:22, Sachin Goel <SACHIN.GOEL@xxxxxxxxxx> wrote: 
> Does anybody has an idea about this ??
> - Thanks,
> Sachin.
> ----- Original Message -----
> From: sachin.goel@xxxxxxxxxx
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Sent: Monday, December 21, 2009 10:51:45 PM GMT +05:30 Chennai, Kolkata, 
> Mumbai, New Delhi
> Subject: [Xen-users] How to detect if a machine is a Virtual machine ??
> Hi,
> Just curious to know, if there is any way that given a terminal to a 
> box, we can determine is it a physical machine or a virtual machine ?
> Thanks,
> Sachin.
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

This e-mail may contain confidential and privileged material for the sole use 
of the intended recipient.  If this email is not intended for you, or you are 
not responsible for the delivery of this message to the intended recipient, 
please note that this message may contain SEAKR Engineering (SEAKR) 
Privileged/Proprietary Information.  In such a case, you are strictly 
prohibited from downloading, photocopying, distributing or otherwise using this 
message, its contents or attachments in any way.  If you have received this 
message in error, please notify us immediately by replying to this e-mail and 
delete the message from your mailbox.  Information contained in this message 
that does not relate to the business of SEAKR is neither endorsed by nor 
attributable to SEAKR.

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] How to detect if a machine is a Virtual machine ??, Nick Couchman <=