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

NAME

6       virt-drivers - Detect bootloader, kernel and drivers inside guest
7

SYNOPSIS

9        virt-drivers [--options] -d domname
10
11        virt-drivers [--options] -a disk.img
12

DESCRIPTION

14       This tool can detect the bootloader, kernel and drivers inside some
15       guests from only the disk image.  It can detect, for example, whether a
16       disk image needs BIOS or UEFI to boot, and whether it supports virtio
17       or requires slower emulated devices.
18
19   Notes
20       Normally you should distribute hypervisor metadata (eg. libvirt XML or
21       OVF) alongside disk images to tell the hypervisor how to boot them.
22       This tool is used when this metadata has not been provided.  Work with
23       the supplier of the disk image to get them to provide proper metadata.
24

XML FORMAT

26       The output is an XML document.  At the top level it lists the operating
27       systems found (the same as virt-inspector(1)):
28
29        <operatingsystems>
30          <operatingsystem>
31            <root>/dev/sda2</root>
32            <name>linux</name>
33            <arch>x86_64</arch>
34            <distro>fedora</distro>
35            ...
36          </operatingsystem>
37          <operatingsystem>
38            <root>/dev/sdb1</root>
39            ...
40          </operatingsystem>
41        </operatingsystems>
42
43   <firmware>
44       The <firmware> element lists the firmware which is required to boot the
45       guest.  For UEFI it will additionally show the EFI system partition
46       ("ESP").  Guests may support multiple boot firmwares.  For example this
47       guest is detected as using UEFI boot, and the UEFI ESP is the first
48       partition of the first disk:
49
50        <operatingsystems>
51          <firmware type='uefi'>/dev/sda1</firmware>
52          <operatingsystem>
53            ...
54
55   <bootloader> and <kernel>
56       The <bootloader> element shows the bootloader found in the Linux guest.
57       If known, this may contain information about what Linux kernels are
58       provided.  For example:
59
60        <operatingsystems>
61          <firmware type='bios'/>
62          <operatingsystem>
63            <root>/dev/sda2</root>
64            <name>linux</name>
65            ...
66            <bootloader type='grub2' config='/boot/grub2/grub.cfg'>
67              <kernel>
68                <name>kernel</name>
69                <version>6.1.0-0.rc6.46.fc38.x86_64</version>
70                <vmlinuz>/boot/vmlinuz-6.1.0-0.rc6.46.fc38.x86_64</vmlinuz>
71                <modules>
72                  ...
73                </modules>
74                <supports_virtio_blk/>
75                <supports_virtio_net/>
76                ...
77              </kernel>
78            </bootloader>
79
80       Many more fields are usually available for Linux guests, including a
81       complete list of kernel modules and information about support for
82       virtio.  For a complete example see:
83       https://github.com/rwmjones/guestfs-tools/tree/master/drivers
84
85   <drivers>
86       The <drivers> element lists information about drivers found in Windows
87       guests:
88
89        <operatingsystems>
90          <firmware type='bios'/>
91          <operatingsystem>
92            <root>/dev/sda2</root>
93            <name>windows</name>
94            ...
95            <drivers>
96              <driver>
97                <name>scsidev</name>
98                <pci vendor='1077' device='1216' subsystem='8471101E'/>
99                <pci vendor='1077' device='1216' subsystem='8493101E'/>
100              </driver>
101              ...
102            </drivers>
103
104       The driver name (eg. "scsidev") corresponds to the Windows driver .INF
105       file (eg. scsidev.inf).  The list of PCI, USB etc devices are the
106       matching devices which would cause this driver to load at boot.
107

OPTIONS

