libvirtd cannot properly configure the default bridge device when installed inside of unprivileged LXD containers. 'systemctl status libvirtd' shows the following error:
error : virNetDevBridgeSet:140 : Unable to set bridge virbr0 forward_delay: Permission denied
This is caused due to the files under /sys/class/net/ being owned by init namespace root rather than container root even when the bridge device is created inside of the container. Here's an example from inside of an unprivileged container:
libvirt cannot open this file for writing even though it created the device. Where safe, files under /sys/class/net/ should be owned by container root.
The following upstream patches have been merged into linux-next which fix this bug:
libvirtd cannot properly configure the default bridge device when installed inside of unprivileged LXD containers. 'systemctl status libvirtd' shows the following error:
error : virNetDevBridge Set:140 : Unable to set bridge virbr0 forward_delay: Permission denied
This is caused due to the files under /sys/class/net/ being owned by init namespace root rather than container root even when the bridge device is created inside of the container. Here's an example from inside of an unprivileged container:
# brctl addbr testbr0 net/testbr0/ bridge/ forward_ delay net/testbr0/ bridge/ forward_ delay
# ls -al /sys/class/
-rw-r--r-- 1 nobody nogroup 4096 Jul 30 22:33 /sys/class/
libvirt cannot open this file for writing even though it created the device. Where safe, files under /sys/class/net/ should be owned by container root.
The following upstream patches have been merged into linux-next which fix this bug:
https:/ /git.kernel. org/pub/ scm/linux/ kernel/ git/next/ linux-next. git/commit/ ?id=c59e18b876d a3e466abe5fa066 aa69050f5be17c /git.kernel. org/pub/ scm/linux/ kernel/ git/next/ linux-next. git/commit/ ?id=d1753390274 f7760e5b593cb65 7ea34f0617e559
https:/