Skip to main content
Topic: Booting KVM Guest breaks internet  (Read 1204 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Booting KVM Guest breaks internet

I am at a loss as to the issue. I am on artix (RUNIT) .Booting to KVM guest breaks internet (WIFI). Shutting down restores internet connection. the error I get from
Code: [Select]
ping 8.8.8.8: 
From <IP> Destination host unreachable


I am able to ping the host and visa versa. I just have trouble interpreting logs and solving the issue (seems to me dhcp is causing issue, haven't tried switching to dhclient yet, because it used to work before latest system update). Kindly, anyone willing to take me through the steps please?

I use:
- virt-manager
-  NetworManager
- wpa_supplicant installed, but service not enabled. (to prevent compatibility issues)

Logs from host:
Code: [Select]
$ ip route show
0.0.0.0 dev vnet1 scope link
default dev vnet1 scope link
default via 192.168.25.186 dev wlan0 proto dhcp src 192.168.25.206 metric 3002
169.254.0.0/16 dev vnet1 proto kernel scope link src 169.254.75.168
192.168.25.0/24 dev wlan0 proto dhcp scope link src 192.168.25.206 metric 3002
192.168.25.186 dev wlan0 scope link
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1   

Code: [Select]
$ ip link
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: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 5e:6f:35:78:58:fb brd ff:ff:ff:ff:ff:ff permaddr d8:9c:67:6f:25:17
3: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:01:fa:ce brd ff:ff:ff:ff:ff:ff
5: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master virbr0 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:9d:79:87 brd ff:ff:ff:ff:ff:ff
amy-R:[amy]:~/Downloads$

Code: [Select]
$ dmesg
[ 1557.508590] virbr0: port 1(vnet1) entered blocking state
[ 1557.508601] virbr0: port 1(vnet1) entered disabled state
[ 1557.508734] device vnet1 entered promiscuous mode
[ 1557.509042] virbr0: port 1(vnet1) entered blocking state
[ 1557.509049] virbr0: port 1(vnet1) entered listening state
[ 1559.679608] virbr0: port 1(vnet1) entered learning state
[ 1561.812943] virbr0: port 1(vnet1) entered forwarding state
[ 1561.812952] virbr0: topology change detected, propagating
[ 1661.011835] wlan0: deauthenticating from 56:6f:90:26:a8:95 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1696.338500] wlan0: authenticate with 56:6f:90:26:a8:95
[ 1696.341438] pcieport 0000:00:01.2: AER: Multiple Corrected error received: 0000:01:00.0
[ 1696.341461] rtw_8822be 0000:01:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID)
[ 1696.341466] rtw_8822be 0000:01:00.0:   device [10ec:b822] error status/mask=00000080/00006000
[ 1696.341472] rtw_8822be 0000:01:00.0:    [ 7] BadDLLP              
[ 1696.872980] wlan0: send auth to 56:6f:90:26:a8:95 (try 1/3)
[ 1696.911395] wlan0: authenticate with 56:6f:90:26:a8:95
[ 1696.911447] wlan0: send auth to 56:6f:90:26:a8:95 (try 1/3)
[ 1696.939568] wlan0: authenticated
[ 1696.942946] wlan0: associate with 56:6f:90:26:a8:95 (try 1/3)
[ 1696.948911] wlan0: RX AssocResp from 56:6f:90:26:a8:95 (capab=0x431 status=0 aid=1)
[ 1696.949237] wlan0: associated
[ 1697.029727] wlan0: Limiting TX power to 0 (-128 - 0) dBm as advertised by 56:6f:90:26:a8:95
[ 1697.083073] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2073.009633] wlan0: deauthenticating from 56:6f:90:26:a8:95 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2146.311626] wlan0: authenticate with 56:6f:90:26:a8:95
[ 2146.852917] wlan0: send auth to 56:6f:90:26:a8:95 (try 1/3)
[ 2147.011585] wlan0: authenticate with 56:6f:90:26:a8:95
[ 2147.011639] wlan0: send auth to 56:6f:90:26:a8:95 (try 1/3)
[ 2147.030392] wlan0: authenticated
[ 2147.032901] wlan0: associate with 56:6f:90:26:a8:95 (try 1/3)
[ 2147.039141] wlan0: RX AssocResp from 56:6f:90:26:a8:95 (capab=0x431 status=0 aid=1)
[ 2147.039464] wlan0: associated
[ 2147.071013] wlan0: Limiting TX power to 0 (-128 - 0) dBm as advertised by 56:6f:90:26:a8:95
[ 2147.146828] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready


Logs from VM Guest
Code: [Select]
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:9d:79:87 brd ff:ff:ff:ff:ff:ff

Code: [Select]
└─$ ip route show
default via 192.168.122.1 dev eth0 proto dhcp src 192.168.122.180 metric 100
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.180 metric 100

Code: [Select]
[   14.635803] systemd[1]: first-boot-complete.target - First Boot Complete was skipped because of an unmet condition check (ConditionFirstBoot=yes).
[   14.645979] systemd[1]: Finished systemd-sysusers.service - Create System Users.
[   14.647776] systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev...
[   14.651954] systemd[1]: Started systemd-journald.service - Journal Service.
[   14.663801] systemd-journald[485]: Received client request to flush runtime journal.
[   14.842842] sr 0:0:0:0: Attached scsi generic sg0 type 5
[   15.126666] Adding 1003516k swap on /dev/mapper/amyhost--vg-swap_1.  Priority:-2 extents:1 across:1003516k FS
[   15.150142] iTCO_vendor_support: vendor-support=0
[   15.170704] input: PC Speaker as /devices/platform/pcspkr/input/input5
[   15.210951] iTCO_wdt iTCO_wdt.1.auto: Found a ICH9 TCO device (Version=2, TCOBASE=0x0660)
[   15.211259] iTCO_wdt iTCO_wdt.1.auto: initialized. heartbeat=30 sec (nowayout=0)
[   15.226619] SVM: TSC scaling supported
[   15.226628] kvm: Nested Virtualization enabled
[   15.226629] SVM: kvm: Nested Paging enabled
[   15.226640] SVM: Virtual VMLOAD VMSAVE supported
[   15.226641] SVM: Virtual GIF supported
[   15.226642] SVM: LBR virtualization supported
[   15.258979] snd_hda_codec_generic hdaudioC0D0: autoconfig for Generic: line_outs=1 (0x3/0x0/0x0/0x0/0x0) type:line
[   15.258986] snd_hda_codec_generic hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.258988] snd_hda_codec_generic hdaudioC0D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.258990] snd_hda_codec_generic hdaudioC0D0:    mono: mono_out=0x0
[   15.258991] snd_hda_codec_generic hdaudioC0D0:    inputs:
[   15.258993] snd_hda_codec_generic hdaudioC0D0:      Line=0x5
[   15.608305] EXT4-fs (vda1): mounting ext2 file system using the ext4 subsystem
[   15.612566] EXT4-fs (vda1): mounted filesystem without journal. Quota mode: none.
[   15.747077] RPC: Registered named UNIX socket transport module.
[   15.747082] RPC: Registered udp transport module.
[   15.747083] RPC: Registered tcp transport module.
[   15.747084] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   15.975549] NET: Registered PF_QIPCRTR protocol family
[   45.978003] systemd-journald[485]: Time jumped backwards, rotating.
[  695.033552] usb-storage 1-3:1.0: USB Mass Storage device detected
[  695.034016] usbcore: registered new interface driver usb-storage
[  695.041748] usbcore: registered new interface driver uas
[  699.893766] scsi 6:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
[  699.894206] scsi 6:0:0:0: Attached scsi generic sg1 type 0
[  699.961903] sd 6:0:0:0: [sda] 30277632 512-byte logical blocks: (15.5 GB/14.4 GiB)
[  699.964059] sd 6:0:0:0: [sda] Write Protect is off
[  699.964066] sd 6:0:0:0: [sda] Mode Sense: 23 00 00 00
[  699.965971] sd 6:0:0:0: [sda] No Caching mode page found
[  699.965978] sd 6:0:0:0: [sda] Assuming drive cache: write through
[  699.979427]  sda: sda1
[  699.979673] sd 6:0:0:0: [sda] Attached SCSI removable disk