109       --help
110           Display help.
111
112       -a file
113       --add file
114           Add file which should be a disk image from a virtual machine.
115
116           The format of the disk image is auto-detected.  To override this
117           and force a particular format use the --format option.
118
119       -a URI
120       --add URI
121           Add a remote disk.  The URI format is compatible with guestfish.
122           See "ADDING REMOTE STORAGE" in guestfish(1).
123
124       --blocksize 512
125       --blocksize 4096
126           This parameter sets the sector size of the disk image added with -a
127           option and is ignored for libvirt guest added with -d option.  See
128           also "guestfs_add_drive_opts" in guestfs(3).
129
130       --colors
131       --colours
132           Use ANSI colour sequences to colourize messages.  This is the
133           default when the output is a tty.  If the output of the program is
134           redirected to a file, ANSI colour sequences are disabled unless you
135           use this option.
136
137       -c URI
138       --connect URI
139           If using libvirt, connect to the given URI.  If omitted, then we
140           connect to the default libvirt hypervisor.
141
142           If you specify guest block devices directly (-a), then libvirt is
143           not used at all.
144
145       -d guest
146       --domain guest
147           Add all the disks from the named libvirt guest.  Domain UUIDs can
148           be used instead of names.
149
150       --echo-keys
151           When prompting for keys and passphrases, virt-get-kernel normally
152           turns echoing off so you cannot see what you are typing.  If you
153           are not worried about Tempest attacks and there is no one else in
154           the room you can specify this flag to see what you are typing.
155
156       --format raw|qcow2|..
157       --format auto
158           The default for the -a option is to auto-detect the format of the
159           disk image.  Using this forces the disk format for the -a option on
160           the command line.
161
162           If you have untrusted raw-format guest disk images, you should use
163           this option to specify the disk format.  This avoids a possible
164           security problem with malicious guests (CVE-2010-3851).
165
166       --key SELECTOR
167           Specify a key for LUKS, to automatically open a LUKS device when
168           using the inspection.  "ID" can be either the libguestfs device
169           name, or the UUID of the LUKS device.
170
171           --key "ID":key:KEY_STRING
172               Use the specified "KEY_STRING" as passphrase.
173
174           --key "ID":file:FILENAME
175               Read the passphrase from FILENAME.
176
177           --key "ID":clevis
178               Attempt passphrase-less unlocking for "ID" with Clevis, over
179               the network.  Please refer to "ENCRYPTED DISKS" in guestfs(3)
180               for more information on network-bound disk encryption (NBDE).
181
182               Note that if any such option is present on the command line,
183               QEMU user networking will be automatically enabled for the
184               libguestfs appliance.
185
186       --keys-from-stdin
187           Read key or passphrase parameters from stdin.  The default is to
188           try to read passphrases from the user by opening /dev/tty.
189
190           If there are multiple encrypted devices then you may need to supply
191           multiple keys on stdin, one per line.
192
193       -q
194       --quiet
195           Don’t print ordinary progress messages.
196
197       -v
198       --verbose
199           Enable verbose messages for debugging.
200
201       -V
202       --version
203           Display version number and exit.
204
205       --wrap
206           Wrap error, warning, and informative messages.  This is the default
207           when the output is a tty.  If the output of the program is
208           redirected to a file, wrapping is disabled unless you use this
209           option.
210
211       -x  Enable tracing of libguestfs API calls.
212

ENVIRONMENT VARIABLES

214       For other environment variables which affect all libguestfs programs,
215       see "ENVIRONMENT VARIABLES" in guestfs(3).
216

EXIT STATUS

218       This program returns 0 if successful, or non-zero if there was an
219       error.
220

SEE ALSO

222       guestfs(3), guestfish(1), guestmount(1), virt-get-kernel(1),
223       virt-inspector(1), virt-v2v(1), http://libguestfs.org/.
224

AUTHOR

226       Richard W.M. Jones http://people.redhat.com/~rjones/
227
229       Copyright (C) 2009-2023 Red Hat Inc.
230

LICENSE

232       This program is free software; you can redistribute it and/or modify it
233       under the terms of the GNU General Public License as published by the
234       Free Software Foundation; either version 2 of the License, or (at your
235       option) any later version.
236
237       This program is distributed in the hope that it will be useful, but
238       WITHOUT ANY WARRANTY; without even the implied warranty of
239       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
240       General Public License for more details.
241
242       You should have received a copy of the GNU General Public License along
243       with this program; if not, write to the Free Software Foundation, Inc.,
244       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
245

BUGS

247       To get a list of bugs against libguestfs, use this link:
248       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
249
250       To report a new bug against libguestfs, use this link:
251       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
252
253       When reporting a bug, please supply:
254
255       •   The version of libguestfs.
256
257       •   Where you got libguestfs (eg. which Linux distro, compiled from
258           source, etc)
259
260       •   Describe the bug accurately and give a way to reproduce it.
261
262       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
263           into the bug report.
264
265
266
267guestfs-tools-1.50.1              2023-04-06                   virt-drivers(1)
Impressum