You are not logged in.

#1 2021-10-12 17:57:47

psilokrn
Member
Registered: 2021-10-11
Posts: 5

Libvirt will not add vnet to virbr0

Hello everyone, I am having issues with my VM not connecting to the internet. I have a fairly fresh Arch install, and I followed the wiki on how to set up GPU passthrough and successfully got my VMs running. The problem is I have no internet access in the VM using default NAT. I found that upon starting the VM, vnet tap is created but is not added to the virbr0 bridge on the host and virbr0 stays down. I can run "brctl addif virbr0 vnet" and then "ip link set virbr0" to manually add the tap and set the virbr0 up and the VM can connect. However, this needs to be done every time I start a VM which isn't ideal. I've looked into using a network bridge instead of NAT for the VM but because host is on WiFi, that is not easily possible.

I have installed qemu, libvirt, edk2-ovmf, virt-manager, iptables-nft and dnsmasq.

When VM is off:

$ ip addr | grep 'virbr0\|vnet'
9: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0

When VM is on:

$ ip addr | grep 'virbr0\|vnet'
9: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
12: vnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
$ sudo virsh net-list
 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes

Offline

#2 2021-10-12 19:07:22

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 460

Re: Libvirt will not add vnet to virbr0

I guess you have a configuration error in virt-manager. Are you sure you have started/auto-started the interface there (with the buttons in the lower left corner)? You shouldn't need any manual shell intervention when using virt-manager.


sys2064

Offline

#3 2021-10-12 19:17:26

psilokrn
Member
Registered: 2021-10-11
Posts: 5

Re: Libvirt will not add vnet to virbr0

Yes, in virt-manager the default virtual network state is active and autostart is enabled.

Offline

#4 2021-10-13 10:59:45

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 460

Re: Libvirt will not add vnet to virbr0

Maybe you have some interfering network manager running in the background occupying or changing the bridge.


sys2064

Offline

#5 2021-10-16 23:38:58

psilokrn
Member
Registered: 2021-10-11
Posts: 5

Re: Libvirt will not add vnet to virbr0

Maniaxx wrote:

Maybe you have some interfering network manager running in the background occupying or changing the bridge.

Is there any way to see if this is the case?

I just did a fresh install of Arch and still having the same problem. I did notice that after running the VM if I check the status of systemd-resolved.service I get the following. Not sure if it's related as I'm not sure what this is saying.

Oct 16 16:26:21 arch systemd-resolved[412]: vnet0: Failed to read DNSSEC negative trust anchors for the interface, ignoring: No data available

Offline

#6 2021-10-17 17:01:00

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 460

Re: Libvirt will not add vnet to virbr0

Do you import a configuration in virt-manager? The program is not very 'failsafe'. Its possible to have orphaned network profiles connected to a NIC. Maybe try to delete the NIC, re-add it and re-assign the network profile.
Other than that i cannot reproduce the bug here. Even though i mostly use 'open network' these days (and handle forwarding manually) the vnat interfaces are always connected properly to the bridge.


sys2064

Offline

#7 2021-10-17 18:41:28

psilokrn
Member
Registered: 2021-10-11
Posts: 5

Re: Libvirt will not add vnet to virbr0

I am importing the configuration, however, I have tried with several new VM configurations as well as adding and removing the NIC and the results are the same. I installed Fedora on a spare SSD and tried the same VMs with the same configurations and did not have this issue.

I have found two other instances where someone was having the same issue and they both were on Arch.

User Jeff_WuYo was having the same issue and seemed to have fixed it by running "systemctl daemon-reload" but this did not fix the issue for me.
https://bbs.archlinux.org/viewtopic.php?id=266082

This is another user on Reddit having the same issue, also on Arch, and was not able to find a solution.
https://www.reddit.com/r/VFIO/comments/ … s_running/

Offline

#8 2021-10-17 21:47:36

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 460

Re: Libvirt will not add vnet to virbr0

Maybe check the debug logs:
https://wiki.debian.org/libvirt/Debugging


sys2064

Offline

Board footer

Powered by FluxBB