Completed

Detailed Description

NIC hotplug is a relatively common virtualization feature. The idea is that one should be able to add and remove NICs from a guest while it is running. For example, you might want to connect the guest to an additional network, without having to restart the guest.

This is currently supported by QEMU, but only if you allow QEMU to create and configure the tap device itself.

libvirt prefers to create the tap device and pass the file descriptor to QEMU via the command line. In order to support hotplug, we need QEMU to allow us to pass a file descriptor over the QEMU monitor socket.

The only way this could conceivably be supported is to have QEMU support file descriptor passing via SCM_RIGHTS on a unix socket.

The alternative is to use persistent tap devices, but this makes error/cleanup handling far more difficult and also requires that the QEMU process has permissions to /dev/net/tun.