Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-141361

Start vm failed with e1000 model ethernet interface when launched by a non-root user.

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.8
    • libvirt / Networking
    • None
    • None
    • None
    • rhel-virt-core-libvirt-2
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Start vm failed with e1000 model ethernet interface  when launched by a non-root user

      Please provide the package NVR for which the bug is seen:

       

      [root@dell-per740-18 ~]# rpm -q libvirt qemu-kvm
      libvirt-11.10.0-2.el9.x86_64
      qemu-kvm-10.1.0-10.el9.x86_64
      

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1.Create bridge and tap

      [root@dell-per740-18 ~]# tmux -c "ip link add name br_1VZ type bridge; ip link set eno1 up; ip link set eno1 master br_1VZ; ip link set br_1VZ up; pkill dhclient; sleep 6; dhclient br_1VZ; ifconfig eno1 0"
      [root@dell-per740-18 ~]# ip tuntap add mode tap user test group test name tap_1VZ multi_queue;ip link set tap_1VZ up;ip link set tap_1VZ master br_1VZ
      [root@dell-per740-18 ~]# 
      [root@dell-per740-18 ~]# 
      [root@dell-per740-18 ~]# ip a
      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
      2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br_1VZ state UP group default qlen 1000
          link/ether 20:04:0f:f3:d5:50 brd ff:ff:ff:ff:ff:ff
          altname enp24s0f0
      ......
      .......
      31: br_1VZ: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
          link/ether 20:04:0f:f3:d5:50 brd ff:ff:ff:ff:ff:ff
          inet 10.73.178.39/23 brd 10.73.179.255 scope global dynamic br_1VZ
             valid_lft 86204sec preferred_lft 86204sec
          inet6 2620:52:0:49b2:2204:fff:fef3:d550/64 scope global dynamic mngtmpaddr proto kernel_ra 
             valid_lft 2591997sec preferred_lft 604797sec
          inet6 fe80::2204:fff:fef3:d550/64 scope link proto kernel_ll 
             valid_lft forever preferred_lft forever
      32: tap_1VZ: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br_1VZ state DOWN group default qlen 1000
          link/ether 26:46:5e:73:86:20 brd ff:ff:ff:ff:ff:ff

      2.Define vm by  non root user

       

      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' define /var/tmp/xml_utils_temp_pk32cnub.xml
      Domain 'unpr-vm' defined from /var/tmp/xml_utils_temp_pk32cnub.xml
      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' dumpxml unpr-vm --xpath //interface
      <interface type="ethernet">
        <mac address="52:54:00:53:92:12"/>
        <target dev="tap_1VZ" managed="no"/>
        <model type="e1000"/>
        <rom enabled="no"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      
       

      3.Start vm

      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' start unpr-vm 
      
      

      Expected results

      Start vm successfully

      Actual results

      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' start unpr-vm 
      error: Failed to start domain 'unpr-vm'
      error: Unable to create tap device tap_1VZ: Invalid argument

       

      Note: PASS if virtio net

       

      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' dumpxml unpr-vm --xpath //interface
      <interface type="ethernet">
        <mac address="52:54:00:53:92:12"/>
        <target dev="tap_1VZ" managed="no"/>
        <model type="virtio"/>
        <driver name="vhost" queues="4"/>
        <rom enabled="no"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      [root@dell-per740-18 ~]# /usr/bin/virsh -c 'qemu+ssh://test@localhost/session' start unpr-vm 
      Domain 'unpr-vm' started
       
      

       

              virt-maint virt-maint
              nanli@redhat.com Nannan Li
              virt-maint virt-maint
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: