Codebase list virt-what / lintian-fixes/main virt-what.pod
lintian-fixes/main

Tree @lintian-fixes/main (Download .tar.gz)

virt-what.pod @lintian-fixes/mainraw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
=encoding utf8

=head1 NAME

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

=head1 SUMMARY

virt-what [options]

=head1 DESCRIPTION

C<virt-what> is a shell script which can be used to detect if the
program is running in a virtual machine.

The program prints out a list of "facts" about the virtual machine,
derived from heuristics.  One fact is printed per line.

If nothing is printed and the script exits with code 0 (no error),
then it can mean I<either> that the program is running on bare-metal
I<or> the program is running inside a type of virtual machine which we
don't know about or cannot detect.

=head1 FACTS

=over 4

=item B<alibaba_cloud>

=item B<alibaba_cloud-ebm>

This is a cloud computing service based on Alibaba Cloud.

Status: contributed by Weisson.

=item B<aws>

Amazon Web Services.

Note that virt-what will print this fact for baremetal AWS instances,
which you might not consider to be true virtualization.  In this case
other facts (eg. C<kvm> or C<xen>) would I<not> be present.

Status: contributed by Qi Guo, Vitaly Kuznetsov, confirmed by RWMJ.

=item B<bhyve>

This is a bhyve (FreeBSD hypervisor) guest.

Status: contributed by Leonardo Brondani Schenkel.

=item B<docker>

This is a Docker container.

Status: confirmed by Charles Nguyen

=item B<google_cloud>

This is running on Google Cloud Platform / Google Compute Engine.

Status: confirmed by RWMJ

=item B<hyperv>

This is Microsoft Hyper-V hypervisor.

Status: confirmed by RWMJ

=item B<ibm_power-kvm>

This is an IBM POWER KVM guest.

Status: contributed by Adrian Likins.

=item B<ibm_power-lpar_shared>

=item B<ibm_power-lpar_dedicated>

This is an IBM POWER LPAR (hardware partition) in either shared
or dedicated mode.

Status: contributed by Adrian Likins.

=item B<ibm_systemz>

This is an IBM SystemZ (or other S/390) hardware partitioning system.
Additional facts listed below may also be printed.

=item B<ibm_systemz-direct>

This is Linux running directly on a 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

=item B<ibm_systemz-lpar>

This is Linux running directly on an LPAR on an IBM SystemZ
hardware partitioning system.

Status: confirmed by Thomas Huth

=item B<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

=item B<ibm_systemz-kvm>

This is a KVM guest running on an IBM System Z hardware system.

Status: contributed by Thomas Huth

=item B<illumos-lx>

The guest is running on Illumos with a Linux syscall emulation layer.

Status: contributed by Steve Mokris

=item B<ldoms>

The guest appears to be running on an Linux SPARC system with
Oracle VM Server for SPARC (Logical Domains) support.

Status: contributed by Darren Kenny

=item B<ldoms-control>

The is the Oracle VM Server for SPARC (Logical Domains) control domain.

Status: contributed by Darren Kenny

=item B<ldoms-guest>

The is the Oracle VM Server for SPARC (Logical Domains) guest domain.

Status: contributed by Darren Kenny

=item B<ldoms-io>

The is the Oracle VM Server for SPARC (Logical Domains) I/O domain.

Status: contributed by Darren Kenny

=item B<ldoms-root>

The is the Oracle VM Server for SPARC (Logical Domains) Root domain.

Status: contributed by Darren Kenny

=item B<linux_vserver>

This is printed for backwards compatibility with older virt-what which
could not distinguish between a Linux VServer container guest and
host.

=item B<linux_vserver-guest>

This process is running in a Linux VServer container.

Status: contributed by Barış Metin

=item B<linux_vserver-host>

This process is running as the Linux VServer host (VxID 0).

Status: contributed by Barış Metin and Elan Ruusamäe

=item B<lxc>

This process is running in a Linux LXC container.

Status: contributed by Marc Fournier

=item B<kvm>

This guest is running on the KVM hypervisor using hardware
acceleration.

Note that if the hypervisor is using software acceleration
you should I<not> see this, but should see the C<qemu> fact
instead.

Status: confirmed by RWMJ.

=item B<lkvm>

This guest is running on the KVM hypervisor using hardware
acceleration, and the userspace component of the hypervisor
is lkvm (a.k.a kvmtool).

Status: contributed by Andrew Jones

=item B<nutanix_ahv>

The guest is running inside Nutanix Acropolis Hypervisor (AHV).

Status: confirmed by RWMJ.

=item B<openvz>

The guest appears to be running inside an OpenVZ or Virtuozzo
container.

Status: contributed by Evgeniy Sokolov

=item B<ovirt>

The guest is running on an oVirt node.
(See also C<rhev> below).

Status: contributed by RWMJ, not confirmed

=item B<parallels>

The guest is running inside Parallels Virtual Platform
(Parallels Desktop, Parallels Server).

Status: contributed by Justin Clift

=item B<podman>

This is a Podman container.

Status: contributed by Jordan Webb

=item B<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

=item B<qemu>

This is QEMU hypervisor using software emulation.

Note that for KVM (hardware accelerated) guests you should I<not> see
this.

Status: confirmed by RWMJ.

=item B<rhev>

The guest is running on a Red Hat Enterprise Virtualization (RHEV) node.

Status: confirmed by RWMJ

=item B<redhat>

The guest is running on the Red Hat hypervisor.

Status: confirmed by RWMJ

=item B<uml>

This is a User-Mode Linux (UML) guest.

Status: contributed by Laurent Léonard

=item B<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 fact C<virt> is printed.

=item B<virtage>

This is Hitachi Virtualization Manager (HVM) Virtage
hardware partitioning system.

Status: data supplied by Bhavna Sarathy, not confirmed

=item B<virtualbox>

This is a VirtualBox guest.

Status: contributed by Laurent Léonard

=item B<virtualpc>

The guest appears to be running on Microsoft VirtualPC.

Status: not confirmed

=item B<vmm>

This is a vmm (OpenBSD hypervisor) guest.

Status: contributed by Jasper Lievisse Adriaanse.

=item B<vmware>

The guest appears to be running on VMware hypervisor.

Status: confirmed by RWMJ

=item B<xen>

The guest appears to be running on Xen hypervisor.

Status: confirmed by RWMJ

=item B<xen-dom0>

This is the Xen dom0 (privileged domain).

Status: confirmed by RWMJ

=item B<xen-domU>

This is a Xen domU (paravirtualized guest domain).

Status: confirmed by RWMJ

=item B<xen-hvm>

This is a Xen guest fully virtualized (HVM).

Status: confirmed by RWMJ

=back

=head1 EXIT STATUS

Programs that use or wrap C<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.  If the exit status is non-zero
then the output "facts" (if any were printed) cannot be guaranteed and
should be ignored.

The exit status does I<not> have anything to do with whether the
program is running on baremetal or under virtualization, nor with
whether C<virt-what> managed detection "correctly" (which is basically
unknowable given the large variety of virtualization systems out there
and that some systems deliberately emulate others).

=head1 RUNNING VIRT-WHAT FROM OTHER PROGRAMS

C<virt-what> is designed so that you can easily run it from
other programs or wrap it up in a library.

Your program should check the exit status (see the section above).

Some programming languages (notably Python: issue 1652) erroneously
mask the C<SIGPIPE> signal and do not restore it when executing
subprocesses.  C<virt-what> is a shell script and some shell commands
do not work correctly when you do this.  You may see warnings from
C<virt-what> similar to this:

 echo: write error: Broken pipe

The solution is to set the C<SIGPIPE> signal handler back to C<SIG_DFL>
before running C<virt-what>.

=head1 IMPORTANT NOTE

Most of the time, using this program is the I<wrong> thing to do.
Instead you should detect the specific features you actually want to
use.  (As an example, if you wanted to issue Xen hypervisor commands
you would look for the C</proc/xen/privcmd> file).

However people keep asking for this, so we provide it.  There are a
few legitimate uses:

=over 4

=item Bug reporting tool

If you think that virtualization could affect how your program runs,
then you might use C<virt-what> to report this in a bug reporting
tool.

=item Status display and monitoring tools

You might include this information in status and monitoring programs.

=item 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).

=back

=head1 SEE ALSO

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

=head1 AUTHORS

Richard W.M. Jones <rjones @ redhat . com>

=head1 COPYRIGHT

(C) Copyright 2008-2022 Red Hat Inc.,
L<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.

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.

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.

=head1 REPORTING BUGS

Bugs can be viewed on the Red Hat Bugzilla page:
L<https://bugzilla.redhat.com/>.

If you find a bug in virt-what, please follow these steps to report it:

=over 4

=item 1. Check for existing bug reports

Go to L<https://bugzilla.redhat.com/> and search for similar bugs.
Someone may already have reported the same bug, and they may even
have fixed it.

=item 2. Capture debug and error messages

Run

 virt-what > virt-what.log 2>&1

and keep I<virt-what.log>.  It may contain error messages which you
should submit with your bug report.

=item 3. Get version of virt-what.

Run

 virt-what --version

=item 4. Submit a bug report.

Go to L<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.

=item 5. Assign the bug to rjones @ redhat.com

Assign or reassign the bug to B<rjones @ redhat.com> (without the
spaces).  You can also send me an email with the bug number if you
want a faster response.

=back