Bug 969956
Summary: | should fail to use the qemu default allocated mac address to hotplug new nic | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Sibiao Luo <sluo> | |
Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> | |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 6.5 | CC: | acathrow, akong, bsarathy, chayang, dyasny, juzhang, michen, mkenneth, qzhang, shuang, stefanha, virt-maint, xfu, xwei | |
Target Milestone: | rc | Keywords: | Upstream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 969983 (view as bug list) | Environment: | ||
Last Closed: | 2013-06-12 12:58:42 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 969983 |
Description
Sibiao Luo
2013-06-03 07:31:51 UTC
My qemu-kvm command line. # /usr/libexec/qemu-kvm -cpu host -M rhel6.5.0 -enable-kvm -S -m 4G -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name virtio-nic-test -uuid a5fd4bfe-ccbf-403d-9a26-41b1b3843729 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x4 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,scsi=off,bus=pci.0,addr=0x5,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-hd,drive=drive-data-disk,id=data-disk,bus=scsi0.0,bootindex=3 -boot menu=on -k en-us -spice port=5931,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -monitor stdio If do not specify the mac to do hot-plug, it will allocate a different mac addr automatically. # /usr/libexec/qemu-kvm -vnc :2 -monitor stdio (qemu) info network VLAN 0 devices: user.0: net=10.0.2.0, restricted=n rtl8139.0: model=rtl8139,macaddr=52:54:00:12:34:56 Devices not on any VLAN: (qemu) netdev_add tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup (qemu) device_add virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,bus=pci.0 (qemu) info network VLAN 0 devices: user.0: net=10.0.2.0, restricted=n rtl8139.0: model=rtl8139,macaddr=52:54:00:12:34:56 Devices not on any VLAN: hostnet0: ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown peer=virtio-net-pci0 virtio-net-pci0: model=virtio-net-pci,macaddr=52:54:00:12:34:57 peer=hostnet0 (qemu) In bz 712046, we fixed a same issue, so it's a new regression. (In reply to Amos Kong from comment #3) > In bz 712046, we fixed a same issue, so it's a new regression. Test bz 712046 pass, please check comment 2. This bug steps are a little different with bz 712046. I don't think your example is a bug. QEMU should allow you to assign an existed macaddr to new nic. At least, we can change the macaddr in guest to make it repeated with other. When you voluntarily assign a macaddr to the new nic, we assume you clearly know what you are doing. If you need qemu can provide a warning "mac already used by other nic", but not return an error. ---- But there existed a real bug ;) ---- The automatically generated macaddr by QEMU is repeated with existed macaddr. [root@t430s qemu]# qemu-upstream -netdev tap,id=h1 -device virtio-net-pci,netdev=h1,mac=52:54:00:12:34:56 -monitor stdio QEMU 1.5.50 monitor - type 'help' for more information (qemu) netdev_add tap,id=h2 (qemu) device_add virtio-net-pci,netdev=h2 (qemu) info network virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ h1: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ h2: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown (qemu) ---- Those two issues are all caused by that we don't check if macaddr is used by other nics when we set auto-generated mac Or assigned mac to nic. (In reply to Amos Kong from comment #7) > I don't think your example is a bug. > > QEMU should allow you to assign an existed macaddr to new nic. At least, we > can change the macaddr in guest to make it repeated with other. > > When you voluntarily assign a macaddr to the new nic, we assume you clearly > know what you are doing. If you need qemu can provide a warning "mac already > used by other nic", but not return an error. I agree. (In reply to Stefan Hajnoczi from comment #8) > (In reply to Amos Kong from comment #7) > > I don't think your example is a bug. > > > > QEMU should allow you to assign an existed macaddr to new nic. At least, we > > can change the macaddr in guest to make it repeated with other. > > > > When you voluntarily assign a macaddr to the new nic, we assume you clearly > > know what you are doing. If you need qemu can provide a warning "mac already > > used by other nic", but not return an error. > > I agree. I think adding the warning to HMP would be nice, but not worth a BZ, so I'm closing this one. |