LXD fails to create VM with QEMU 7.2.0: "../../net/net.c:1106: net_client_init1: Assertion `nc' failed." Description of problem: Beginning with QEMU 7.2.0, LXD is unable to launch virtual machines using the default network profile, which breaks the out-of-box experience if a user wishes to create a virtual machine. This worked correctly with QEMU 7.1.0. Multiple users across different Linux distributions are reporting this issue: - https://discuss.linuxcontainers.org/t/failed-adding-nic-netdev-monitor-is-disconnected/15946 - https://forums.gentoo.org/viewtopic-p-8774212.html - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030365 ``` gibmat@tharkun:~$ lxc launch images:debian/sid debian-sid-vm --vm Creating debian-sid-vm Starting debian-sid-vm Error: Failed setting up device via monitor: Failed setting up device "eth0": Failed adding NIC netdev: Monitor is disconnected Try `lxc info --show-log local:debian-sid-vm` for more info gibmat@tharkun:~$ lxc info --show-log local:debian-sid-vm Name: debian-sid-vm Status: STOPPED Type: virtual-machine Architecture: x86_64 Created: 2023/02/10 23:47 UTC Log: warning: tap: open vhost char device failed: Permission denied warning: tap: open vhost char device failed: Permission denied qemu-system-x86_64: ../../net/net.c:1106: net_client_init1: Assertion `nc' failed. ``` ``` gibmat@tharkun:~$ qemu-system-x86_64 --version QEMU emulator version 7.2.0 (Debian 1:7.2+dfsg-2) Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers gibmat@tharkun:~$ lxc version Client version: 5.0.2 Server version: 5.0.2 ``` Steps to reproduce: 1. Install LXD and QEMU 7.2.0 2. `lxc launch images:debian/sid debian-sid-vm --vm` - This will fail as reported above 3. Downgrade to QEMU 7.1.0 (such as from https://snapshot.debian.org/package/qemu/1%3A7.1%2Bdfsg-2/) 4. `lxc launch images:debian/sid debian-sid-vm --vm` - Now VM creation is successful ``` gibmat@tharkun:~$ lxc launch images:debian/sid debian-sid-vm --vm Creating debian-sid-vm Starting debian-sid-vm gibmat@tharkun:~$ lxc list +---------------+---------+------+-----------------------------------------------+-----------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +---------------+---------+------+-----------------------------------------------+-----------------+-----------+ | debian-sid-vm | RUNNING | | fd42:ea61:feb4:55ef:216:3eff:feb8:2e8c (eth0) | VIRTUAL-MACHINE | 0 | +---------------+---------+------+-----------------------------------------------+-----------------+-----------+ gibmat@tharkun:~$ lxc info --show-log local:debian-sid-vm Name: debian-sid-vm Status: RUNNING Type: virtual-machine Architecture: x86_64 PID: 2502 Created: 2023/02/11 15:08 UTC Last Used: 2023/02/11 15:08 UTC Resources: Processes: -1 Network usage: eth0: Type: broadcast State: UP Host interface: tap5efa7582 MAC address: 00:16:3e:b8:2e:8c MTU: 1500 Bytes received: 3.13kB Bytes sent: 164B Packets received: 12 Packets sent: 2 IP addresses: inet6: fd42:ea61:feb4:55ef:216:3eff:feb8:2e8c/64 (global) Log: warning: tap: open vhost char device failed: Permission denied warning: tap: open vhost char device failed: Permission denied gibmat@tharkun:~$ qemu-system-x86_64 --version QEMU emulator version 7.1.0 (Debian 1:7.1+dfsg-2+b3) Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers ```