RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 732609 - Cannot hot plug-in macvtap device to guest
Summary: Cannot hot plug-in macvtap device to guest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michael S. Tsirkin
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-23 05:36 UTC by Xiaoqing Wei
Modified: 2013-01-10 00:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-12 12:35:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaoqing Wei 2011-08-23 05:36:37 UTC
Description of problem:

Cannot hot plug-in  macvtap device to guest
Version-Release number of selected component (if applicable):

qemu-kvm-0.12.1.2-2.184.el6.x86_64
How reproducible:
always

Steps to Reproduce:
1.boot a guest 
2.hot plug a macvtap based nic by
netdev_add tap,id=xwei,fd=5 5<>/dev/tap5
3.
  
Actual results:
qemu-kvm will raise error from monitor 

(qemu) netdev_add tap,id=xwei,vhost=on,fd=14 14<>/dev/tap14
netdev_add: extraneous characters at the end of line

if drop the last part:
(qemu) netdev_add tap,id=xwei,vhost=on,fd=14 
TUNGETIFF ioctl() failed: Invalid argument
TUNSETOFFLOAD ioctl() failed: Bad address

Expected results:
qemu-kvm should able to hot plug a macvtap based nic

Additional info:

if boot a guest by :
with macvtap based nic:
qemu-kvm ..... -netdev tap,id=xwei,vhost=on,fd=5 5<>/dev/tap5 \
-device virtio-net-pci,netdev=xwei,mac=xxxxx   \
\
6<>/dev/tap6 ...

and then hot plug a macvtap based nic with above steps
works fine.

Comment 2 Xiaoqing Wei 2011-08-23 09:47:42 UTC
(In reply to comment #0)

> and then hot plug a macvtap based nic with above steps
> works fine.

Sorry for potential unclear,I mean:

  1) if boot a guest with two ioctl attached but only use one by:
qemu-kvm ... \
\
5<>/dev/tap5    \      
\
6<>/dev/tap6   \
\
-netdev tap,id=cold-plug,vhost=on,fd=5 \
\
-device virtio-net-pci,netdev=code-plug,mac=xxxxx  
 

  2) then the guest boots,after guest up, do hot plug by:

(qemu)netdev_add tap,id=hot-plug,vhost=on,fd=6 
(qemu)device_add virtio-net-pci,netdev=hot-plug,mac=xxxx

in this way of hot plug, qemu does not error and inside guest, hot plugged nic can got a ip from dhcp.


  3) Just my opinion , this may caused by the qemu monitor doesn't accept and parse the " 14<>/dev/tap14 " as a option, here it treat " 14<>/dev/tap14 " as a bunch of mistype. same error when attached anything at the end of netdev_add cmd:


(qemu) netdev_add tap,id=hot1,vhost=on,fd=17 17<>/dev/tap17
netdev_add: extraneous characters at the end of line
(qemu) netdev_add tap,id=hot1,vhost=on,fd=17 alsfa
netdev_add: extraneous characters at the end of line


Note You need to log in before you can comment on or make changes to this bug.