Re: Booting KVM Guest breaks internet

Reply #1
what's the output of:

sudo virsh net-list
sudo virsh net-dumpxml  <name-from-previous-output>

artist

Re: Booting KVM Guest breaks internet

Reply #2
what's the output of:

sudo virsh net-list
sudo virsh net-dumpxml  <name-from-previous-output>

artist

Code: [Select]
Virsh net-list
 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes


Code: [Select]
<network>
  <name>default</name>
  <uuid>1fe90f13-225a-4fc1-a6c5-2a6bffeff8a7</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:6d:9d:60'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

Re: Booting KVM Guest breaks internet

Reply #3
What is the output of:

lspci | grep -i wi

sudo virsh dumpxml <vm-name> | grep -A5 -i "type='pci' managed='yes'"

artist

Re: Booting KVM Guest breaks internet

Reply #4
What is the output of:

lspci | grep -i wi

sudo virsh dumpxml <vm-name> | grep -A5 -i "type='pci' managed='yes'"

artist

Code: [Select]
lspci | grep -i wi
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter

After
Code: [Select]
virsh list --all
for VM name the output was empty for
Code: [Select]
sudo virsh dumpxml <vm-name> | grep -A5 -i "type='pci' managed='yes'"
. Can I get it another way for example using virt-manager

Re: Booting KVM Guest breaks internet

Reply #5
Running virsh list --all without sudo only works if this was set up.
You  can also get the vm-name from within the virtual machine manager.
Or copy the complete xml from the Overview tab and paste it on eg. pastebin

artist



Re: Booting KVM Guest breaks internet

Reply #6
I get strange virsh responses after booting guests (first try)
- After booting a guest the "virsh list --all"  outputs an ID run state of 2 (idle) or 3 paused (Fully booted guest).
- The "virsh net-list" state of default is remains inactive on a running guest

Strange responses after booting guest (second try)
- "virsh list --all"  outputs a correct ID run state of 1
- b]virsh net-list[/b]" state of default remains inactive on a running guest


-------update/edit-------
By restarting libvirtd and booting to guest I managed to solve both issues
- ID runstate = 1
- state of the default is active

I only get shortlived internet (after a few minutes internet breaks for both host and guest )



Re: Booting KVM Guest breaks internet

Reply #7
Running virsh list --all without sudo only works if this was set up.
You  can also get the vm-name from within the virtual machine manager.
Or copy the complete xml from the Overview tab and paste it on eg. pastebin

artist
Excuse me, I had already found VM-name. With correct VM-name the response was null (nothing)
From virt-manager-->details-->Overview-->XML I copied the guest xml as below
Code: [Select]
<domain type="kvm">
  <name>linux2022-tonb</name>
  <uuid>432a48f1-c086-4479-a309-1ecf8bb5f47d</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://libosinfo.org/linux/2022"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">3145728</memory>
  <currentMemory unit="KiB">3145728</currentMemory>
  <vcpu placement="static">6</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-7.2">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" discard="unmap"/>
      <source file="/var/lib/libvirt/images/linux2022-clone1.qcow2"/>
      <target dev="vda" bus="virtio"/>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <target dev="sda" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:a6:98:69"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="unix">
      <target type="virtio" name="org.qemu.guest_agent.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="2"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="virtio" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </memballoon>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </rng>
  </devices>
</domain>

Re: Booting KVM Guest breaks internet

Reply #8
I must admit that all 4 guests exibit this issue of
Code: [Select]
From <IP> Destination host unreachable

Re: Booting KVM Guest breaks internet

Reply #9
This seems weird to me:
0.0.0.0 dev vnet1 scope link
default dev vnet1 scope link

vnet1 will show as a device on the host when the guest is booted, but for nat should not become the default device.
It could be that Network Manager is creating this problem, so I'd suggest to disable it.

artist

Re: Booting KVM Guest breaks internet

Reply #10
This seems weird to me:
0.0.0.0 dev vnet1 scope link
default dev vnet1 scope link

vnet1 will show as a device on the host when the guest is booted, but for nat should not become the default device.
It could be that Network Manager is creating this problem, so I'd suggest to disable it.

artist

