Bug 589859 - The NIC card hot plugged to guest is in the incorrect VLAN
The NIC card hot plugged to guest is in the incorrect VLAN
Status: CLOSED DUPLICATE of bug 599460
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Michael S. Tsirkin
Virtualization Bugs
:
Depends On: 599460
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-07 02:21 EDT by Qunfang Zhang
Modified: 2013-01-09 17:32 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-09 01:00:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mst: needinfo+


Attachments (Terms of Use)

  None (edit)
Description Qunfang Zhang 2010-05-07 02:21:21 EDT
Description of problem:
Hot plug a NIC card to a guest,using vlan=1, but issue "info network" in qemu monitor, it tells me the NIC card is in VLAN 0 devices instead of VLAN1.And also
the macaddr and nic model are wrong.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.48.el6.x86_64
kernel-2.6.32-23.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Boot a guest with one NIC card.
/usr/libexec/qemu-kvm -m 2G -smp 2 -rtc-td-hack -usbdevice tablet -no-kvm-pit-reinjection -drive file=RHEL-Server-5.5-64.qcow2,media=disk,if=ide,cache=off,werror=stop,rerror=stop -net nic,vlan=0,macaddr=00:1a:4e:9f:0b:6a,model=rtl8139 -net tap,vlan=0,ifname=rtl8139_1,script=/etc/qemu-ifup -monitor stdio -boot c -cpu qemu64,+sse2 -uuid df01eb05-59fc-4e4a-8998-e935a78d4556 -startdate now -balloon none -name rhel5.5 -vnc :10

2.(qemu)info network
VLAN 0 devices:
  tap.0: ifname=rtl8139_1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
  rtl8139.0: model=rtl8139,macaddr=00:1a:4e:9f:0b:6a
Devices not on any VLAN:

3.#modprobe acpiphp (inside guest)

4.(qemu)pci_add pci_addr=auto nic vlan=1,macaddr=00:1a:4e:9f:0b:6b,model=rtl8139

5.(qemu)pci_add pci_addr=auto nic vlan=2,macaddr=00:1a:4e:9f:0b:6c,model=e1000

6.(qemu)info network
VLAN 0 devices:
  tap.0: ifname=rtl8139_1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
  rtl8139.0: model=rtl8139,macaddr=00:1a:4e:9f:0b:6a
  rtl8139.1: model=rtl8139,macaddr=00:1a:4e:9f:0b:6a
  rtl8139.2: model=rtl8139,macaddr=00:1a:4e:9f:0b:6a
Devices not on any VLAN:
  
Actual results:
As step 6

Expected results:
The two NIC cards I hot plug should be in the VLAN 1 and VLAN 2 with the correct macaddr and nic model(rtl8139 and e1000)


Additional info:
Comment 2 RHEL Product and Program Management 2010-05-07 03:56:07 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Qunfang Zhang 2010-05-10 02:49:10 EDT
And also after hot plug another or more NIC, they have same macaddr,nic model, so the guest has more same IP addresses.
Comment 4 Markus Armbruster 2010-06-07 11:48:57 EDT
Does the problem exist with device_add instead of pci_add as well?  To test,
try something like "-device rtl8139,vlan=1,macaddr=00:1a:4e:9f:0b:6b".
Comment 5 Markus Armbruster 2010-06-07 11:56:20 EDT
Something like "device_add..." of course.
Comment 6 Amit Shah 2010-06-09 01:00:25 EDT

*** This bug has been marked as a duplicate of bug 599460 ***

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