<div dir="ltr">I see, thank you for the extra context and quick response Michal.<div><br></div><div>I wasn't aware of the userspace SLIRP stack nor the darwin limitation - will give either a try.</div><div><br></div><div>My main requirement is basically getting SSH to work, so I can do some provisioning, anything else would be a bonus for me.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr">Radek Simko</div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 1, 2021 at 11:09 AM Michal Privoznik <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/31/21 10:39 PM, Radek Simko wrote:<br>
> Thank you Laine and thanks Michal for the detailed explanation.<br>
> <br>
> To add some (missing) context from my side:<br>
> <br>
> I was attempting to virtualize Raspberry Pi on qemu via libvirt, where <br>
> my host machine is macOS (both qemu and libvirt installed via Homebrew) <br>
> and I while trying to set up the network I stumbled upon this:<br>
> <br>
> |$ virsh -c <br>
> qemu:///system?socket=/usr/local/var/run/libvirt/libvirt-sock net-list <br>
> --all error: Failed to get the number of active networks error: this <br>
> function is not supported by the connection driver: virConnectNumOfNetworks|<br>
> <br>
> This error in combination with the compatibility matrix made me think <br>
> it's just not supported.<br>
> What is the right way of interpreting this error/state? Does the host OS <br>
> play a role in the compatibility?<br>
<br>
Yes it does.<br>
<br>
> <br>
> Are there any known limitations on macOS, or is this likely just a <br>
> broken/misconfigured installation on my side?<br>
<br>
Oh, now I get it. You are not building the network (bridge) driver. And <br>
looking into meson.build I can see why:<br>
<br>
<br>
# there's no use compiling the network driver without the libvirt<br>
# daemon, nor compiling it for macOS, where it breaks the compile<br>
if not get_option('driver_network').disabled() and <br>
conf.has('WITH_LIBVIRTD') and host_machine.system() != 'darwin'<br>
   conf.set('WITH_NETWORK', 1)<br>
endif<br>
<br>
<a href="https://gitlab.com/libvirt/libvirt/-/blob/master/meson.build#L1649" rel="noreferrer" target="_blank">https://gitlab.com/libvirt/libvirt/-/blob/master/meson.build#L1649</a><br>
<br>
But I'm not sure whether the comment is still true. I don't have any <br>
access to macOS so I can't confirm nor deny. But since you can, you can <br>
try changing that condition so that WITH_NETWORK is enabled and see <br>
whether compilation fails. On the other hand, I'm not sure whether our <br>
code would be able to talk to macOS and create briges/TAP devices/...<br>
<br>
But unless you need something specific for RasPI (i.e. generic <br>
HTTP/HTTPS) is enough, then you don't need libvirt network - you can use <br>
<interface type='user'/>. You can even configure it's IP address should <br>
you need to do so:<br>
<br>
<a href="https://libvirt.org/formatdomain.html#userspace-slirp-stack" rel="noreferrer" target="_blank">https://libvirt.org/formatdomain.html#userspace-slirp-stack</a><br>
<br>
Michal<br>
<br>
</blockquote></div>