qrap(1)
π qrap β the temporary qemu wrapper (from the General Commands Manual, section 1) π
okay bestie, gather round, because qrap is one of those little glue scripts that's lowkey carrying the whole vibe check. it connects a UNIX domain socket to a file descriptor and then yeets qemu into existence. temporary queen behavior, honestly. π
β¨ NAME β¨
qrap β a temporary qemu wrapper that connects a UNIX domain socket to a file descriptor π¦
πΈ SYNOPSIS πΈ
qrap [FDNUM QEMU_CMD] [QEMU_ARG]...
π DESCRIPTION π
so qrap is a wrapper, and it was designed specifically to be used with qemu(1) and passt(1). what it does is connect a UNIX domain socket to a file descriptor, and then run qemu(1) with whatever arguments you handed it. it's giving personal assistant energy. π
when qrap goes looking, it probes a running instance of passt(1) by checking for UNIX domain sockets that answer a dummy ARP request. those sockets have names starting from /tmp/passt_1.socket all the way up to /tmp/passt_64.socket. yes, sixty-four of them. it's thorough. π
now, if the first and second arguments are not a socket number and a command β that is, respectively, FDNUM and QEMU_CMD β then qrap will go hunting for a qemu executable in PATH, and it will patch the command line for you so that a network device and a netdev back-end get specified for usage with passt(1). so helpful. so thoughtful. π«Ά
and ifqrapdoes patch the command line, it will remove any potentially conflicting network device. that means any-netdevor-netoption, or any-deviceoption whose argument starts withvirtio-net-pci,,virtio-net-ccw,,e1000,,e1000e,, orrtl8139,. it clears the old ones out of the way first, no cap. π§Ήβ¨
π EXAMPLES π
Start qemu explicitly passing its command name and a socket number β here you're telling it exactly what you want:
$ ./qrap 5 kvm test.qcow2 -m 1024 -display none -nodefaults -nographic -net socket,fd=5 -net nic,model=virtio
Start qemu without command name and socket number, patching arguments β here you let qrap do its little magic trick and patch things for you:
$ ./qrap test.qcow2 -m 1024 -display none -nodefaults -nographic
π NOTES π
this wrapper is temporary, bestie. like, genuinely temporary. qemu commit 13c6be96618c ("net: stream: add unix socket") introduces native AF_UNIX socket support, and it should be included in qemu starting from the 7.2 release. π
so qrap will be around for a little bit longer, just to give users enough time to switch over. it's the loyal friend who stays until everyone's safely home. ππ
π AUTHOR π
Stefano Brivio <sbrivio@redhat.com>
π REPORTING BUGS π
there is no public bug tracker available at this time. for the moment being, report issues to Stefano Brivio <sbrivio@redhat.com>. slide into the email, not the DMs. π§
β COPYRIGHT β
Copyright (c) 2020-2021 Red Hat GmbH.
qrap is free software: you can redistribute is 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.
π₯ SEE ALSO π₯
high-level documentation is available at https://passt.top/passt/about/. go read it, it's iconic. π
and that's the whole page, bestie β <pink>qrap(1)</pink>, straight out of the General Commands Manual, section 1. mwah. π
π
π¦ where this page comes from
- alpine 3.24: passt-doc 2026.05.26-r0 Β· BSD-3-Clause AND GPL-2.0-or-later
- debian trixie: passt 0.0~git20250503.587980c-2+deb13u1 Β· GPL-2.0-or-later
- fedora 43: passt 0^20250919.g623dbf6-1.fc43 Β· GPL-2.0-or-later AND BSD-3-Clause
- fedora 44: passt 0^20260120.g386b5f5-1.fc44 Β· GPL-2.0-or-later AND BSD-3-Clause
- nixos 26.05: passt 2025_09_19.623dbf6
- nixpkgs unstable: passt 2026_07_16.090d739
- opensuse-leap 16.0: passt 20250415.2340bbf-160000.2.2 Β· GPL-2.0-or-later AND BSD-3-Clause
- opensuse-leap 16.0: passt 20250415.2340bbf-160000.2.2 Β· GPL-2.0-or-later AND BSD-3-Clause
- opensuse-leap 16.0: passt 20250415.2340bbf-160000.2.2 Β· GPL-2.0-or-later AND BSD-3-Clause
- opensuse-leap 16.0: passt 20250415.2340bbf-160000.2.2 Β· GPL-2.0-or-later AND BSD-3-Clause
- ubuntu questing: passt 0.0~git20250503.587980c-2
- ubuntu resolute: passt 0.0~git20260120.386b5f5-1 Β· GPL-2.0-or-later
- π the page's license: GPL-2.0-or-later
- Copyright (c) 2020-2021 Red Hat GmbH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms