5 qemu-sanity-check - run a simple sanity check on qemu and the Linux kernel
9 qemu-sanity-check [options]
13 B<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.
17 You can use the command on its own:
21 In this case, the script will look for a suitable qemu binary on the
22 C<$PATH> and the latest Linux kernel in C</boot> and try to boot that
25 You can also specify a qemu binary or a Linux kernel (either or both
26 options can be omitted):
28 qemu-sanity-check --qemu=/path/to/qemu --kernel=/path/to/vmlinuz
32 KVM (C<kvm> or C<qemu-kvm>) can be used in place of qemu.
36 No kernel modules or special drivers are required except as noted
37 below. The test uses an initramfs containing a static binary, so the
38 kernel is B<not> required to locate block devices, use virtio, mount
41 The kernel B<must> support only the following, compiled in (not as
48 A serial port (usually: C<CONFIG_SERIAL_8250=y>)
52 Initrd/initramfs (C<CONFIG_BLK_DEV_INITRD=y>)
62 Display short help message and exit.
66 =item B<--initrd>=INITRD
68 Use the initramfs image named C<INITRD> instead of the default.
72 =item B<--kernel>=VMLINUZ
74 Use the kernel image C<VMLINUZ> instead of searching for the latest
75 kernel installed in C</boot>.
81 Use the qemu (or KVM) binary C<QEMU> instead of searching C<$PATH> for
88 Display version and exit.
94 The exit status is 0 if the Linux kernel booted as far as userspace
95 under qemu; or if the I<--help> or I<--version> options were used.
97 The exit status is 1 if the kernel boot failed under qemu.
99 The exit status is 2 if the script itself failed (eg. incorrect
100 command line options were used, a suitable kernel could not be found).
106 =item B<@libdir@/qemu-sanity-check/initrd>
108 The default location for the small initramfs image that is used to
109 test that userspace has been reached.
120 Richard W.M. Jones <rjones@redhat.com>
124 (C) Copyright 2013 Red Hat Inc.
126 This program is free software; you can redistribute it and/or modify
127 it under the terms of the GNU General Public License as published by
128 the Free Software Foundation; either version 2 of the License, or
129 (at your option) any later version.
131 This program is distributed in the hope that it will be useful,
132 but WITHOUT ANY WARRANTY; without even the implied warranty of
133 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134 GNU General Public License for more details.
136 You should have received a copy of the GNU General Public License
137 along with this program; if not, write to the Free Software
138 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.