1VIRT-WHAT(1)                Virtualization Support                VIRT-WHAT(1)
2
3
4

NAME

6       virt-what - detect if we are running in a virtual machine
7

SUMMARY

9       virt-what [options]
10

DESCRIPTION

12       "virt-what" is a shell script which can be used to detect if the
13       program is running in a virtual machine.
14
15       The program prints out a list of "facts" about the virtual machine,
16       derived from heuristics.  One fact is printed per line.
17
18       If nothing is printed and the script exits with code 0 (no error), then
19       it can mean either that the program is running on bare-metal or the
20       program is running inside a type of virtual machine which we don't know
21       about or cannot detect.
22

FACTS

24       alibaba_cloud
25       alibaba_cloud-ebm
26           This is a cloud computing service based on Alibaba Cloud.
27
28           Status: contributed by Weisson.
29
30       aws Amazon Web Services.
31
32           Note that virt-what will print this fact for baremetal AWS
33           instances, which you might not consider to be true virtualization.
34           In this case other facts (eg. "kvm" or "xen") would not be present.
35
36           Status: contributed by Qi Guo, Vitaly Kuznetsov, confirmed by RWMJ.
37
38       bhyve
39           This is a bhyve (FreeBSD hypervisor) guest.
40
41           Status: contributed by Leonardo Brondani Schenkel.
42
43       docker
44           This is a Docker container.
45
46           Status: confirmed by Charles Nguyen
47
48       google_cloud
49           This is running on Google Cloud Platform / Google Compute Engine.
50
51           Status: not confirmed
52
53       hyperv
54           This is Microsoft Hyper-V hypervisor.
55
56           Status: confirmed by RWMJ
57
58       ibm_power-kvm
59           This is an IBM POWER KVM guest.
60
61           Status: contributed by Adrian Likins.
62
63       ibm_power-lpar_shared
64       ibm_power-lpar_dedicated
65           This is an IBM POWER LPAR (hardware partition) in either shared or
66           dedicated mode.
67
68           Status: contributed by Adrian Likins.
69
70       ibm_systemz
71           This is an IBM SystemZ (or other S/390) hardware partitioning
72           system.  Additional facts listed below may also be printed.
73
74       ibm_systemz-direct
75           This is Linux running directly on a IBM SystemZ hardware
76           partitioning system.
77
78           This is expected to be a highly unusual configuration - if you see
79           this result you should treat it with suspicion.
80
81           Status: not confirmed
82
83       ibm_systemz-lpar
84           This is Linux running directly on an LPAR on an IBM SystemZ
85           hardware partitioning system.
86
87           Status: confirmed by Thomas Huth
88
89       ibm_systemz-zvm
90           This is a z/VM guest running in an LPAR on an IBM SystemZ hardware
91           partitioning system.
92
93           Status: confirmed by RWMJ using a Fedora guest running in z/VM
94
95       ibm_systemz-kvm
96           This is a KVM guest running on an IBM System Z hardware system.
97
98           Status: contributed by Thomas Huth
99
100       illumos-lx
101           The guest is running on Illumos with a Linux syscall emulation
102           layer.
103
104           Status: contributed by Steve Mokris
105
106       ldoms
107           The guest appears to be running on an Linux SPARC system with
108           Oracle VM Server for SPARC (Logical Domains) support.
109
110           Status: contributed by Darren Kenny
111
112       ldoms-control
113           The is the Oracle VM Server for SPARC (Logical Domains) control
114           domain.
115
116           Status: contributed by Darren Kenny
117
118       ldoms-guest
119           The is the Oracle VM Server for SPARC (Logical Domains) guest
120           domain.
121
122           Status: contributed by Darren Kenny
123
124       ldoms-io
125           The is the Oracle VM Server for SPARC (Logical Domains) I/O domain.
126
127           Status: contributed by Darren Kenny
128
129       ldoms-root
130           The is the Oracle VM Server for SPARC (Logical Domains) Root
131           domain.
132
133           Status: contributed by Darren Kenny
134
135       linux_vserver
136           This is printed for backwards compatibility with older virt-what
137           which could not distinguish between a Linux VServer container guest
138           and host.
139
140       linux_vserver-guest
141           This process is running in a Linux VServer container.
142
143           Status: contributed by BarXX Metin
144
145       linux_vserver-host
146           This process is running as the Linux VServer host (VxID 0).
147
148           Status: contributed by BarXX Metin and Elan Ruusamaee
149
150       lxc This process is running in a Linux LXC container.
151
152           Status: contributed by Marc Fournier
153
154       kvm This guest is running on the KVM hypervisor using hardware
155           acceleration.
156
157           Note that if the hypervisor is using software acceleration you
158           should not see this, but should see the "qemu" fact instead.
159
160           Status: confirmed by RWMJ.
161
162       lkvm
163           This guest is running on the KVM hypervisor using hardware
164           acceleration, and the userspace component of the hypervisor is lkvm
165           (a.k.a kvmtool).
166
167           Status: contributed by Andrew Jones
168
169       nutanix_ahv
170           The guest is running inside Nutanix Acropolis Hypervisor (AHV).
171
172           Status: confirmed by RWMJ.
173
174       openvz
175           The guest appears to be running inside an OpenVZ or Virtuozzo
176           container.
177
178           Status: contributed by Evgeniy Sokolov
179
180       ovirt
181           The guest is running on an oVirt node.  (See also "rhev" below).
182
183           Status: contributed by RWMJ, not confirmed
184
185       parallels
186           The guest is running inside Parallels Virtual Platform (Parallels
187           Desktop, Parallels Server).
188
189           Status: contributed by Justin Clift
190
191       podman
192           This is a Podman container.
193
194           Status: contributed by Jordan Webb
195
196       powervm_lx86
197           The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator.
198
199           Status: data originally supplied by Jeffrey Scheel, confirmed by
200           Yufang Zhang and RWMJ
201
202       qemu
203           This is QEMU hypervisor using software emulation.
204
205           Note that for KVM (hardware accelerated) guests you should not see
206           this.
207
208           Status: confirmed by RWMJ.
209
210       rhev
211           The guest is running on a Red Hat Enterprise Virtualization (RHEV)
212           node.
213
214           Status: confirmed by RWMJ
215
216       redhat
217           The guest is running on the Red Hat hypervisor.
218
219           Status: confirmed by RWMJ
220
221       uml This is a User-Mode Linux (UML) guest.
222
223           Status: contributed by Laurent Leonard
224
225       virt
226           Some sort of virtualization appears to be present, but we are not
227           sure what it is.  In some very rare corner cases where we know that
228           virtualization is hard to detect, we will try a timing attack to
229           see if certain machine instructions are running much more slowly
230           than they should be, which would indicate virtualization.  In this
231           case, the generic fact "virt" is printed.
232
233       virtage
234           This is Hitachi Virtualization Manager (HVM) Virtage hardware
235           partitioning system.
236
237           Status: data supplied by Bhavna Sarathy, not confirmed
238
239       virtualbox
240           This is a VirtualBox guest.
241
242           Status: contributed by Laurent Leonard
243
244       virtualpc
245           The guest appears to be running on Microsoft VirtualPC.
246
247           Status: not confirmed
248
249       vmm This is a vmm (OpenBSD hypervisor) guest.
250
251           Status: contributed by Jasper Lievisse Adriaanse.
252
253       vmware
254           The guest appears to be running on VMware hypervisor.
255
256           Status: confirmed by RWMJ
257
258       xen The guest appears to be running on Xen hypervisor.
259
260           Status: confirmed by RWMJ
261
262       xen-dom0
263           This is the Xen dom0 (privileged domain).
264
265           Status: confirmed by RWMJ
266
267       xen-domU
268           This is a Xen domU (paravirtualized guest domain).
269
270           Status: confirmed by RWMJ
271
272       xen-hvm
273           This is a Xen guest fully virtualized (HVM).
274
275           Status: confirmed by RWMJ
276

