1QEMU-SANITY-CHECK(1) Virtualization Support QEMU-SANITY-CHECK(1)
2
3
4
6 qemu-sanity-check - run a simple sanity check on qemu and the Linux
7 kernel
8
10 qemu-sanity-check [options]
11
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
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 -i INITRD
65 --initrd=INITRD
66 Use the initramfs image named "INITRD" instead of the default.
67
68 -k VMLINUZ
69 --kernel=VMLINUZ
70 Use the kernel image "VMLINUZ" instead of searching for the latest
71 kernel installed in "/boot".
72
73 -m MACHINE
74 --machine=MACHINE
75 Set the qemu -m (machine type) option. If not set then a suitable
76 default is picked depending on the architecture. You can also use
77 --machine= to let qemu pick the default.
78
79 -q QEMU
80 --qemu=QEMU
81 Use the qemu (or KVM) binary "QEMU" instead of searching $PATH for
82 a suitable binary.
83
84 -t TIMEOUT
85 --timeout=TIMEOUT
86 Specify a timeout instead of the default which is "10m" (10
87 minutes).
88
89 The syntax for the "TIMEOUT" is described in full in the man page
90 for timeout(1).
91
92 -v
93 --verbose
94 Print extra debugging information.
95
96 -V
97 --version
98 Display version and exit.
99
101 The exit status is 0 if the Linux kernel booted as far as userspace
102 under qemu; or if the --help or --version options were used.
103
104 The exit status is 1 if the kernel boot failed under qemu.
105
106 The exit status is 2 if the script itself failed (eg. incorrect command
107 line options were used, a suitable kernel could not be found).
108
110 /usr/lib64/qemu-sanity-check/initrd
111 The default location for the small initramfs image that is used to
112 test that userspace has been reached.
113
115 <http://qemu.org>, <http://kernel.org>
116
118 Richard W.M. Jones <rjones@redhat.com>
119
121 (C) Copyright 2013-2020 Red Hat Inc.
122
123 This program is free software; you can redistribute it and/or modify it
124 under the terms of the GNU General Public License as published by the
125 Free Software Foundation; either version 2 of the License, or (at your
126 option) any later version.
127
128 This program is distributed in the hope that it will be useful, but
129 WITHOUT ANY WARRANTY; without even the implied warranty of
130 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
131 General Public License for more details.
132
133 You should have received a copy of the GNU General Public License along
134 with this program; if not, write to the Free Software Foundation, Inc.,
135 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
136
137
138
139qemu-sanity-check-1.1.6 2020-09-10 QEMU-SANITY-CHECK(1)