Re: Bug#538202: ITP: virt-what -- detect if we are running in a virtual machine
On Sun, Jul 26 2009, Mark Allums wrote:
> Manoj Srivastava wrote:
>> On Sat, Jul 25 2009, Joe Smith wrote:
>>> "Manoj Srivastava" <firstname.lastname@example.org> wrote:
>>>>> Virt-what is more accurate than Imvirt, version 1.0 can tell the
>>>>> difference between Xen Dom0 and DomU. The new version (1.1, released
>>>>> on 23 july 2009) can tell the difference between QEMU and KVM, and can
>>>>> tell if you are running inside a Xen fullvirt guest.
>>>> This sounds cool. Does it support user-mode-linux as well?
>>> At the moment, it can detect VMWare, Microsoft Versions of Virtual PC,
>>> OpenVZ, Xen-HVM, Xen-DomU, Xen-Dom0, KVM, and QEMU.
>>> I'm betting the author would be willing to incorporate checks for
>>> other systems if they can be easilly done in a bash script.
>> root@cinder:~# cat /proc/cpuinfo processor : 0
>> vendor_id : User Mode Linux
>> model name : UML
>> mode : skas
>> host : Linux anzu 126.96.36.199-anzu #3 SMP Thu Jul 23 15:24:12 CDT 2009 x86_64
>> bogomips : 548.86
>> It would be appreciated if the ITP'er could convey this to
>> upstream. The output above should leave no doubt that we are running in
>> an UML machine.
> Some doubt always exists; the environment could be lying. Someone
Yes, and y'all cold be just figments of my imagination. But this
is a practical script here.
> might run UML under VMWare under Mac OS X, if that's not too
> ridiculous. Which host would you like to know about?
I do not think you have actually thought this through.
The only one the script can gather any information about. Most
virtual machines make it very hard to break out and gather information
about the host/hypervisor.
So the script is is only expected to tell if the machine it
finds itself running in happens to have the signature of a known
virtual machine flavour. It is not supposed to determine if it is
turtles all the way down.
> Something to think about eventually might be nested virtualization, a
> la Blue Pill. (Not something to worry about right now, though.)
Again, this is bordering on sillyness.
> What about VirtualBox, assuming it survives Oracle? (Maybe it will;
> the OSE version is GPL, is it not?)
What about it?
I hate quotations. Ralph Waldo Emerson
Manoj Srivastava <email@example.com> <http://www.debian.org/~srivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C