Skip to contentSkip to conversation

How to detect if a machine is a Virtual machine ??

DISCUSSION Sachin Goel 2 participants 2 messages Dec 23, 2009 – Jan 4, 2010

lore
Share & tools
lore
#0 lore raw

Thanks Michal for clarifying..

For a moment I got confused :)

- Sachin.

----- Original Message -----
From: [email protected]
To: [email protected]
Sent: Thursday, December 24, 2009 1:20:34 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: [Xen-devel] How to detect if a machine is a Virtual machine ??

Quoted 15 lines · Michal Novotny
Quoted 9 lines · John Haxby
Quoted 7 lines · Michal Novotny

Hi Sachin,
the tool is not in the virtual machine. This is the tool that's in dom0. Since there is a source code for this one you could scp it to the guest, compile and run inside the guest environment. There is no need to provide a guest with this tool by default and in fact this is really impossible so it's better to scp it to the guest and compile there.

Quoted 5 lines

It's also worth pointing out that the underlying test for xen in this program executes a particular instruction to find the information
about its environment. What that means is that it's possible to
write a version of ./tools/misc/xen-detect.c that will work in any guest machine OS.

Quoted 4 lines

But one more point, if you want to know whether XEN_PV is returned for dom0 PV guest or domU (since it's the same for both) you can try to look for /proc/xen/privcmd. This one is available only in dom0 because privileged commands are for privileged domain (domain-0) only...

Oh, sorry, I did mean for domU PV guest or dom0, of course...

Michal

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Yeah, sorry about that. Hope you're not confused anymore ;)

Michal

Quoted 46 lines · Sachin Goel

Thanks Michal for clarifying..

For a moment I got confused :)

- Sachin.

----- Original Message -----
From: [email protected]
To: [email protected]
Sent: Thursday, December 24, 2009 1:20:34 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: [Xen-devel] How to detect if a machine is a Virtual machine ??

Quoted 18 lines · Michal Novotny
Quoted 10 lines · John Haxby
Quoted 8 lines · Michal Novotny

Hi Sachin,
the tool is not in the virtual machine. This is the tool that's in dom0. Since there is a source code for this one you could scp it to the guest, compile and run inside the guest environment. There is no need to provide a guest with this tool by default and in fact this is really impossible so it's better to scp it to the guest and compile there.

Quoted 6 lines

It's also worth pointing out that the underlying test for xen in this program executes a particular instruction to find the information
about its environment. What that means is that it's possible to
write a version of ./tools/misc/xen-detect.c that will work in any guest machine OS.

Quoted 5 lines

But one more point, if you want to know whether XEN_PV is returned for dom0 PV guest or domU (since it's the same for both) you can try to look for /proc/xen/privcmd. This one is available only in dom0 because privileged commands are for privileged domain (domain-0) only...

Oh, sorry, I did mean for domU PV guest or dom0, of course...

Michal

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel