.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Podwrapper::Man 1.54.0 (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 "libguestfs-test-tool 1" .TH libguestfs-test-tool 1 2024-10-08 libguestfs-1.54.0 "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 libguestfs\-test\-tool \- Diagnostics for libguestfs .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& libguestfs\-test\-tool [\-\-options] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" libguestfs-test-tool is a test program shipped with libguestfs to allow you to check basic libguestfs functionality is working. This is needed because libguestfs occasionally breaks for reasons beyond our control: usually because of changes in the underlying qemu or kernel packages, or the host environment. .PP If you suspect a problem in libguestfs, then just run: .PP .Vb 1 \& libguestfs\-test\-tool .Ve .PP It will print lots of diagnostic messages. .PP If it runs to completion successfully, you will see this near the end: .PP .Vb 1 \& ===== TEST FINISHED OK ===== .Ve .PP and the test tool will exit with code 0. .PP If it fails (and/or exits with non-zero error code), please paste the \&\fIcomplete, unedited\fR output of the test tool into a bug report. More information about reporting bugs can be found on the http://libguestfs.org/ website. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-help\fR 4 .IX Item "--help" Display short usage information and exit. .IP "\fB\-\-qemu\fR qemu_binary" 4 .IX Item "--qemu qemu_binary" If you have downloaded another qemu binary, point this option at the full path of the binary to try it. .IP "\fB\-\-qemudir\fR qemu_source_dir" 4 .IX Item "--qemudir qemu_source_dir" If you have compiled qemu from source, point this option at the source directory to try it. .IP "\fB\-t\fR N" 4 .IX Item "-t N" .PD 0 .IP "\fB\-\-timeout\fR N" 4 .IX Item "--timeout N" .PD Set the launch timeout to \f(CW\*(C`N\*(C'\fR seconds. The default is 600 seconds (10 minutes) which does not usually need to be adjusted. .IP \fB\-V\fR 4 .IX Item "-V" .PD 0 .IP \fB\-\-version\fR 4 .IX Item "--version" .PD Display the libguestfs version number and exit. .SH "TRYING OUT A DIFFERENT VERSION OF QEMU" .IX Header "TRYING OUT A DIFFERENT VERSION OF QEMU" If you have compiled another version of qemu from source and would like to try that, then you can use the \fI\-\-qemudir\fR option to point to the qemu source directory. .PP If you have downloaded a qemu binary from somewhere, use the \fI\-\-qemu\fR option to point to the binary. .PP Note when using these options, you can ignore the business of qemu wrapper scripts ("QEMU WRAPPERS" in \fBguestfs\fR\|(3)), since libguestfs-test-tool writes a wrapper script for you if one is needed. .SH "TRYING OUT A DIFFERENT KERNEL" .IX Header "TRYING OUT A DIFFERENT KERNEL" You can tell supermin to try a different kernel. You do this by setting the environment variables \f(CW\*(C`SUPERMIN_KERNEL\*(C'\fR, \&\f(CW\*(C`SUPERMIN_KERNEL_VERSION\*(C'\fR and/or \f(CW\*(C`SUPERMIN_MODULES\*(C'\fR. .PP Refer to "ENVIRONMENT VARIABLES" in \fBsupermin\fR\|(1) for further information. .SH "TRYING OUT A DIFFERENT VERSION OF LIBVIRT" .IX Header "TRYING OUT A DIFFERENT VERSION OF LIBVIRT" To find out which backend is the default in your libguestfs package, do: .PP .Vb 2 \& unset LIBGUESTFS_BACKEND \& guestfish get\-backend .Ve .PP If you are using the libvirt backend, then you can try out a different (eg. upstream) version of libvirt by running these commands (\fInot\fR as root): .PP .Vb 2 \& killall libvirtd lt\-libvirtd \& ~/path/to/libvirt/run libguestfs\-test\-tool .Ve .PP The first command kills any session \f(CW\*(C`libvirtd\*(C'\fR process(es) that may be running on the machine. The second command uses libvirt’s \f(CW\*(C`run\*(C'\fR script (in the top-level libvirt build directory) to set some environment variables so that the alternate version of libvirt is used to run the program. .SH "TRYING OUT WITH / WITHOUT LIBVIRT" .IX Header "TRYING OUT WITH / WITHOUT LIBVIRT" To find out which backend is the default in your libguestfs package, do: .PP .Vb 2 \& unset LIBGUESTFS_BACKEND \& guestfish get\-backend .Ve .PP If you are using the libvirt backend, you can try without (ie. libguestfs directly launching qemu) by doing: .PP .Vb 1 \& export LIBGUESTFS_BACKEND=direct .Ve .PP Or if you are using the default (direct) backend, then you can try libvirt: .PP .Vb 1 \& export LIBGUESTFS_BACKEND=libvirt .Ve .PP or with libvirt and a specific libvirt URI: .PP .Vb 1 \& export LIBGUESTFS_BACKEND=libvirt:qemu:///session .Ve .SH "TRYING OUT DIFFERENT SELINUX SETTINGS" .IX Header "TRYING OUT DIFFERENT SELINUX SETTINGS" To find out which backend is the default in your libguestfs package, do: .PP .Vb 2 \& unset LIBGUESTFS_BACKEND \& guestfish get\-backend .Ve .PP To find out if SELinux is being used, do: .PP .Vb 1 \& getenforce .Ve .PP If you are using libvirt, SELinux and sVirt, then you can try to see if changing SELinux to "permissive" mode makes any difference. Use this command as root: .PP .Vb 1 \& setenforce Permissive .Ve .PP If this makes a difference, look in the audit logs for recent failures ("AVCs"): .PP .Vb 1 \& ausearch \-m avc \-ts recent .Ve .PP You can convert AVCs into suggested SELinux policy rules using tools like \fBaudit2allow\fR\|(1). For more information, see the "Security Enhanced Linux User Guide". .PP To reenable SELinux and sVirt, do: .PP .Vb 1 \& setenforce Enforcing .Ve .SH SELF-DIAGNOSIS .IX Header "SELF-DIAGNOSIS" Refer to "APPLIANCE BOOT PROCESS" in \fBguestfs\fR\|(3) to understand the messages produced by libguestfs-test-tool and/or possible errors. .SH "EXIT STATUS" .IX Header "EXIT STATUS" libguestfs-test-tool returns \fI0\fR if the tests completed without error, or \fI1\fR if there was an error. .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" For the full list of environment variables which may affect libguestfs, please see the \fBguestfs\fR\|(3) manual page. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBguestfs\fR\|(3), http://libguestfs.org/, http://qemu.org/. .SH AUTHORS .IX Header "AUTHORS" Richard W.M. Jones (\f(CW\*(C`rjones at redhat dot com\*(C'\fR) .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.