.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Podwrapper::Man 1.52.2 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "virt-drivers 1"
.TH virt-drivers 1 2024-10-13 guestfs-tools-1.52.2 "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
virt\-drivers \- Detect bootloader, kernel and drivers inside guest
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& virt\-drivers [\-\-options] \-d domname
\&
\& virt\-drivers [\-\-options] \-a disk.img
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
This tool can detect the bootloader, kernel and drivers inside some
guests from only the disk image. It can detect, for example, whether
a disk image needs BIOS or UEFI to boot, and whether it supports
virtio or requires slower emulated devices.
.SS Notes
.IX Subsection "Notes"
Normally you should distribute hypervisor metadata (eg. libvirt XML or
OVF) alongside disk images to tell the hypervisor how to boot them.
This tool is used when this metadata has not been provided. Work with
the supplier of the disk image to get them to provide proper metadata.
.SH "XML FORMAT"
.IX Header "XML FORMAT"
The output is an XML document. At the top level it lists the
operating systems found (the same as \fBvirt\-inspector\fR\|(1)):
.PP
.Vb 10
\&
\&
\& /dev/sda2
\& linux
\& x86_64
\& fedora
\& ...
\&
\&
\& /dev/sdb1
\& ...
\&
\&
.Ve
.SS
.IX Subsection ""
The element lists the firmware which is required to
boot the guest. For UEFI it will additionally show the EFI system
partition ("ESP"). Guests may support multiple boot firmwares. For
example this guest is detected as using UEFI boot, and the UEFI ESP is
the first partition of the first disk:
.PP
.Vb 4
\&
\& /dev/sda1
\&
\& ...
.Ve
.SS " and "
.IX Subsection " and "
The element shows the bootloader found in the
Linux guest. If known, this may contain information about what Linux
kernels are provided. For example:
.PP
.Vb 10
\&
\&
\&
\& /dev/sda2
\& linux
\& ...
\&
\&
\& kernel
\& 6.1.0\-0.rc6.46.fc38.x86_64
\& /boot/vmlinuz\-6.1.0\-0.rc6.46.fc38.x86_64
\&
\& ...
\&
\&
\&
\& ...
\&
\&
.Ve
.PP
Many more fields are usually available for Linux guests, including a
complete list of kernel modules and information about support for
virtio. For a complete example see:
https://github.com/libguestfs/guestfs\-tools/tree/master/drivers
.SS
.IX Subsection ""
The element lists information about drivers found in
Windows guests:
.PP
.Vb 10
\&
\&
\&
\& /dev/sda2
\& windows
\& ...
\&
\&
\& scsidev
\&
\&
\&
\& ...
\&
.Ve
.PP
The driver name (eg. \f(CW\*(C`scsidev\*(C'\fR) corresponds to the Windows driver
\&\fI.INF\fR file (eg. \fIscsidev.inf\fR). The list of PCI, USB etc devices
are the matching devices which would cause this driver to load at
boot.
.SH OPTIONS
.IX Header "OPTIONS"
.IP \fB\-\-help\fR 4
.IX Item "--help"
Display help.
.IP "\fB\-a\fR file" 4
.IX Item "-a file"
.PD 0
.IP "\fB\-\-add\fR file" 4
.IX Item "--add file"
.PD
Add \fIfile\fR which should be a disk image from a virtual machine.
.Sp
The format of the disk image is auto-detected. To override this and
force a particular format use the \fI\-\-format\fR option.
.IP "\fB\-a\fR URI" 4
.IX Item "-a URI"
.PD 0
.IP "\fB\-\-add\fR URI" 4
.IX Item "--add URI"
.PD
Add a remote disk. The URI format is compatible with guestfish.
See "ADDING REMOTE STORAGE" in \fBguestfish\fR\|(1).
.IP "\fB\-\-blocksize\fR \fB512\fR" 4
.IX Item "--blocksize 512"
.PD 0
.IP "\fB\-\-blocksize\fR \fB4096\fR" 4
.IX Item "--blocksize 4096"
.PD
This parameter sets the sector size of the disk image added with \fI\-a\fR
option and is ignored for libvirt guest added with \fI\-d\fR option. See
also "guestfs_add_drive_opts" in \fBguestfs\fR\|(3).
.IP \fB\-\-colors\fR 4
.IX Item "--colors"
.PD 0
.IP \fB\-\-colours\fR 4
.IX Item "--colours"
.PD
Use ANSI colour sequences to colourize messages. This is the default
when the output is a tty. If the output of the program is redirected
to a file, ANSI colour sequences are disabled unless you use this
option.
.IP "\fB\-c\fR URI" 4
.IX Item "-c URI"
.PD 0
.IP "\fB\-\-connect\fR URI" 4
.IX Item "--connect URI"
.PD
If using libvirt, connect to the given \fIURI\fR. If omitted, then we
connect to the default libvirt hypervisor.
.Sp
If you specify guest block devices directly (\fI\-a\fR), then libvirt is
not used at all.
.IP "\fB\-d\fR guest" 4
.IX Item "-d guest"
.PD 0
.IP "\fB\-\-domain\fR guest" 4
.IX Item "--domain guest"
.PD
Add all the disks from the named libvirt guest. Domain UUIDs can be
used instead of names.
.IP \fB\-\-echo\-keys\fR 4
.IX Item "--echo-keys"
When prompting for keys and passphrases, virt-get-kernel normally turns
echoing off so you cannot see what you are typing. If you are not
worried about Tempest attacks and there is no one else in the room
you can specify this flag to see what you are typing.
.IP "\fB\-\-format\fR raw|qcow2|.." 4
.IX Item "--format raw|qcow2|.."
.PD 0
.IP "\fB\-\-format\fR auto" 4
.IX Item "--format auto"
.PD
The default for the \fI\-a\fR option is to auto-detect the format of the
disk image. Using this forces the disk format for the \fI\-a\fR option
on the command line.
.Sp
If you have untrusted raw-format guest disk images, you should use
this option to specify the disk format. This avoids a possible
security problem with malicious guests (CVE\-2010\-3851).
.IP "\fB\-\-key\fR SELECTOR" 4
.IX Item "--key SELECTOR"
Specify a key for LUKS, to automatically open a LUKS device when using
the inspection.
.RS 4
.IP "\fB\-\-key\fR NAME\fB:key:\fRKEY_STRING" 4
.IX Item "--key NAME:key:KEY_STRING"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:key:\fRKEY_STRING" 4
.IX Item "--key UUID:key:KEY_STRING"
.IP "\fB\-\-key\fR \fBall:key:\fRKEY_STRING" 4
.IX Item "--key all:key:KEY_STRING"
.PD
\&\f(CW\*(C`NAME\*(C'\fR is the libguestfs device name (eg. \f(CW\*(C`/dev/sda1\*(C'\fR). \f(CW\*(C`UUID\*(C'\fR is
the device UUID. \f(CW\*(C`all\*(C'\fR means try the key against any encrypted
device.
.Sp
Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase.
.IP "\fB\-\-key\fR NAME\fB:file:\fRFILENAME" 4
.IX Item "--key NAME:file:FILENAME"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:file:\fRFILENAME" 4
.IX Item "--key UUID:file:FILENAME"
.IP "\fB\-\-key\fR \fBall:file:\fRFILENAME" 4
.IX Item "--key all:file:FILENAME"
.PD
Read the passphrase from \fIFILENAME\fR.
.IP "\fB\-\-key\fR NAME\fB:clevis\fR" 4
.IX Item "--key NAME:clevis"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:clevis\fR" 4
.IX Item "--key UUID:clevis"
.IP "\fB\-\-key\fR \fBall:clevis\fR" 4
.IX Item "--key all:clevis"
.PD
Attempt passphrase-less unlocking for the device with Clevis, over the
network. Please refer to "ENCRYPTED DISKS" in \fBguestfs\fR\|(3) for more
information on network-bound disk encryption (NBDE).
.Sp
Note that if any such option is present on the command line, QEMU user
networking will be automatically enabled for the libguestfs appliance.
.RE
.RS 4
.RE
.IP \fB\-\-keys\-from\-stdin\fR 4
.IX Item "--keys-from-stdin"
Read key or passphrase parameters from stdin. The default is
to try to read passphrases from the user by opening \fI/dev/tty\fR.
.Sp
If there are multiple encrypted devices then you may need to supply
multiple keys on stdin, one per line.
.IP \fB\-q\fR 4
.IX Item "-q"
.PD 0
.IP \fB\-\-quiet\fR 4
.IX Item "--quiet"
.PD
Don’t print ordinary progress messages.
.IP \fB\-v\fR 4
.IX Item "-v"
.PD 0
.IP \fB\-\-verbose\fR 4
.IX Item "--verbose"
.PD
Enable verbose messages for debugging.
.IP \fB\-V\fR 4
.IX Item "-V"
.PD 0
.IP \fB\-\-version\fR 4
.IX Item "--version"
.PD
Display version number and exit.
.IP \fB\-\-wrap\fR 4
.IX Item "--wrap"
Wrap error, warning, and informative messages. This is the default
when the output is a tty. If the output of the program is redirected
to a file, wrapping is disabled unless you use this option.
.IP \fB\-x\fR 4
.IX Item "-x"
Enable tracing of libguestfs API calls.
.SH "ENVIRONMENT VARIABLES"
.IX Header "ENVIRONMENT VARIABLES"
For other environment variables which affect all libguestfs programs,
see "ENVIRONMENT VARIABLES" in \fBguestfs\fR\|(3).
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"
This program returns 0 if successful, or non-zero if there was an
error.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBguestfs\fR\|(3),
\&\fBguestfish\fR\|(1),
\&\fBguestmount\fR\|(1),
\&\fBvirt\-get\-kernel\fR\|(1),
\&\fBvirt\-inspector\fR\|(1),
\&\fBvirt\-v2v\fR\|(1),
http://libguestfs.org/.
.SH AUTHOR
.IX Header "AUTHOR"
Richard W.M. Jones http://people.redhat.com/~rjones/
.SH COPYRIGHT
.IX Header "COPYRIGHT"
Copyright (C) 2009\-2023 Red Hat Inc.
.SH LICENSE
.IX Header "LICENSE"
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.
.PP
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.
.PP
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.,
51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA.
.SH BUGS
.IX Header "BUGS"
To get a list of bugs against libguestfs, use this link:
https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
.PP
To report a new bug against libguestfs, use this link:
https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
.PP
When reporting a bug, please supply:
.IP \(bu 4
The version of libguestfs.
.IP \(bu 4
Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
.IP \(bu 4
Describe the bug accurately and give a way to reproduce it.
.IP \(bu 4
Run \fBlibguestfs\-test\-tool\fR\|(1) and paste the \fBcomplete, unedited\fR
output into the bug report.