Libvirt vm won't connect to websites but have internet

I have 11 qemu/libvirt vm. Every one has lost internet capabilities. Each had functioning internet.

Each one says connection established during their startup. Each has an internet connection as ip command gives a network (ethernet) name and an ip address. None will ping anything. None will go to any website. Vivaldi browser is on each of them and is not giving any notifications f any problem.

After putting in a search string into browser each one just stalls with cursor circling as waiting for connection to a site but never connects.

At least two had functioning internet yesterday as I used them. libvirtd service is running on host. The issue must be with host as all are not functioning. Did do a zypper dup today. I will look at what was updated…

I am a networking dummy.
Any suggestions? thanks, tom Kosvic

I did a host reboot, as a long shot, and internet on one at least started working. Maybe it is solved but now I have no idea what happened.

Sorry for any inconvenience.

tom kosvic

So, something destroyed the service’s networking. So, next time it happens, try this:

  • In virt-manager click on QEMU/KVM ( the connection )
  • Click Edit Details
  • Go Virtual Networks, “default” is selelected
  • At the bottom, click the Stop icon, status goes to Inactive
  • Click the Start button, status goes to active.
  • VMs should now have proper networking again.
1 Like

Thanks for the tip

I just noticed these messages from yesterday when viewing logwatch file. They are related to virtnetworkd. Would that be the culprit that caused the vm to lose internet?

If so does message regarding virtnetworkd not shutting give a clue to the cause?

--------------------- Systemd Begin ------------------------ 

 Configuration errors:
    PIDFile= references a path below legacy directory /var/run/: 2 Time(s)
    Standard output type syslog is obsolete, automatically updating to journal: 12 Time(s)
 
 ERROR: Failed state:
         pured.service: 7 Time(s)
         xdg-desktop-portal.service: 16 Time(s)
 
 Warning: Found left-over process in control group while starting unit:
         virtnetworkd.service(dnsmasq): 2 Time(s)
 
 Warning: Remained running after unit stopped:
         virtnetworkd.service(dnsmasq): 4 Time(s)
 

libvirt Xen daemon admin socket skipped, unmet condition check ConditionPathExists=/proc/xen/capabilities: 1 Time(s)
    libvirt Xen daemon read-only socket skipped, unmet condition check ConditionPathExists=/proc/xen/capabilities: 1 Time(s)
    libvirt Xen daemon socket skipped, unmet condition check ConditionPathExists=/proc/xen/capabilities: 1 Time(s)
    machine-qemu\x2d3\x2dgentoo.scope: Failed to kill control group /machine.slice/machine-qemu\x2d3\x2dgentoo.scope, ignoring: Operation not supported: 2 Time(s)
    machine-qemu\x2d5\x2dpopos20.04.scope: Failed to kill control group /machine.slice/machine-qemu\x2d5\x2dpopos20.04.scope, ignoring: Operation not supported: 2 Time(s)
    virt-secret-init-encryption.service skipped, unmet condition check ConditionPathExists=!/var/lib/libvirt/secrets/secrets-encryption-key: 2 Time(s)
    virtnetworkd.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.: 2 Time(s)

I ran into this this morning. All running VMs showed “Limited Connectivity”. What I wrote earlier did not work, @tckosvic . Neither did rebooting the VMs. What did work was shutting them down, then starting them again. Wish I could force the behaviour, but have not succeeded. In my case it happened after the laptop was in suspend for ~8 hrs.

My did not work after shutting down the vms many times, it restarted when the host was rebooted.

Did you mean shutting down (power off) the vm distro from internal processes of the distro or did you mean “forcing off” the vm from vm manager using virtual machine → shutdown → force off?

I did the former that did nothing.

There is a forum thread on how to fix this…
Edit add ref: https://forums.opensuse.org/t/xdg-desktop-portal-keeps-crashing-on-hyprland-but-works-fine-on-kde/194975/4

I have no issues here with libvirt/qemu networking, I do however use bridge interfaces for my vm’s…

Aug 06 09:20:42 systemd[1]: Starting libvirt QEMU daemon...
Aug 06 09:20:42 systemd[1]: Started libvirt QEMU daemon.
Aug 06 09:20:44 systemd[1]: Starting libvirt storage daemon...
Aug 06 09:20:44 systemd[1]: Started libvirt storage daemon.
Aug 06 09:20:44 systemd[1]: Starting libvirt network daemon...
Aug 06 09:20:44 systemd[1]: Started libvirt network daemon.
Aug 06 09:20:44 systemd[1]: Starting libvirt nodedev daemon...
Aug 06 09:20:44 systemd[1]: Started libvirt nodedev daemon.
Aug 06 09:20:55 systemd[1]: Starting libvirt logging daemon...
Aug 06 09:20:55 systemd[1]: Started libvirt logging daemon.
Aug 06 09:21:49 virtqemud[307820]: libvirt version: 12.5.0

I have no knowledge of the advantages of a bridge interface nor any idea of why you would use one.
I will look that up.

I am network dummy.

I do have some bridge process working to get thunderbird to receive proton emails but I have no idea why.

I have to say that this internet issue is new. My vms have been bulletproof for years.

From the reference enclosed, no sucjh file installed.

cat: /etc/systemd/user/xdg-desktop-portal.service: No such file or directory

A bridge device is a physical interface on the hosts system, so the virtual machine is using that and not NAT… I have a couple, sometimes even four bridges running depending on my needs.

 ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 18:60:24:94:ed:f2 brd ff:ff:ff:ff:ff:ff
    altname enp0s25
    altname enx18602494edf2
3: enp12s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:0a:cd:24:d2:d2 brd ff:ff:ff:ff:ff:ff
    altname enx000acd24d2d2
4: enp13s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:0a:cd:24:d2:d3 brd ff:ff:ff:ff:ff:ff
    altname enx000acd24d2d3
5: ens4f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 1a:4b:24:c7:fe:fd brd ff:ff:ff:ff:ff:ff
    altname enp1s0f0
    altname enx1a4b24c7fefd
6: ens4f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 1a:4b:24:c7:fe:fe brd ff:ff:ff:ff:ff:ff
    altname enp1s0f1
    altname enx1a4b24c7fefe
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether f2:e6:df:3d:3a:ab brd ff:ff:ff:ff:ff:ff
11: vnet3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:3c:d0:a9 brd ff:ff:ff:ff:ff:ff

The default one is /usr/lib/systemd/user/xdg-desktop-portal.service you need to create the admin one in /etc…

I have always been able to run a several vms simultaneously without a bridge.

Does the bridge buy anything over just using the default NAT?

Like I said I network dummy.

tom kosvic

I think I see that the bridge allows each of the vms to talk with another vm. That might be an advantage.

Let me know if there are more advantages beyond that.

thanks, tom kosvic

Yes, full bandwidth, the vm treats it as a real interface in this case I use the e1000e driver for the vm, no network translation etc.

I also use USB → ethernet interfaces as well, the work fine, but I prefer a PCIe X1 network card with multiple ports.