Description of problem: when I attach network device then detach it and then attach it again virtual guest goes down with this message in /var/log/libvirt/qemu/$guest.log: char device redirected to /dev/pts/0 qemu: Unsupported NIC model: �c�� qemu: Supported NIC models: ne2k_pci,i82551,i82557b,i82559er,rtl8139,e1000,pcnet,virtio Version-Release number of selected component (if applicable): qemu-kvm-0.10.92-4.fc12.x86_64 qemu-common-0.10.92-4.fc12.x86_64 qemu-system-x86-0.10.92-4.fc12.x86_64 qemu-kvm-tools-0.10.92-4.fc12.x86_64 qemu-img-0.10.92-4.fc12.x86_64 libvirt-0.7.1-4.fc12.x86_64 virt-viewer-0.2.0-1.fc12.x86_64 libvirt-client-0.7.1-4.fc12.x86_64 virt-manager-0.8.0-3.fc12.noarch virt-top-1.0.3-5.fc12.x86_64 python-virtinst-0.500.0-2.fc12.noarch libvirt-python-0.7.1-4.fc12.x86_64 virt-mem-0.3.1-9.fc12.x86_64 kernel-2.6.31-14.fc12.x86_64 How reproducible: Steps to Reproduce: 1.install virt guest and delete all NIC devices 2.power on guest 3.attach new NIC (NAT type) 4.detach that NIC again 5.attach that NIC again Actual results: guest is stopped with this question: Are you sure you want to add this device? This device could not be attached to the running machine. Would you like to make the device available after the next VM shutdown? Warning: this will overwrite any other changes that require a VM reboot. Expected results: guest still running and NIC attached again Additional info:
Created attachment 361520 [details] virt-manager.log
This looks like two issues with qemu: 1) When not passed a model and you do pci_add/pci_del/pci_add with no model= parameter, it seems to get the parameters confused 2) It exits when you pass an invalid model= via pci_add rather than just printing an error
This is a trivial use-after-free bug. I've just sent a patch upstream
Patch is here: http://lists.gnu.org/archive/html/qemu-devel/2009-09/msg01196.html Still need to fix (2), though
Patch applied in rawhide now, thanks * Wed Sep 23 2009 Mark McLoughlin <markmc> - 2:0.10.92-5 - Fix issue causing NIC hotplug confusion when no model is specified (#524022) Leaving it open to fix the other issue
Should be fixed in rawhide now thanks to a cherry-pick from Markus's series here: http://lists.gnu.org/archive/html/qemu-devel/2009-09/threads.html#01585 * Mon Sep 28 2009 Mark McLoughlin <markmc> - 2:0.11.0-2 - Fix pci hotplug to not exit if supplied an invalid NIC model (#524022)