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

Unable to create tap device tap_Eme: Invalid argument when trying to use a tap device by unprivileged VM

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

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • rhel-10.1
    • libvirt / Networking
    • None
    • No
    • None
    • rhel-virt-core-libvirt-2
    • None
    • False
    • False
    • Hide

      None

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

      I am not sure whether it is a bug of virtualization components or test scripts. Need more debugging.

      Version: 

      libvirt-11.5.0-4.el10.x86_64
      qemu-kvm-10.0.0-14.el10_1.x86_64
      iproute-6.14.0-2.el10.x86_64
      avocado-vt 109.0-275-gc879ec96a
      avocado 103.0
      tp-libvirt 983f459daa

       

      Blocked cases:

      • virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.rom_not_enabled.vhost_multi_queue.e1000.non_root_user
      • virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.default_rom.vhost_multi_queue.e1000.non_root_user
         

      Automation reproducing:

      JOB ID     : ae032041b92c9f25285beeea17abee12d97ffdba                                                                                                       
      JOB LOG    : /var/log/avocado/job-results/job-2025-09-26T04.57-ae03204/job.log                                                                              
       (1/1) type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.rom_not_
      enabled.vhost_multi_queue.e1000.non_root_user: STARTED                                                                                                      
       (1/1) type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.rom_not_
      enabled.vhost_multi_queue.e1000.non_root_user:  FAIL: error: Failed to start domain 'unpr-vm'\nerror: Unable to create tap device tap_Eme: Invalid argument\
      n (80.00 s)                                                                                                                                                 
      RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0                                                                           
      JOB HTML   : /var/log/avocado/job-results/job-2025-09-26T04.57-ae03204/results.html                                                                         
      JOB TIME   : 81.57 s                                                                                                                                        
                                                                                                                                                                  
      Test summary:                                                                                                                                               
      1-type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.rom_not_enabl
      ed.vhost_multi_queue.e1000.non_root_user: FAIL                                                                                                              
      No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the e
      quivalent for your distro.                                                                                                                                  
      No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your 
      distro.                                                                                                                                                     
      No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the e
      quivalent for your distro.                                                                                                                                  
      No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your 
      distro.                                                                       
      JOB ID     : 93eecf547f81c50f1866aca19e82d419f60e2579
      JOB LOG    : /var/log/avocado/job-results/job-2025-09-26T04.58-93eecf5/job.log                         
       (1/1) type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.default_
      rom.vhost_multi_queue.e1000.non_root_user: STARTED                      
       (1/1) type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.positive_test.tap.one_iface.no_mtu.default_
      rom.vhost_multi_queue.e1000.non_root_user:  FAIL: error: Failed to start domain 'unpr-vm'\nerror: Unable to create tap device tap_xPW: Invalid argument\n (7
      9.49 s)                                                                                                                                                     
      RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0                                                                           
      JOB HTML   : /var/log/avocado/job-results/job-2025-09-26T04.58-93eecf5/results.html                                                                        
      JOB TIME   : 81.05 s 

       

       

      Manual reproducing:

      1. Prepare the tap device:

       

      INF=eno8303
      ip link add name br_Eme type bridge; ip link set $INF up; ip link set $INF master br_Eme; ip link set br_Eme up; pkill dhclient; sleep 6; dhclient br_Eme; ifconfig $INF 0
      ip tuntap add mode tap user test group test name tap_Eme multi_queue;ip link set tap_Eme up;ip link set tap_Eme master br_Eme

       

      2. Prepare a unprivileged VM(user test) with the XML:

      Check the interface:

      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 proto kernel_lo 
             valid_lft forever preferred_lft forever
      2: eno8303: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br_Eme state UP group default qlen 1000
          link/ether c4:cb:e1:d1:be:f4 brd ff:ff:ff:ff:ff:ff
          altname enp4s0f0
          altname enxc4cbe1d1bef4
          inet6 2620:52:0:4884:c6cb:e1ff:fed1:bef4/64 scope global dynamic noprefixroute 
             valid_lft 2591586sec preferred_lft 604386sec
          inet6 fe80::c6cb:e1ff:fed1:bef4/64 scope link noprefixroute 
             valid_lft forever preferred_lft forever
      3: eno8403: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether c4:cb:e1:d1:be:f5 brd ff:ff:ff:ff:ff:ff
          altname enp4s0f1
          altname enxc4cbe1d1bef5
      1044: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb state DOWN group default qlen 1000
          link/ether 52:54:00:ae:6b:13 brd ff:ff:ff:ff:ff:ff
          inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
             valid_lft forever preferred_lft forever
      1110: br_Eme: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
          link/ether c4:cb:e1:d1:be:f4 brd ff:ff:ff:ff:ff:ff
          inet 10.72.132.76/22 brd 10.72.135.255 scope global dynamic br_Eme
             valid_lft 86167sec preferred_lft 86167sec
          inet6 fe80::c6cb:e1ff:fed1:bef4/64 scope link proto kernel_ll 
             valid_lft forever preferred_lft forever
      1111: tap_Eme: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br_Eme state DOWN group default qlen 1000
          link/ether d6:b9:32:e5:9c:dd brd ff:ff:ff:ff:ff:ff

      Use the tap_Eme  for the VM

       

      <interface type="ethernet">
            <mac address="52:54:00:41:fe:77"/>
            <target dev="tap_Eme" managed="no"/>
            <model type="e1000"/>
            <rom enabled="no"/>
            <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
          </interface>

      At the user test, create the domain:

      [test@dell-per750-68 ~]$ virsh create /tmp/test.xml 
      error: Failed to create domain from /tmp/test.xml
      error: Unable to create tap device tap_Eme: Invalid argument

      Cleanup:

      INF=eno8303
      ip l del tap_Eme
      ip link set $INF nomaster; ip link delete br_Eme; pkill dhclient; sleep 5; dhclient $INF
      
      
      

      Attachment: text.xml --> the XML for the VM

       

              Unassigned Unassigned
              rhn-support-hhan Han Han
              Yiqian Wei Yiqian Wei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: