VIRT-WHAT(1)
π VIRT-WHAT(1) π β Virtualization Support π¦
okay bestie, welcome to virt-what, the little shell script that's about to tell you whether you're living rent-free inside a virtual machine or just vibing on actual hardware β¨ manual section 1, Virtualization Support, let's go πΈ
β¨ NAME β¨
virt-what β detect if we are running in a virtual machine π
π SUMMARY π
virt-what [options]
π DESCRIPTION π
okay so real talk: virt-what is a shell script, and its whole job is detecting whether the program is running inside a virtual machine π₯οΈβ¨
It prints out a list of "facts" about the virtual machine, and those facts come from heuristics (aka educated guesses, iykyk). One fact per line. That's the whole format. No cap.
And now the part that trips people up π β if nothing gets printed and the script exits with code 0 (no error), that could mean either of these two things:
- the program is running on bare-metal, or
- the program is running inside a type of virtual machine that we don't know about or cannot detect π
so like⦠no output is not the same as "definitely not a VM", bestie. It's giving "either/or", fr fr.
π FACTS π
the moment you've all been waiting for β the whole fact roster, with the receipts π«Ά
alibaba_cloud,alibaba_cloud-ebmβ This is a cloud computing service based on Alibaba Cloud βοΈ- Status: contributed by Weisson.
awsβ Amazon Web Services.- Heads up π:
virt-whatwill print this fact for baremetal AWS instances, which you might not consider to be true virtualization. In this case other facts (eg.kvmorxen) would not be present. - Status: contributed by Qi Guo, Vitaly Kuznetsov, confirmed by RWMJ.
- Heads up π:
bhyveβ This is a bhyve (FreeBSD hypervisor) guest π- Status: contributed by Leonardo Brondani Schenkel.
crioβ The guest is running in a CRI-O container π¦- Status: suggested by Alessandro Taufer, confirmed by RWMJ & Xiaodai Wang
dockerβ This is a Docker container π³- Status: confirmed by Charles Nguyen
google_cloudβ This is running on Google Cloud Platform / Google Compute Engine βοΈβ¨- Status: confirmed by RWMJ
hypervβ This is Microsoft Hyper-V hypervisor π- Status: confirmed by RWMJ
ibm_power-kvmβ This is an IBM POWER KVM guest β‘- Status: contributed by Adrian Likins.
ibm_power-lpar_shared,ibm_power-lpar_dedicatedβ This is an IBM POWER LPAR (hardware partition) in either shared or dedicated mode.- Status: contributed by Adrian Likins.
ibm_systemzβ This is an IBM SystemZ (or other S/390) hardware partitioning system. Additional facts listed below may also be printed πibm_systemz-directβ This is Linux running directly on an IBM SystemZ hardware partitioning system.- > π¨ This is expected to be a highly unusual configuration β if you see this result you should treat it with suspicion.
- Status: not confirmed
ibm_systemz-lparβ This is Linux running directly on an LPAR on an IBM SystemZ hardware partitioning system.- Status: confirmed by Thomas Huth
ibm_systemz-zvmβ This is a z/VM guest running in an LPAR on an IBM SystemZ hardware partitioning system π- Status: confirmed by RWMJ using a Fedora guest running in z/VM
ibm_systemz-kvmβ This is a KVM guest running on an IBM System Z hardware system.- Status: contributed by Thomas Huth
illumos-lxβ The guest is running on Illumos with a Linux syscall emulation layer π- Status: contributed by Steve Mokris
ldomsβ The guest appears to be running on a Linux SPARC system with Oracle VM Server for SPARC (Logical Domains) support.- Status: contributed by Darren Kenny
ldoms-controlβ The is the Oracle VM Server for SPARC (Logical Domains) control domain π- Status: contributed by Darren Kenny
ldoms-guestβ The is the Oracle VM Server for SPARC (Logical Domains) guest domain π«Ά- Status: contributed by Darren Kenny
ldoms-ioβ The is the Oracle VM Server for SPARC (Logical Domains) I/O domain.- Status: contributed by Darren Kenny
ldoms-rootβ The is the Oracle VM Server for SPARC (Logical Domains) Root domain π±- Status: contributed by Darren Kenny
linux_vserverβ This is printed for backwards compatibility with older virt-what which could not distinguish between a Linux VServer container guest and host π°οΈlinux_vserver-guestβ This process is running in a Linux VServer container.- Status: contributed by BarΔ±Ε Metin
linux_vserver-hostβ This process is running as the Linux VServer host (VxID0).- Status: contributed by BarΔ±Ε Metin and Elan RuusamΓ€e
lxcβ This process is running in a Linux LXC container π¦- Status: contributed by Marc Fournier
kvmβ This guest is running on the KVM hypervisor using hardware acceleration β‘- ngl, important: if the hypervisor is using software acceleration you should not see this β you should see the
qemufact instead. - Status: confirmed by RWMJ.
- ngl, important: if the hypervisor is using software acceleration you should not see this β you should see the
lkvmβ This guest is running on the KVM hypervisor using hardware acceleration, and the userspace component of the hypervisor islkvm(a.k.a kvmtool).- Status: contributed by Andrew Jones
nutanix_ahvβ The guest is running inside Nutanix Acropolis Hypervisor (AHV) πΈ- Status: confirmed by RWMJ.
ociβ The guest is running in an OCI container π«- Status: contributed by Alessandro Valentini, confirmed by RWMJ
openvzβ The guest appears to be running inside an OpenVZ or Virtuozzo container.- Status: contributed by Evgeniy Sokolov
ovirtβ The guest is running on an oVirt node. (See alsorhevbelow π)- Status: contributed by RWMJ, not confirmed
parallelsβ The guest is running inside Parallels Virtual Platform (Parallels Desktop, Parallels Server) π₯οΈ- Status: contributed by Justin Clift
podmanβ This is a Podman container. (See alsoociabove. π)- Status: contributed by Jordan Webb
powervm_lx86β The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator π»- Status: data originally supplied by Jeffrey Scheel, confirmed by Yufang Zhang and RWMJ
qemuβ This is QEMU hypervisor using software emulation π’- and reminder bestie: for KVM (hardware accelerated) guests you should not see this.
- Status: confirmed by RWMJ.
rhevβ The guest is running on a Red Hat Enterprise Virtualization (RHEV) node β€οΈ- Status: confirmed by RWMJ
redhatβ The guest is running on the Red Hat hypervisor π©- Status: confirmed by RWMJ
umlβ This is a User-Mode Linux (UML) guest π§- Status: contributed by Laurent LΓ©onard
upcloudβ This is running on UpCloud βοΈ- Status: contributed by Ville SkyttΓ€
virtβ Some sort of virtualization appears to be present, but we are not sure what it is π€·ββοΈ In some very rare corner cases where we know that virtualization is hard to detect, we will try a timing attack to see if certain machine instructions are running much more slowly than they should be, which would indicate virtualization. In this case, the generic factvirtis printed.virtageβ This is Hitachi Virtualization Manager (HVM) Virtage hardware partitioning system.- Status: data supplied by Bhavna Sarathy, not confirmed
virtualboxβ This is a VirtualBox guest π¦- Status: contributed by Laurent LΓ©onard
virtualpcβ The guest appears to be running on Microsoft VirtualPC.- Status: not confirmed
vmmβ This is a vmm (OpenBSD hypervisor) guest π‘- Status: contributed by Jasper Lievisse Adriaanse.
vmwareβ The guest appears to be running on VMware hypervisor π- Status: confirmed by RWMJ
xenβ The guest appears to be running on Xen hypervisor β¨- Status: confirmed by RWMJ
xen-dom0β This is the Xen dom0 (privileged domain) π- Status: confirmed by RWMJ
xen-domUβ This is a Xen domU (paravirtualized guest domain) π§- Status: confirmed by RWMJ
xen-hvmβ This is a Xen guest fully virtualized (HVM) π₯- Status: confirmed by RWMJ
π¦ EXIT STATUS π¦
bestie, listen closely, this part matters π
Programs that use or wrap virt-what should check that the exit status is 0 before they attempt to parse the output of the command.
A non-zero exit status indicates some error β for example, an unrecognized command line argument. And if the exit status is non-zero, then the output "facts" (if any were printed) cannot be guaranteed and should be ignored π
Also super important: the exit status has nothing to do with whether the program is running on baremetal or under virtualization, and it also has nothing to do with whether virt-what managed detection "correctly" β which is basically unknowable given the large variety of virtualization systems out there, and the fact that some systems deliberately emulate others π
π§ RUNNING VIRT-WHAT FROM OTHER PROGRAMS π§
virt-what is literally designed so you can easily run it from other programs, or wrap it up in a library π«Ά how thoughtful of it.
Your program should check the exit status (see the section above π).
Now here's the messy part π: some programming languages (notably Python: issue 1652) erroneously mask the SIGPIPE signal and do not restore it when executing subprocesses. And virt-what is a shell script, and some shell commands do not work correctly when you do this. So you may see warnings from virt-what similar to this:
echo: write error: Broken pipe
The solution is to set the SIGPIPE signal handler back to SIG_DFL before running virt-what β¨
β οΈ IMPORTANT NOTE β οΈ
okay, the big one, and it's a little shady but we're being honest here: Most of the time, using this program is the wrong thing to do. π Instead, you should detect the specific features you actually want to use.
Like, for example π if you wanted to issue Xen hypervisor commands, you would look for the /proc/xen/privcmd file. See? Specific. Clean. No guessing.
However, people keep asking for this, so we provide it π There are a few legit uses:
π Bug reporting tool
If you think that virtualization could affect how your program runs, then you might use virt-what to report this in a bug reporting tool.
π Status display and monitoring tools
You might include this information in status and monitoring programs.
ποΈ System tuning (sometimes)
You might use this program to tune an operating system so it runs better as a virtual machine of a particular hypervisor. However if installing paravirtualized drivers, it's better to check for the specific features your drivers need (eg. for the presence of PCI devices) π
π SEE ALSO π
virt-what-cvm(1)<http://people.redhat.com/~rjones/virt-what/><http://www.vmware.com/><http://www.microsoft.com/windows/products/winfamily/virtualpc><http://xensource.com/><http://bellard.org/qemu/><http://kvm.qumranet.com/><http://openvz.org/>
π AUTHORS π
Richard W.M. Jones <rjones @ redhat . com> π«Ά
π COPYRIGHT π
okay bestie, legal era, stay with me for like thirty seconds and then we can go back to being unhinged π
(C) Copyright 2008-2024 Red Hat Inc., <http://people.redhat.com/~rjones/virt-what/>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. yes, "or later" β you get to pick, iconic behavior honestly π
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ngl that's the whole "if it breaks, that's between you and the universe" clause π
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. physical mail era fr fr π¬
π REPORTING BUGS π
Bugs can be viewed on the Red Hat Bugzilla page: <https://bugzilla.redhat.com/>. obsessed with a public bug tracker, honestly π«Ά
If you find a bug in virt-what, please follow these steps to report it β and no, you cannot skip steps, this is a group project and we're all doing our part π
- Check for existing bug reports β Go to
<https://bugzilla.redhat.com/>and search for similar bugs. Someone may already have reported the same bug, and they may even have fixed it. lowkey the search bar is right there bestie, use it before you type π - Capture debug and error messages β Run
virt-what > virt-what.log 2>&1
and keep virt-what.log. It may contain error messages which you should submit with your bug report. that redirect is doing so much heavy lifting β¨
- Get version of virt-what. β Run
virt-what --version
yes literally just that, copy the output, we need it π
- Submit a bug report. β Go to
<https://bugzilla.redhat.com/>and enter a new bug. Please describe the problem in as much detail as possible.
Remember to include the version numbers (step 3) and the debug messages file (step 2) and as much other detail as possible. detail is the vibe check here, the more the better, we're not gatekeeping context π
- Assign the bug to rjones @ redhat.com β Assign or reassign the bug to
rjones @ redhat.com(without the spaces). You can also send me an email with the bug number if you want a faster response. faster response unlocked π₯
and that's the whole page bestie, you ate that π
source/version virt-what-1.27, dated 2026-01-29 β that's the VIRT-WHAT(1) era we're living in, no cap π go forth and detect your virtualization ππ§
π¦ where this page comes from
- ubuntu resolute: virt-what 1.27-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: virt-what 1.27-1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms