1virt-inspector(1)           Virtualization Support           virt-inspector(1)
2
3
4

NAME

6       virt-inspector - Display OS version, kernel, drivers, mount points,
7       applications, etc. in a virtual machine
8

SYNOPSIS

10        virt-inspector [--connect URI] domname
11
12        virt-inspector guest.img [guest.img ...]
13

DESCRIPTION

15       virt-inspector examines a virtual machine and tries to determine the
16       version of the OS, the kernel version, what drivers are installed,
17       whether the virtual machine is fully virtualized (FV) or para-
18       virtualized (PV), what applications are installed and more.
19
20       Virt-inspector can produce output in several formats, including a
21       readable text report, and XML for feeding into other programs.
22
23       In the normal usage, use "virt-inspector domname" where "domname" is
24       the libvirt domain (see: "virsh list --all").
25
26       You can also run virt-inspector directly on disk images from a single
27       virtual machine.  Use "virt-inspector guest.img".  In rare cases a
28       domain has several block devices, in which case you should list them
29       one after another, with the first corresponding to the guest's
30       "/dev/sda", the second to the guest's "/dev/sdb" and so on.
31
32       Virt-inspector can only inspect and report upon one domain at a time.
33       To inspect several virtual machines, you have to run virt-inspector
34       several times (for example, from a shell script for-loop).
35
36       Because virt-inspector needs direct access to guest images, it won't
37       normally work over remote libvirt connections.
38

OPTIONS

40       --help
41           Display brief help.
42
43       --version
44           Display version number and exit.
45
46       --connect URI | -c URI
47           If using libvirt, connect to the given URI.  If omitted, then we
48           connect to the default libvirt hypervisor.
49
50           Libvirt is only used if you specify a "domname" on the command
51           line.  If you specify guest block devices directly, then libvirt is
52           not used at all.
53
54       --format raw
55           Specify the format of disk images given on the command line.  If
56           this is omitted then the format is autodetected from the content of
57           the disk image.
58
59           If disk images are requested from libvirt, then this program asks
60           libvirt for this information.  In this case, the value of the
61           format parameter is ignored.
62
63           If working with untrusted raw-format guest disk images, you should
64           ensure the format is always specified.
65
66       The following options select the output format.  Use only one of them.
67       The default is a readable text report.
68
69       --text (default)
70           Plain text report.
71
72       --none
73           Produce no output at all.
74
75       --xml
76           If you select --xml then you get XML output which can be fed to
77           other programs.
78
79       --yaml
80           If you select --yaml then you get YAML output which can be fed to
81           other programs.
82
83       --perl
84           If you select --perl then you get Perl structures output which can
85           be used directly in another Perl program.
86
87       --fish
88       --ro-fish
89           If you select --fish then we print a guestfish(1) command line
90           which will automatically mount up the filesystems on the correct
91           mount points.  Try this for example:
92
93            guestfish $(virt-inspector --fish guest.img)
94
95           --ro-fish is the same, but the --ro option is passed to guestfish
96           so that the filesystems are mounted read-only.
97
98       --query
99           In "query mode" we answer common questions about the guest, such as
100           whether it is fullvirt or needs a Xen hypervisor to run.
101
102           See section QUERY MODE below.
103
104       --windows-registry
105           This flag is ignored for compatibility with earlier releases of the
106           software.
107
108           In this version, if Win::Hivex(3) is available, then we attempt to
109           parse information out of the Registry for any Windows guest.
110

OUTPUT FORMAT

112        Operating system(s)
113        -------------------
114        Linux (distro + version)
115        Windows (version)
116           |
117           |
118           +--- Filesystems ---------- Installed apps --- Kernel & drivers
119                -----------            --------------     ----------------
120                mount point => device  List of apps       Extra information
121                mount point => device  and versions       about kernel(s)
122                     ...                                  and drivers
123                swap => swap device
124                (plus lots of extra information
125                about each filesystem)
126
127       The output of virt-inspector is a complex two-level data structure.
128
129       At the top level is a list of the operating systems installed on the
130       guest.  (For the vast majority of guests, only a single OS is
131       installed.)  The data returned for the OS includes the name (Linux,
132       Windows), the distribution and version.
133
134       The diagram above shows what we return for each OS.
135
136       With the --xml option the output is mapped into an XML document.  There
137       is a RELAX-NG schema for this XML in the file virt-inspector.rng which
138       normally ships with virt-inspector, or can be found in the source.
139
140       With the --fish or --ro-fish option the mount points are mapped to
141       guestfish(1) command line parameters, so that you can go in afterwards
142       and inspect the guest with everything mounted in the right place.  For
143       example:
144
145        guestfish $(virt-inspector --ro-fish guest.img)
146        ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot
147

