You are not logged in.

#1 2022-12-09 13:20:09

nphuracm
Member
From: China
Registered: 2022-07-16
Posts: 69

Libvirt fails to start the 'default' network most of the time

I have a Windows virtual machine configured in Libvirt with PCI passthrough via OVMF configured following the instructions found in ArchWiki. It was configured to just use the 'default' network.

But recently it has been acting funny. I normally use the command 'sudo virsh net-start --network default' before starting the VM. This command most likely works when the system has just booted, but in many other situations it comes with the following message with the last line shown here being roughly translated to (LC_ALL=C doesn't work for that particular line):

[nphuracm@nphuracm-Frontier ~]$ LC_ALL=C sudo virsh net-start --network default
error: Failed to start network default
error: could not create bridge virbr0: package not installed

The original text of the last line of the error output is:

error: 无法生成桥接 virbr0: 包未安装

Ran 'virsh net-list' and the default network did not show up.

[nphuracm@nphuracm-Frontier ~]$ LC_ALL=C sudo virsh net-list
 Name   State   Autostart   Persistent
----------------------------------------

[nphuracm@nphuracm-Frontier ~]$ 

'virsh net-autostart' worked out properly however.

[nphuracm@nphuracm-Frontier ~]$ LC_ALL=C sudo virsh net-autostart default
Network default marked as autostarted

I would be appreciated for a possible way to solve this once and for all.

Last edited by nphuracm (2022-12-09 13:28:26)

Offline

#2 2022-12-10 12:37:41

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,270

Re: Libvirt fails to start the 'default' network most of the time

from https://wiki.libvirt.org/page/VirtualNe … l_networks

net-start - Starts an inactive, previously defined virtual network.

net-autostart - Marks or unmarks automatic startup of a persistent virtual network. Networks with the autostart flag enabled are started whenever libvirt daemon starts. To disable autostart use the --disable switch.

When net-start fails check if it is listed as active already in net-list .

Last edited by Lone_Wolf (2022-12-10 12:37:56)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2022-12-10 13:12:20

nphuracm
Member
From: China
Registered: 2022-07-16
Posts: 69

Re: Libvirt fails to start the 'default' network most of the time

Lone_Wolf wrote:

from https://wiki.libvirt.org/page/VirtualNe … l_networks

net-start - Starts an inactive, previously defined virtual network.

net-autostart - Marks or unmarks automatic startup of a persistent virtual network. Networks with the autostart flag enabled are started whenever libvirt daemon starts. To disable autostart use the --disable switch.

When net-start fails check if it is listed as active already in net-list .

When net-start fails, net-list is empty. Nothing in it at all.
I do have solved this issue in particular by using net-autostart. However I would like to know what on earth is the real cause of this absurd issue.

Offline

Board footer

Powered by FluxBB