[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvirt-users
Subject:    Re: Virtual Network API for QEMU
From:       Radek Simko <radek.simko () gmail ! com>
Date:       2021-03-31 20:39:50
Message-ID: CAEAqrUAV=1eQBDgA5jGVhF4noS1S7OZgUfMUDc2MizWoZyipGQ () mail ! gmail ! com
[Download RAW message or body]

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@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.
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>Thank you Laine and thanks Michal for the detailed  \
explanation.<br></div><div><br></div><div>To add some (missing) context from my \
side:</div><div><br></div><div>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:</div><div><br></div><div><pre \
style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation \
Mono&quot;,Menlo,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px;color:rgb(36,41,46)"><code \
style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation \
Mono&quot;,Menlo,monospace;font-size:11.9px;padding:0px;margin:0px;background:initial; \
border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">$ \
                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</code></pre></div><div><div><div dir="ltr" \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div \
dir="ltr"><div>This error in combination with the compatibility matrix made me think \
it&#39;s just not supported.</div><div>What is the right way of interpreting this \
error/state? Does the host OS play a role in the \
compatibility?</div><div><br></div><div>Are there any known limitations on macOS,  or \
is this likely just a broken/misconfigured installation on my \
side?</div><div><br></div><div dir="ltr">Radek \
Simko</div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Mon, Mar 29, 2021 at 10:29 AM Michal Privoznik &lt;<a \
href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>&gt; \
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/27/21 1:39 PM, \
Radek Simko wrote:<br> &gt; Hi,<br>
&gt; According to this support matrix <br>
&gt; <a href="https://libvirt.org/hvsupport.html#virNetworkDriver" rel="noreferrer" \
target="_blank">https://libvirt.org/hvsupport.html#virNetworkDriver</a> <br> &gt; \
&lt;<a href="https://libvirt.org/hvsupport.html#virNetworkDriver" rel="noreferrer" \
target="_blank">https://libvirt.org/hvsupport.html#virNetworkDriver</a>&gt;<br> &gt; \
there is no support for any APIs other than hypervisor ones for qemu.<br> &gt; For \
example virConnectNumOfNetworks is not supported.<br> &gt; <br>
&gt; Is there any particular reason this is not supported? Has any <br>
&gt; development in that area been attempted in the past? Would contributions <br>
&gt; adding support be welcomed?<br>
<br>
To extend Laine&#39;s reply:<br>
<br>
Libvirt has two set of drivers: statefull (where libvirt keeps the state <br>
of resources like domains, networks, ...) and stateless (where libvirt <br>
merely translates from/to APIs exposed by hypervisor).<br>
<br>
QEMU can be an example of a statefull driver, ESX or hyperv are examples <br>
of stateless drivers. Stateless drivers also implement network APIs <br>
(again, by translating from/to APIs exposed by the underlying hypervisor <br>
- ESX or hypverv in this example), whereas statefull drivers use bridge <br>
driver. Therefore, QEMU doesn&#39;t implement any network APIs.<br>
<br>
<br>
This is even more visible with split daemons (where monolithic libvirtd <br>
is broken into smaller daemons) - if virnetworkd is not running then <br>
things like &#39;virsh net-list&#39; return an error [*].<br>
<br>
<br>
Is there any particular problem you&#39;re facing?<br>
<br>
Michal<br>
<br>
<br>
* - except not really, because these split daemons are socket activated, <br>
so virnetworkd is stared automatically when needed.<br>
<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic