You are not logged in.

#1 2022-02-03 10:21:40

phi_friday
Member
Registered: 2022-01-24
Posts: 7

[SOLVED]network of virtual machines created by virt-manager does not..

It's a virtual machine that was normally used in the previous environment.
For some reason, the network is not working normally.
Since I have experience in bringing up images in this way and executing them normally,
I want to know why this happened and how I can solve it.
Thank you for reading it.

my system:

OS: Arch Linux x86_64 
Host: 82FX Yoga Slim 7 Pro 14ITL5 
Kernel: 5.15.10-arch1-1 
Uptime: 11 mins 
Packages: 1060 (pacman), 13 (flatpak) 
Shell: zsh 5.8 
Resolution: 2240x1400, 2560x1080 
DE: GNOME 41.2 
WM: Mutter 
WM Theme: Orchis-red-dark 
Theme: Orchis [GTK2/3] 
Icons: Tela-circle [GTK2/3] 
Terminal: gnome-terminal 
CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz 
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
GPU: NVIDIA GeForce MX450 
Memory: 11262MiB / 15785MiB

While the virtual machine is running:

❯ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: netnatbridge: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:d9:0d:38 brd ff:ff:ff:ff:ff:ff
    inet 192.168.121.1/24 brd 192.168.121.255 scope global netnatbridge
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 40:1c:83:ce:80:38 brd ff:ff:ff:ff:ff:ff
    inet 192.168.123.57/24 metric 1024 brd 192.168.123.255 scope global dynamic noprefixroute wlan0
       valid_lft 6432sec preferred_lft 6432sec
    inet6 fe80::8297:66fd:d23b:60f0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
5: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether fe:54:00:7f:7b:d3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe7f:7bd3/64 scope link 
       valid_lft forever preferred_lft forever

sudo virsh net-edit netnat:

<network>
  <name>netnat</name>
  <uuid>d0121199-c876-46a7-a6d6-b41969172e0e</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='netnatbridge' stp='on' delay='0'/>
  <mac address='52:54:00:d9:0d:38'/>
  <ip address='192.168.121.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.121.2' end='192.168.121.254'/>
    </dhcp>
  </ip>
</network>

The xml that I used to add netnat:

<network>
    <name>netnat</name> 
    <forward mode='nat'> 
        <nat> 
            <port start='1024' end='65535'/> 
        </nat>
    </forward>
    <bridge name='netnatbridge' stp='on' delay='0'/> 
    <ip address='192.168.121.1' netmask='255.255.255.0'> 
        <dhcp> 
            <range start='192.168.121.2' end='192.168.121.254'/> 
        </dhcp> 
    </ip>    
</network>

network autostart:

❯ LANG=C sudo virsh net-list --all
 Name      State      Autostart   Persistent
----------------------------------------------
 default   inactive   no          yes
 netnat    active     yes         yes

Network xml of running virtual machine:

<interface type="network">
  <mac address="52:54:00:7f:7b:d3"/>
  <source network="netnat" portid="b5083913-824e-447d-8d99-92029866c538" bridge="netnatbridge"/>
  <target dev="vnet0"/>
  <model type="virtio"/>
  <alias name="net0"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

The modules written in /etc/mkinitcpio.conf:

MODULES=(kvmgt vfio vfio-iommu-type1 virtio-net virtio-scsi virtio-balloon)

Grub options:

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 audit=0 i8042.nopnp=1 i8042.dumbkbd=1 intel_iommu=on"

Check the module load:

❯ LC_ALL=C lscpu | grep Virtualization
Virtualization:                  VT-x
❯ lsmod | grep kvm
kvm_intel             356352  6
kvm                  1097728  1 kvm_intel
irqbypass              16384  7 kvm
❯ lsmod | grep virtio
virtio_balloon         28672  0
virtio_scsi            28672  0
virtio_net             65536  0
net_failover           24576  1 virtio_net

sudo virsh edit win10:

<domain type='kvm'>
  <name>win10</name>
  <uuid>ff6e1e48-747f-4d4d-ba9f-c92feb321457</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
  </features>
  <cpu mode='host-model' check='partial'>
    <topology sockets='1' dies='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </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'/>
      <source file='/home/phi/virtual/win10.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </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='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <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>
    <interface type='network'>
      <mac address='52:54:00:7f:7b:d3'/>
      <source network='netnat'/>
      <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='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <channel type='spiceport'>
      <source channel='org.spice-space.webdav.0'/>
      <target type='virtio' name='org.spice-space.webdav.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='qxl' ram='65536' vram='65536' vgamem='16384' 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>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Last edited by phi_friday (2022-02-03 11:33:41)

Offline

#2 2022-02-03 10:39:06

phi_friday
Member
Registered: 2022-01-24
Posts: 7

Re: [SOLVED]network of virtual machines created by virt-manager does not..

wow...
i try just reboot and wlan0 is not working...
thank you backup..

Offline

#3 2022-02-03 11:31:54

phi_friday
Member
Registered: 2022-01-24
Posts: 7

Re: [SOLVED]network of virtual machines created by virt-manager does not..

I have time, so I decided to just install it completely new. I hope it can be installed normally this time.

Offline

Board footer

Powered by FluxBB