Sachin Goel
2009-Dec-21 16:28 UTC
[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@lists.xensource.com http://lists.xensource.com/xen-users
Sachin Goel
2009-Dec-21 18:22 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
Does anybody has an idea about this ?? - Thanks, Sachin. ----- Original Message ----- From: sachin.goel@oracle.com To: xen-users@lists.xensource.com 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nick Couchman
2009-Dec-21 20:59 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
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. -Nick>>> On 2009/12/21 at 11:22, Sachin Goel <SACHIN.GOEL@oracle.com> wrote: > Does anybody has an idea about this ?? > > - Thanks, > Sachin. > > ----- Original Message ----- > From: sachin.goel@oracle.com > To: xen-users@lists.xensource.com > 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@lists.xensource.com > 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 Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sachin Goel
2009-Dec-21 21:09 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
Thanks Nick for the inputs!! Xen recommends the MAC addresses to start with 00:16:3e..cann''t that be used to determine if a machine is virtual or not by checking the MAC addresses..but the point that would be handy to know will be what is the level of recommendation..is it strictly forced by Xen (like VMWare does) or its just a recommendation ?? - Thanks, Sachin. ----- Original Message ----- From: Nick.Couchman@seakr.com To: xen-users@lists.xensource.com, SACHIN.GOEL@oracle.com Sent: Tuesday, December 22, 2009 2:31:55 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi Subject: Re: [Xen-users] How to detect if a machine is a Virtual machine ?? 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. -Nick>>> On 2009/12/21 at 11:22, Sachin Goel <SACHIN.GOEL@oracle.com> wrote: > Does anybody has an idea about this ?? > > - Thanks, > Sachin. > > ----- Original Message ----- > From: sachin.goel@oracle.com > To: xen-users@lists.xensource.com > 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@lists.xensource.com > 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 Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nick Couchman
2009-Dec-21 21:12 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
Possibly so, yes; however, Xen (at least the open source version) does not strictly enforce this the way VMware does. In Xen I have had occasions where I used MAC addresses outside of the Xen vendor range for various reasons, so this isn''t a 100% reliable method. -Nick>>> On 2009/12/21 at 14:09, Sachin Goel <SACHIN.GOEL@oracle.com> wrote: > Thanks Nick for the inputs!! > > Xen recommends the MAC addresses to start with 00:16:3e..cann''t that be used > to determine if a machine is virtual or not by checking the MAC > addresses..but the point that would be handy to know will be what is the > level of recommendation..is it strictly forced by Xen (like VMWare does) or > its just a recommendation ?? > > - Thanks, > Sachin. > > > ----- Original Message ----- > From: Nick.Couchman@seakr.com > To: xen-users@lists.xensource.com, SACHIN.GOEL@oracle.com > Sent: Tuesday, December 22, 2009 2:31:55 AM GMT +05:30 Chennai, Kolkata, > Mumbai, New Delhi > Subject: Re: [Xen-users] How to detect if a machine is a Virtual machine ?? > > 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. > > -Nick > >>>> On 2009/12/21 at 11:22, Sachin Goel <SACHIN.GOEL@oracle.com> wrote: >> Does anybody has an idea about this ?? >> >> - Thanks, >> Sachin. >> >> ----- Original Message ----- >> From: sachin.goel@oracle.com >> To: xen-users@lists.xensource.com >> 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@lists.xensource.com >> 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 > Xen-users@lists.xensource.com > 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 Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tom Clark
2009-Dec-21 23:07 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
On 2009/Dec/21 21:58, Sachin Goel wrote:> 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 ? >Hello Sachin, You should be able to get some useful information from the DMI, e.g: % for i in system-manufacturer system-product-name system-version\ system-serial-number; do echo -n "$i: "; sudo dmidecode -s $i; done system-manufacturer: Xen system-product-name: HVM domU system-version: 3.3.1 system-serial-number: 89e5915f-dead-beef-cefd-46904ea94c4a Tom -- Regards, Tom Clark xen-users@woot.co.uk _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jorge Armando Medina
2009-Dec-21 23:37 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
Sachin Goel wrote:> 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 ?Probably checking kernel process, check your process table for: [xenwatch] [xenbus] Another clue is checking the kernle suffix, for example: # uname -r 2.6.24-23-xen and the proc files: /proc/xen/capabilities Hope this helps.> > Thanks, > Sachin. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Jorge Armando Medina Computación Gráfica de México Web: http://www.e-compugraf.com Tel: 55 51 40 72, Ext: 124 Email: jmedina@e-compugraf.com GPG Key: 1024D/28E40632 2007-07-26 GPG Fingerprint: 59E2 0C7C F128 B550 B3A6 D3AF C574 8422 28E4 0632 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Kenni Lund
2009-Dec-22 00:47 UTC
Re: [Xen-users] How to detect if a machine is a Virtual machine ??
2009/12/21 Sachin Goel <sachin.goel@oracle.com>:> 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 ?Have a look at virt-what: https://www.redhat.com/archives/fedora-virt/2009-December/msg00055.html Best Regards Kenni Lund _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users