I have build qemu-7.2.0
and then, when running it I am getting
qemu-system-x86_64: -nic user,model=virtio: network backend 'user' is not compiled into this binary
Apparently, I should enable this feature during build, but how to know which is it namely?
The 'user' networking backend is provided by the 'slirp' library; you get this message when the QEMU binary was built without slirp support compiled in.
As noted in the 7.2 changelog, QEMU no longer ships a copy of the slirp module with its sources. Instead you need to make sure you have installed your distro's libslirp development package (which is probably called libslirp-devel or libslirp-dev or something similar) before configuring and building QEMU. You need at least libslirp 4.7 or better.
QEMU's configure convention for optional features which require some build-time dependency is:
So you can pass configure
--enable-slirp
to force it to give you an error if you haven't got the dependency, as a way of checking that you've installed the right system package for libslirp.