host info:
3.10.0-0.rc2.57.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64
# /usr/libexec/qemu-kvm -cpu SandyBridge -M pc-i440fx-1.5 -enable-kvm -S -m 4G -smp 4,sockets=2,cores=2,threads=1...-netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=rtl8139-net-pci0,mac=08:2e:5f:0a:0d:a1,bus=pci.0,addr=0x5,bootindex=2...
(qemu) info network
rtl8139-net-pci0: index=0,type=nic,model=rtl8139,macaddr=08:2e:5f:0a:0d:a1
\ hostnet0: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
(qemu) netdev_add tap,id=hostnet1,vhost=on,script=/etc/qemu-ifup
(qemu) device_add virtio-net-pci,netdev=hostnet1,id=virtio-net-pci0,bus=pci.0,bootindex=2
Two devices with same boot index 2
/etc/qemu-ifdown: could not launch network script
/etc/qemu-ifdown: could not launch network script
Comment 2Markus Armbruster
2013-06-07 14:55:57 UTC
Root cause: add_boot_device_path() calls exit() instead of returning failure.
To fix, we need to make it return an error code, and forward it up all call chains until we reach the spot where it should be handled. I don't expect it to be hard, just t-e-d-i-o-u-s.
The boot order is passed in fw cfg and updated only once at
"machine done". There is no update of this list after this point.
Modifying the boot order from monitor does not work at all.
So in order to solve this issue we can:
1. Don't allow use of bootindex at hot-plug
2. Change the architecture so boot order changing during hot-plug will be possible
Currently discussed upstream