mirror of
https://github.com/containers/gvisor-tap-vsock.git
synced 2025-12-24 13:29:22 +08:00
User can now choose between vpnkit or qemu protocol. Qemu needs to be run with this argument: `-netdev socket,id=vlan,connect=IP:PORT -device virtio-net-pci,netdev=vlan` where IP and PORT represent the daemon on the host. This extra port allocation can be avoided with the qemu-wrapper in cmd/. The daemon can listen a unix domain socket, the wrapper will pass it to Qemu as a file descriptor.
231 B
231 B
Qemu doesn't accept a unix socket as netdev, only a file descriptro. This wrapper is filling the gap.
$ ./qemu-wrapper /tmp/qemu.sock qemu-system-x86_64 [...] -netdev socket,id=vlan,fd=3 -device virtio-net-pci,netdev=vlan