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

EXIT STATUS

246       Programs that use or wrap "virt-what" should check that the exit status
247       is 0 before they attempt to parse the output of the command.
248
249       A non-zero exit status indicates some error, for example, an
250       unrecognized command line argument.  If the exit status is non-zero
251       then the output "facts" (if any were printed) cannot be guaranteed and
252       should be ignored.
253
254       The exit status does not have anything to do with whether the program
255       is running on baremetal or under virtualization, nor with whether
256       "virt-what" managed detection "correctly" (which is basically
257       unknowable given the large variety of virtualization systems out there
258       and that some systems deliberately emulate others).
259

RUNNING VIRT-WHAT FROM OTHER PROGRAMS

261       "virt-what" is designed so that you can easily run it from other
262       programs or wrap it up in a library.
263
264       Your program should check the exit status (see the section above).
265
266       Some programming languages (notably Python: issue 1652) erroneously
267       mask the "SIGPIPE" signal and do not restore it when executing
268       subprocesses.  "virt-what" is a shell script and some shell commands do
269       not work correctly when you do this.  You may see warnings from
270       "virt-what" similar to this:
271
272        echo: write error: Broken pipe
273
274       The solution is to set the "SIGPIPE" signal handler back to "SIG_DFL"
275       before running "virt-what".
276

IMPORTANT NOTE

278       Most of the time, using this program is the wrong thing to do.  Instead
279       you should detect the specific features you actually want to use.  (As
280       an example, if you wanted to issue Xen hypervisor commands you would
281       look for the "/proc/xen/privcmd" file).
282
283       However people keep asking for this, so we provide it.  There are a few
284       legitimate uses:
285
286       Bug reporting tool
287           If you think that virtualization could affect how your program
288           runs, then you might use "virt-what" to report this in a bug
289           reporting tool.
290
291       Status display and monitoring tools
292           You might include this information in status and monitoring
293           programs.
294
295       System tuning (sometimes)
296           You might use this program to tune an operating system so it runs
297           better as a virtual machine of a particular hypervisor.  However if
298           installing paravirtualized drivers, it's better to check for the
299           specific features your drivers need (eg. for the presence of PCI
300           devices).
301

SEE ALSO

303       <http://people.redhat.com/~rjones/virt-what/>,
304       <http://www.vmware.com/>,
305       <http://www.microsoft.com/windows/products/winfamily/virtualpc>,
306       <http://xensource.com/>, <http://bellard.org/qemu/>,
307       <http://kvm.qumranet.com/>, <http://openvz.org/>
308

AUTHORS

310       Richard W.M. Jones <rjones @ redhat . com>
311
313       (C) Copyright 2008-2015 Red Hat Inc.,
314       <http://people.redhat.com/~rjones/virt-what/>
315
316       This program is free software; you can redistribute it and/or modify it
317       under the terms of the GNU General Public License as published by the
318       Free Software Foundation; either version 2 of the License, or (at your
319       option) any later version.
320
321       This program is distributed in the hope that it will be useful, but
322       WITHOUT ANY WARRANTY; without even the implied warranty of
323       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
324       General Public License for more details.
325
326       You should have received a copy of the GNU General Public License along
327       with this program; if not, write to the Free Software Foundation, Inc.,
328       675 Mass Ave, Cambridge, MA 02139, USA.
329

REPORTING BUGS

331       Bugs can be viewed on the Red Hat Bugzilla page:
332       <https://bugzilla.redhat.com/>.
333
334       If you find a bug in virt-what, please follow these steps to report it:
335
336       1. Check for existing bug reports
337           Go to <https://bugzilla.redhat.com/> and search for similar bugs.
338           Someone may already have reported the same bug, and they may even
339           have fixed it.
340
341       2. Capture debug and error messages
342           Run
343
344            virt-what > virt-what.log 2>&1
345
346           and keep virt-what.log.  It may contain error messages which you
347           should submit with your bug report.
348
349       3. Get version of virt-what.
350           Run
351
352            virt-what --version
353
354       4. Submit a bug report.
355           Go to <https://bugzilla.redhat.com/> and enter a new bug.  Please
356           describe the problem in as much detail as possible.
357
358           Remember to include the version numbers (step 3) and the debug
359           messages file (step 2) and as much other detail as possible.
360
361       5. Assign the bug to rjones @ redhat.com
362           Assign or reassign the bug to rjones @ redhat.com (without the
363           spaces).  You can also send me an email with the bug number if you
364           want a faster response.
365
366
367
368virt-what-1.19                    2019-07-27                      VIRT-WHAT(1)
Impressum