This little perl script tries to detect if it is called from within a virtualization container. This is detected by looking for well-known boot messages, directories and reading DMI (Desktop Management Interface) data.
The following containers are detected:
- Virtual PC/Virtual Server
- QEMU/KVM (experimental)
- Xen (para and non-para virtualized)
- any HVM providing CPUID 0x40000000 detection
The tool will print exactly one line. The result has the following meaning:
|HVM: <signature>||signature of an unknown hypervisor1|
|Virtual Machine||Microsoft Virtual PC/Virtual Server|
|VMware||VMware Virtual Platform|
|VMware (Express||ESX Server|
|Physical||This is a physical machine or a not detected container.|
|UML||User Mode Linux*|
|Xen 3.x (PV|HVM)||Xen hypervisor1|
|lguest||Lguest: The Simple x86 Hypervisor2|
|ARAnyM||Atari Running on Any Machine3|
There are simular packages for detecting virtualization containers available:
The most current version is 0.9.5 (view ChangeLog).
Source packages can be found here.
There are official Debian packages available here.
There is a portable ImVirt version (imvirtp) available. It is a self-contained perl script (using PAR Packager). Downloads are available at github.