I downed (the service of) NetworkManager. As you predicted (and I would ask you to elaborate how you came to the conclusion) NetworkManager was the conflicting asset.

Code: [Select]
$ ip route show
0.0.0.0 dev vnet0 scope link
default via 192.168.56.74 dev wlan0
169.254.0.0/16 dev vnet0 proto kernel scope link src 169.254.112.47
192.168.56.0/24 dev wlan0 proto kernel scope link src 192.168.56.134
192.168.56.74 dev wlan0 scope link
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

Again for educational purposes I would ask to elaborate how you came to a conclusion

Second, Disabling NetworkManager is only half the answer, not the solution, since I intent to keep using NetworkManager. How would I continue the troubleshoot?

Re: Booting KVM Guest breaks internet

Reply #11
You only have to search on this forum and you'll see how often Networkmanager causes problems.
Connman seems to have less reported problems but I suspect that may simply be because it's used less ?

Unless this is a portable device you a likely connected to the same SSID all the time ? In which case it is possible to set a wifi connection up manually. And also set up a bridge manually. And still have the process automated.

If you search "NetworkManager kvm breaks internet" there's a lot of what look like relevant pages to digest.
"NetworkManager sucks" also throws up some interesting reading!

Re: Booting KVM Guest breaks internet

Reply #12
You only have to search on this forum and you'll see how often Networkmanager causes problems.
Connman seems to have less reported problems but I suspect that may simply be because it's used less ?

Unless this is a portable device you a likely connected to the same SSID all the time ? In which case it is possible to set a wifi connection up manually. And also set up a bridge manually. And still have the process automated.

If you search "NetworkManager kvm breaks internet" there's a lot of what look like relevant pages to digest.
"NetworkManager sucks" also throws up some interesting reading!

I will continue to try and test above mentioned solution for a while and report back if the issue continues. At least it appears NetworkManager was the culprit and internet works for now

So the preferred tool is Connman above NetworkManager? Or any other besides NetworkManager is fine?


Re: Booting KVM Guest breaks internet

Reply #13
So the preferred tool is Connman above NetworkManager?
I don't believe I said that ?
My preferred tool is none of them.

I have suffered issues with QEMU/KVM networking using the default 'NAT' setting in the past. This was without networkmanger.
The way I do it now is on the host I create a bridge interface br0. Then all my virtual machines use that.
Code: [Select]
<interface type="bridge">
  <mac address="52:54:00:2e:aa:13"/>
  <source bridge="br0"/>
  <model type="virtio"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

https://wiki.archlinux.org/title/Network_bridge#Creating_a_bridge
Read the whole page (bearing in mind a small portion is systemd only)

Maybe creating your own bridge interface will solve your problem and play nicely with NM.
Maybe not but it's worth a try imho.


 

Re: Booting KVM Guest breaks internet

Reply #14
So the preferred tool is Connman above NetworkManager?
I don't believe I said that ?
My preferred tool is none of them.

I have suffered issues with QEMU/KVM networking using the default 'NAT' setting in the past. This was without networkmanger.
The way I do it now is on the host I create a bridge interface br0. Then all my virtual machines use that.
Code: [Select]
<interface type="bridge">
  <mac address="52:54:00:2e:aa:13"/>
  <source bridge="br0"/>
  <model type="virtio"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

https://wiki.archlinux.org/title/Network_bridge#Creating_a_bridge
Read the whole page (bearing in mind a small portion is systemd only)

Maybe creating your own bridge interface will solve your problem and play nicely with NM.
Maybe not but it's worth a try imho.

I am in the process of creating a bridge, though I get an error with a wireless interface:
Code: [Select]
$ sudo ip link set wlan0 master br0
Error: Device does not allow enslaving to a bridge.

I found the following solution for wireless interface on a bridge: https://wiki.archlinux.org/title/Network_bridge#Wireless_interface_on_a_bridge. That gives me two options which method should I select:
- https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC or;
- hostapd: https://wiki.archlinux.org/title/Software_access_point

Option one requires ebtables. I have iptables-nft already in use and having both installed might conflict. Also the tutorial steps refer to /etc/network/interfaces (where is the artix equivalent of this debian based directory??).

Alternatively, instead of a bridge I found tutorials for using macvtap??