QEMU-SANITY-CHECK(1)
πΈ qemu-sanity-check π
okay so this is the manual page for qemu-sanity-check, and honestly? she's a little icon. it's a vibe check for your virtualization setup. let's get into it π«Ά
β¨ NAME β¨
qemu-sanity-check β run a simple sanity check on qemu and the Linux kernel
π SUMMARY π
qemu-sanity-check [options]
π DESCRIPTION π
qemu-sanity-check is a short shell script (yes, just a shell script, no cap) that test-boots a Linux kernel under qemu, making sure it boots alllll the way up to userspace. the whole idea is to test the Linux kernel and/or qemu and make sure they're actually working. like, are you okay bestie? let's find out π
you can just run it on its own, zero thoughts:
qemu-sanity-check
in that case, the script will look for a suitable qemu binary on the $PATH and the latest Linux kernel in /boot, then try to boot that kernel on that qemu. lowkey doing the most so you don't have to β¨
you can also specify a qemu binary or a Linux kernel β either or both options can be omitted, she's flexible like that:
qemu-sanity-check --qemu=/path/to/qemu --kernel=/path/to/vmlinuz
π§ KVM π§
KVM (kvm or qemu-kvm) can be used in place of qemu. same energy, different binary.
π KERNEL DRIVERS π
the good news: no kernel modules or special drivers are required, except as noted below. the test uses an initramfs containing a static binary, so the kernel is not required to locate block devices, use virtio, mount filesystems, etc. it's giving minimal-effort, maximum-slaying π
the kernel must support only the following, and they gotta be compiled in (not as modules β i said what i said):
- a serial port (usually:
CONFIG_SERIAL_8250=y) - Initrd/initramfs (
CONFIG_BLK_DEV_INITRD=y)
π OPTIONS π
--helpβ display short help message and exit. the classic.--accel=kvm,--accel=tcg,--accel=kvm:tcgβ this sets the-machine accel=...parameter which is passed to qemu.
if not set, then kvm:tcg is the default, which means: try to use KVM (hardware-assisted virtualization), and fall back to software emulation if KVM is not possible. bestie has a backup plan π
other typical values of this parameter are: tcg, which means force software emulation; and kvm, which means force KVM and fail if KVM is unavailable. no plan b, she's committed π
--cpu=CPUβ set the qemu--cpuoption. if not set then a suitable default is picked depending on the architecture and whether KVM is available. you can also use--cpu=to let qemu pick the default. letting her choose, main character energy π-i INITRD,--initrd=INITRDβ use the initramfs image namedINITRDinstead of the default.-k VMLINUZ,--kernel=VMLINUZβ use the kernel imageVMLINUZinstead of searching for the latest kernel installed in/boot.-m MACHINE,--machine=MACHINEβ set the qemu-m(machine type) option. if not set then a suitable default is picked depending on the architecture. you can also use--machine=to let qemu pick the default.-q QEMU,--qemu=QEMUβ use the qemu (or KVM) binaryQEMUinstead of searching$PATHfor a suitable binary.-t TIMEOUT,--timeout=TIMEOUTβ specify a timeout instead of the default which is10m(10 minutes). the syntax for theTIMEOUTis described in full in the man page fortimeout(1). yes, go read that one too, i'll wait π-v,--verboseβ print extra debugging information. she's a talker, we love that.-V,--versionβ display version and exit.
β EXIT STATUS β
- the exit status is
0if the Linux kernel booted as far as userspace under qemu; or if the--helpor--versionoptions were used. slay π - the exit status is
1if the kernel boot failed under qemu. sad girl hours π - the exit status is
2if the script itself failed (eg. incorrect command line options were used, a suitable kernel could not be found). not her fault, fr fr.
π¦ FILES π¦
/usr/lib64/qemu-sanity-check/initrdβ the default location for the small initramfs image that is used to test that userspace has been reached. tiny but mighty π
π₯ SEE ALSO π₯
πΈ AUTHORS πΈ
Richard W.M. Jones <rjones@redhat.com>
π COPYRIGHT π
(C) Copyright 2013-2020 Red Hat Inc.
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.
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.
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.
and that's the whole page bestie, stream it, bookmark it, live by it πβ¨ version qemu-sanity-check-1.1.6, dated 2023-09-01 β mwah, love u, bye π«Άπ
π¦ where this page comes from
- epel 9: qemu-sanity-check-nodeps 1.1.6-11.el9 Β· GPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms