[virt-tools-list] Virt-what support for UML and Virtualbox

Laurent Léonard laurent at open-minds.org
Mon Aug 3 23:28:20 UTC 2009


Hi,

You can find attached "cat /proc/cpuid" outputs from UML and VirtualBox 
environments.

For UML, the following code should do the trick:
if grep -q 'UML' /proc/cpuinfo; then
    echo uml
fi

For Virtualbox, the CPU vendor and model seem to be the same as the host but 
the output is not exactly the same as the host. I'm not sure those 
differences can be used to make sure we are running in a VirtualBox virtual 
machine.

-- 
Laurent Léonard
-------------- next part --------------
processor	: 0
vendor_id	: User Mode Linux
model name	: UML
mode		: skas
host		: Linux trash-desktop 2.6.30-1-686 #1 SMP Thu Jul 30 14:45:30 UTC 2009 i686
bogomips	: 3381.65

-------------- next part --------------
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping	: 3
cpu MHz		: 3199.447
cache size	: 2048 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 constant_tsc up pni monitor
bogomips	: 6401.51
clflush size	: 64
power management:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20090804/9c63e3c5/attachment.sig>


More information about the virt-tools-list mailing list