QUERY MODE

149       When you use "virt-inspector --query", the output is a series of lines
150       of the form:
151
152        windows=no
153        linux=yes
154        fullvirt=yes
155        xen_pv_drivers=no
156
157       (each answer is usually "yes" or "no", or the line is completely
158       missing if we could not determine the answer at all).
159
160       If the guest is multiboot, you can get apparently conflicting answers
161       (eg. "windows=yes" and "linux=yes", or a guest which is both fullvirt
162       and has a Xen PV kernel).  This is normal, and just means that the
163       guest can do both things, although it might require operator
164       intervention such as selecting a boot option when the guest is booting.
165
166       This section describes the full range of answers possible.
167
168       windows=(yes|no)
169           Answer "yes" if Microsoft Windows is installed in the guest.
170
171       linux=(yes|no)
172           Answer "yes" if a Linux kernel is installed in the guest.
173
174       rhel=(yes|no)
175           Answer "yes" if the guest contains Red Hat Enterprise Linux.
176
177       fedora=(yes|no)
178           Answer "yes" if the guest contains the Fedora Linux distribution.
179
180       debian=(yes|no)
181           Answer "yes" if the guest contains the Debian Linux distribution.
182
183       fullvirt=(yes|no)
184           Answer "yes" if there is at least one operating system kernel
185           installed in the guest which runs fully virtualized.  Such a guest
186           would require a hypervisor which supports full system
187           virtualization.
188
189           Note: This only works correctly for Linux guests (RHBZ#690358).
190
191       xen_domU_kernel=(yes|no)
192           Answer "yes" if there is at least one Linux kernel installed in the
193           guest which is compiled as a Xen DomU (a Xen paravirtualized
194           guest).
195
196       xen_pv_drivers=(yes|no)
197           Answer "yes" if the guest has Xen paravirtualized drivers installed
198           (usually the kernel itself will be fully virtualized, but the PV
199           drivers have been installed by the administrator for performance
200           reasons).
201
202       virtio_drivers=(yes|no)
203           Answer "yes" if the guest has virtio paravirtualized drivers
204           installed.  Virtio drivers are commonly used to improve the
205           performance of KVM.
206
207       userspace_arch=(x86_64|...)
208           Print the architecture of userspace.
209
210           NB. For multi-boot VMs this can print several lines.
211
212       kernel_arch=(x86_64|...)
213           Print the architecture of the kernel.
214
215           NB. For multi-boot VMs this can print several lines.
216

SHELL QUOTING

218       Libvirt guest names can contain arbitrary characters, some of which
219       have meaning to the shell such as "#" and space.  You may need to quote
220       or escape these characters on the command line.  See the shell manual
221       page sh(1) for details.
222

SEE ALSO

224       guestfs(3), guestfish(1), Sys::Guestfs(3), Sys::Guestfs::Lib(3),
225       Sys::Virt(3), <http://libguestfs.org/>.
226

AUTHORS

228       Richard W.M. Jones <http://people.redhat.com/~rjones/>
229
230       Matthew Booth mbooth@redhat.com
231
233       Copyright (C) 2009 Red Hat Inc.
234
235       This program is free software; you can redistribute it and/or modify it
236       under the terms of the GNU General Public License as published by the
237       Free Software Foundation; either version 2 of the License, or (at your
238       option) any later version.
239
240       This program is distributed in the hope that it will be useful, but
241       WITHOUT ANY WARRANTY; without even the implied warranty of
242       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
243       General Public License for more details.
244
245       You should have received a copy of the GNU General Public License along
246       with this program; if not, write to the Free Software Foundation, Inc.,
247       675 Mass Ave, Cambridge, MA 02139, USA.
248
249       Contains code from perl String::ShellQuote under the following
250       copyright and license:
251
252       Copyright (c) 1997 Roderick Schertler.  All rights reserved.  This
253       program is free software; you can redistribute it and/or modify it
254       under the same terms as Perl itself.
255
256
257
258libguestfs-1.20.11                2017-03-23                 virt-inspector(1)
Impressum