---
name: "qrap"
section: "1"
platform: "linux"
package: "passt"
version: "0.0~git20250503.587980c-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/qrap"
---

# qrap(1)

temporary qemu wrapper connecting UNIX domain socket to file descriptor

## NAME

**qrap** - temporary qemu wrapper connecting UNIX domain socket to file descriptor

## SYNOPSIS

**qrap** \[*FDNUM* *QEMU\_CMD*\] \[*QEMU\_ARG*\]...

## DESCRIPTION

**qrap** is a wrapper, designed specifically for usage with [**qemu**(1)](/qemu/1.md) and [**passt**(1)](/passt/1.md), connecting a UNIX domain socket to a file descriptor, and running [**qemu**(1)](/qemu/1.md) with given arguments.

A running instance of [**passt**(1)](/passt/1.md) is probed checking for UNIX domain sockets, answering a dummy ARP request, with names starting from */tmp/passt\_1.socket* up to */tmp/passt\_64.socket*.

If first and second arguments are not a socket number and a command, that is, respectively, *FDNUM* and *QEMU\_CMD*, **qrap** will try to locate a qemu executable in **PATH** and patch the command line to specify a network device and a *netdev* back-end for usage with [**passt**(1)](/passt/1.md).

If **qrap** patches the command line, it will remove any potentially conflicting network device, that is, any *-netdev* or *-net* option, or any *-device* option with argument starting with *virtio-net-pci,*, *virtio-net-ccw,*, *e1000,*, *e1000e,*, or *rtl8139,*.

## EXAMPLES

**Start qemu explicitly passing its command name and a socket number**

```
$ ./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**

```
$ ./qrap test.qcow2 -m 1024 -display none -nodefaults -nographic
```

## NOTES

This wrapper is 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. It will be around for a little bit longer to give users enough time to switch.

## AUTHOR

Stefano Brivio \<sbrivio@redhat.com\>

## REPORTING BUGS

No public bug tracker is available at this time. For the moment being, report issues to Stefano Brivio \<sbrivio@redhat.com\>.

## 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

[**qemu**(1)](/qemu/1.md), [**passt**(1)](/passt/1.md).

High-level documentation is available at https://passt.top/passt/about/.
