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 -q QEMU
74 --qemu=QEMU
75 Use the qemu (or KVM) binary "QEMU" instead of searching $PATH for
76 a suitable binary.
77
78 -t TIMEOUT
79 --timeout=TIMEOUT
80 Specify a timeout instead of the default which is "10m" (10
81 minutes).
82
83 The syntax for the "TIMEOUT" is described in full in the man page
84 for timeout(1).
85
86 -V
87 --version
88 Display version and exit.
89
91 The exit status is 0 if the Linux kernel booted as far as userspace
92 under qemu; or if the --help or --version options were used.
93
94 The exit status is 1 if the kernel boot failed under qemu.
95
96 The exit status is 2 if the script itself failed (eg. incorrect command
97 line options were used, a suitable kernel could not be found).
98
100 /usr/lib64/qemu-sanity-check/initrd
101 The default location for the small initramfs image that is used to
102 test that userspace has been reached.
103
105 <http://qemu.org>, <http://kernel.org>
106
108 Richard W.M. Jones <rjones@redhat.com>
109
111 (C) Copyright 2013 Red Hat Inc.
112
113 This program is free software; you can redistribute it and/or modify it
114 under the terms of the GNU General Public License as published by the
115 Free Software Foundation; either version 2 of the License, or (at your
116 option) any later version.
117
118 This program is distributed in the hope that it will be useful, but
119 WITHOUT ANY WARRANTY; without even the implied warranty of
120 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
121 General Public License for more details.
122
123 You should have received a copy of the GNU General Public License along
124 with this program; if not, write to the Free Software Foundation, Inc.,
125 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
126
127
128
129qemu-sanity-check-1.1.5 2019-02-03 QEMU-SANITY-CHECK(1)