You are not logged in.
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
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
Yes, in virt-manager the default virtual network state is active and autostart is enabled.
Offline
Maybe you have some interfering network manager running in the background occupying or changing the bridge.
sys2064
Offline
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
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
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
Maybe check the debug logs:
https://wiki.debian.org/libvirt/Debugging
sys2064
Offline
I'm having the EXACT same problem on a fresh arch Linux install (it's literally 2 days old).
The only difference is that I followed https://github.com/xiagw/winapps/blob/main/docs/KVM.md to install the windows 10 (alongside the archwiki ofc, everything works fine aside from this one networking issue).
Applying the fix that psilokrn talks about works.
One clue I would like to leave here, since my technical skills are failing me:
Last reply of the thread, the user xabbu writes:
"... you use systemd-resolved with the stub resolver? Because libvirt starts a dnsmasq process that needs to listen on 192.168.122.1:53, but port 53 might be taken for all addresses by systemd-resolved."
https://forum.manjaro.org/t/no-internet … s/75146/14
Offline
I'm having the EXACT same problem on a fresh arch Linux install (it's literally 2 days old).
The only difference is that I followed https://github.com/xiagw/winapps/blob/main/docs/KVM.md to install the windows 10 (alongside the archwiki ofc, everything works fine aside from this one networking issue).
Applying the fix that psilokrn talks about works.One clue I would like to leave here, since my technical skills are failing me:
Last reply of the thread, the user xabbu writes:
"... you use systemd-resolved with the stub resolver? Because libvirt starts a dnsmasq process that needs to listen on 192.168.122.1:53, but port 53 might be taken for all addresses by systemd-resolved."
https://forum.manjaro.org/t/no-internet … s/75146/14
Systemd-resolved listening on port 53 was an issue for dnsmasq, which I fixed, but it did not fix this issue.
Offline
@psilokrn : any news on that topic ? i'm running into the same issue, here : https://bbs.archlinux.org/viewtopic.php?pid=2016529
Offline
I ran into this problem and in my case it was because systemd-networkd was configuring vnet0,
I run systemd-networkd as well as NetworkManager with the former configuring ethernet (wired) configurations and the latter just for wifi and bluetooth.
The problem is, my systemd.network file had
[Match]
Type=ether
which apparently also matches virtual networks. I added
Driver = !tun
which fixes it.
I'm not sure that this is the best solution. It seems to me there should a way, in the libvirt network configuration, to say "managed by libvirt" but I can't see anything.
Offline