EXIT STATUS

278       Programs that use or wrap "virt-what" should check that the exit status
279       is 0 before they attempt to parse the output of the command.
280
281       A non-zero exit status indicates some error, for example, an
282       unrecognized command line argument.  If the exit status is non-zero
283       then the output "facts" (if any were printed) cannot be guaranteed and
284       should be ignored.
285
286       The exit status does not have anything to do with whether the program
287       is running on baremetal or under virtualization, nor with whether
288       "virt-what" managed detection "correctly" (which is basically
289       unknowable given the large variety of virtualization systems out there
290       and that some systems deliberately emulate others).
291

RUNNING VIRT-WHAT FROM OTHER PROGRAMS

293       "virt-what" is designed so that you can easily run it from other
294       programs or wrap it up in a library.
295
296       Your program should check the exit status (see the section above).
297
298       Some programming languages (notably Python: issue 1652) erroneously
299       mask the "SIGPIPE" signal and do not restore it when executing
300       subprocesses.  "virt-what" is a shell script and some shell commands do
301       not work correctly when you do this.  You may see warnings from
302       "virt-what" similar to this:
303
304        echo: write error: Broken pipe
305
306       The solution is to set the "SIGPIPE" signal handler back to "SIG_DFL"
307       before running "virt-what".
308

IMPORTANT NOTE

310       Most of the time, using this program is the wrong thing to do.  Instead
311       you should detect the specific features you actually want to use.  (As
312       an example, if you wanted to issue Xen hypervisor commands you would
313       look for the "/proc/xen/privcmd" file).
314
315       However people keep asking for this, so we provide it.  There are a few
316       legitimate uses:
317
318       Bug reporting tool
319           If you think that virtualization could affect how your program
320           runs, then you might use "virt-what" to report this in a bug
321           reporting tool.
322
323       Status display and monitoring tools
324           You might include this information in status and monitoring
325           programs.
326
327       System tuning (sometimes)
328           You might use this program to tune an operating system so it runs
329           better as a virtual machine of a particular hypervisor.  However if
330           installing paravirtualized drivers, it's better to check for the
331           specific features your drivers need (eg. for the presence of PCI
332           devices).
333

SEE ALSO

335       <http://people.redhat.com/~rjones/virt-what/>,
336       <http://www.vmware.com/>,
337       <http://www.microsoft.com/windows/products/winfamily/virtualpc>,
338       <http://xensource.com/>, <http://bellard.org/qemu/>,
339       <http://kvm.qumranet.com/>, <http://openvz.org/>
340

AUTHORS

342       Richard W.M. Jones <rjones @ redhat . com>
343
345       (C) Copyright 2008-2022 Red Hat Inc.,
346       <http://people.redhat.com/~rjones/virt-what/>
347
348       This program is free software; you can redistribute it and/or modify it
349       under the terms of the GNU General Public License as published by the
350       Free Software Foundation; either version 2 of the License, or (at your
351       option) any later version.
352
353       This program is distributed in the hope that it will be useful, but
354       WITHOUT ANY WARRANTY; without even the implied warranty of
355       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
356       General Public License for more details.
357
358       You should have received a copy of the GNU General Public License along
359       with this program; if not, write to the Free Software Foundation, Inc.,
360       675 Mass Ave, Cambridge, MA 02139, USA.
361

REPORTING BUGS

363       Bugs can be viewed on the Red Hat Bugzilla page:
364       <https://bugzilla.redhat.com/>.
365
366       If you find a bug in virt-what, please follow these steps to report it:
367
368       1. Check for existing bug reports
369           Go to <https://bugzilla.redhat.com/> and search for similar bugs.
370           Someone may already have reported the same bug, and they may even
371           have fixed it.
372
373       2. Capture debug and error messages
374           Run
375
376            virt-what > virt-what.log 2>&1
377
378           and keep virt-what.log.  It may contain error messages which you
379           should submit with your bug report.
380
381       3. Get version of virt-what.
382           Run
383
384            virt-what --version
385
386       4. Submit a bug report.
387           Go to <https://bugzilla.redhat.com/> and enter a new bug.  Please
388           describe the problem in as much detail as possible.
389
390           Remember to include the version numbers (step 3) and the debug
391           messages file (step 2) and as much other detail as possible.
392
393       5. Assign the bug to rjones @ redhat.com
394           Assign or reassign the bug to rjones @ redhat.com (without the
395           spaces).  You can also send me an email with the bug number if you
396           want a faster response.
397
398
399
400virt-what-1.24                    2022-06-23                      VIRT-WHAT(1)
Impressum