Virtual Network API for QEMU

Radek Simko radek.simko at gmail.com
Wed Mar 31 20:39:50 UTC 2021


Thank you Laine and thanks Michal for the detailed explanation.

To add some (missing) context from my side:

I was attempting to virtualize Raspberry Pi on qemu via libvirt, where my
host machine is macOS (both qemu and libvirt installed via Homebrew) and I
while trying to set up the network I stumbled upon this:

$ virsh -c qemu:///system?socket=/usr/local/var/run/libvirt/libvirt-sock
net-list --all
error: Failed to get the number of active networks
error: this function is not supported by the connection driver:
virConnectNumOfNetworks

This error in combination with the compatibility matrix made me think it's
just not supported.
What is the right way of interpreting this error/state? Does the host OS
play a role in the compatibility?

Are there any known limitations on macOS, or is this likely just a
broken/misconfigured installation on my side?

Radek Simko


On Mon, Mar 29, 2021 at 10:29 AM Michal Privoznik <mprivozn at redhat.com>
wrote:

> On 3/27/21 1:39 PM, Radek Simko wrote:
> > Hi,
> > According to this support matrix
> > https://libvirt.org/hvsupport.html#virNetworkDriver
> > <https://libvirt.org/hvsupport.html#virNetworkDriver>
> > there is no support for any APIs other than hypervisor ones for qemu.
> > For example virConnectNumOfNetworks is not supported.
> >
> > Is there any particular reason this is not supported? Has any
> > development in that area been attempted in the past? Would contributions
> > adding support be welcomed?
>
> To extend Laine's reply:
>
> Libvirt has two set of drivers: statefull (where libvirt keeps the state
> of resources like domains, networks, ...) and stateless (where libvirt
> merely translates from/to APIs exposed by hypervisor).
>
> QEMU can be an example of a statefull driver, ESX or hyperv are examples
> of stateless drivers. Stateless drivers also implement network APIs
> (again, by translating from/to APIs exposed by the underlying hypervisor
> - ESX or hypverv in this example), whereas statefull drivers use bridge
> driver. Therefore, QEMU doesn't implement any network APIs.
>
>
> This is even more visible with split daemons (where monolithic libvirtd
> is broken into smaller daemons) - if virnetworkd is not running then
> things like 'virsh net-list' return an error [*].
>
>
> Is there any particular problem you're facing?
>
> Michal
>
>
> * - except not really, because these split daemons are socket activated,
> so virnetworkd is stared automatically when needed.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20210331/4380fe5d/attachment.htm>


More information about the libvirt-users mailing list