qrap - Man Page

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) and passt(1), connecting a UNIX domain socket to a file descriptor, and running qemu(1) with given arguments.

A running instance of passt(1) 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).

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 and needed only as long as qemu(1) does not directly support a UNIX domain socket as netdev back-end.

Out-of-tree patches for qemu(1) introducing support for a UNIX domain socket back-end are available at:

https://passt.top/passt/tree/contrib/qemu

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

See Also

qemu(1), passt(1).

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

Referenced By

passt(1).