1QEMU-SANITY-CHECK(1)        Virtualization Support        QEMU-SANITY-CHECK(1)
2
3
4

NAME

6       qemu-sanity-check - run a simple sanity check on qemu and the Linux
7       kernel
8

SUMMARY

10       qemu-sanity-check [options]
11

DESCRIPTION

13       qemu-sanity-check is a short shell script that test-boots a Linux
14       kernel under qemu, making sure it boots up to userspace.  The idea is
15       to test the Linux kernel and/or qemu to make sure they are working.
16
17       You can use the command on its own:
18
19        qemu-sanity-check
20
21       In this case, the script will look for a suitable qemu binary on the
22       $PATH and the latest Linux kernel in "/boot" and try to boot that
23       kernel on that qemu.
24
25       You can also specify a qemu binary or a Linux kernel (either or both
26       options can be omitted):
27
28        qemu-sanity-check --qemu=/path/to/qemu --kernel=/path/to/vmlinuz
29
30   KVM
31       KVM ("kvm" or "qemu-kvm") can be used in place of qemu.
32
33   KERNEL DRIVERS
34       No kernel modules or special drivers are required except as noted
35       below.  The test uses an initramfs containing a static binary, so the
36       kernel is not required to locate block devices, use virtio, mount
37       filesystems, etc.
38
39       The kernel must support only the following, compiled in (not as
40       modules):
41
42       •   A serial port (usually: "CONFIG_SERIAL_8250=y")
43
44       •   Initrd/initramfs ("CONFIG_BLK_DEV_INITRD=y")
45

OPTIONS

47       --help
48           Display short help message and exit.
49
50       --accel=kvm
51       --accel=tcg
52       --accel=kvm:tcg
53           This sets the "-machine accel=..." parameter which is passed to
54           qemu.
55
56           If not set, then "kvm:tcg" is the default, which means to try to
57           use KVM (hardware-assisted virtualization), and fall back to
58           software emulation if KVM is not possible.
59
60           Other typical values of this parameter are: "tcg", which means to
61           force software emulation.  "kvm", which means to force KVM and fail
62           if KVM is unavailable.
63
64       --cpu=CPU
65           Set the qemu --cpu option.  If not set then a suitable default is
66           picked depending on the architecture and whether KVM is available.
67           You can also use --cpu= to let qemu pick the default.
68
69       -i INITRD
70       --initrd=INITRD
71           Use the initramfs image named "INITRD" instead of the default.
72
73       -k VMLINUZ
74       --kernel=VMLINUZ
75           Use the kernel image "VMLINUZ" instead of searching for the latest
76           kernel installed in "/boot".
77
78       -m MACHINE
79       --machine=MACHINE
80           Set the qemu -m (machine type) option.  If not set then a suitable
81           default is picked depending on the architecture.  You can also use
82           --machine= to let qemu pick the default.
83
84       -q QEMU
85       --qemu=QEMU
86           Use the qemu (or KVM) binary "QEMU" instead of searching $PATH for
87           a suitable binary.
88
89       -t TIMEOUT
90       --timeout=TIMEOUT
91           Specify a timeout instead of the default which is "10m" (10
92           minutes).
93
94           The syntax for the "TIMEOUT" is described in full in the man page
95           for timeout(1).
96
97       -v
98       --verbose
99           Print extra debugging information.
100
101       -V
102       --version
103           Display version and exit.
104

EXIT STATUS

106       The exit status is 0 if the Linux kernel booted as far as userspace
107       under qemu; or if the --help or --version options were used.
108
109       The exit status is 1 if the kernel boot failed under qemu.
110
111       The exit status is 2 if the script itself failed (eg. incorrect command
112       line options were used, a suitable kernel could not be found).
113

FILES

115       /usr/lib64/qemu-sanity-check/initrd
116           The default location for the small initramfs image that is used to
117           test that userspace has been reached.
118

SEE ALSO

120       <http://qemu.org>, <http://kernel.org>
121

AUTHORS

123       Richard W.M. Jones <rjones@redhat.com>
124
126       (C) Copyright 2013-2020 Red Hat Inc.
127
128       This program is free software; you can redistribute it and/or modify it
129       under the terms of the GNU General Public License as published by the
130       Free Software Foundation; either version 2 of the License, or (at your
131       option) any later version.
132
133       This program is distributed in the hope that it will be useful, but
134       WITHOUT ANY WARRANTY; without even the implied warranty of
135       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
136       General Public License for more details.
137
138       You should have received a copy of the GNU General Public License along
139       with this program; if not, write to the Free Software Foundation, Inc.,
140       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
141
142
143
144qemu-sanity-check-1.1.6           2023-09-01              QEMU-SANITY-CHECK(1)
Impressum