Test with kvm-83-204.el5, libvirt-0.8.2-6.el5.
The network interface can be successfully hotplugged on qemu command.
(qemu) pci_add pci_addr=auto nic vlan=1,macaddr=52:54:00:80:d9:c5,model=virtio host_net_add tap script=/etc/qemu-ifup,vlan=1
OK domain 0, bus 0, slot 7, function 0
(qemu) info pci
...
Bus 0, device 7, function 0:
Ethernet controller: PCI device 8086:100e
IRQ 0.
BAR0: 32 bit memory at 0x80000000 [0x8001ffff].
BAR1: I/O at 0x1040 [0x107f].
...
test with
kvm-83-229.el5
libvirt-0.8.2-18.el5
kernel-2.6.18-252.el5
Hotplug the NIC to guest.
# virsh attach-device <guest name> <xml file name>
It will display
error: Failed to attach device from nic.xml
error: this function is not supported by the connection driver: installed qemu version does not support host_net_add
Test with kvm-83-204.el5, libvirt-0.8.2-6.el5. The network interface can be successfully hotplugged on qemu command. (qemu) pci_add pci_addr=auto nic vlan=1,macaddr=52:54:00:80:d9:c5,model=virtio host_net_add tap script=/etc/qemu-ifup,vlan=1 OK domain 0, bus 0, slot 7, function 0 (qemu) info pci ... Bus 0, device 7, function 0: Ethernet controller: PCI device 8086:100e IRQ 0. BAR0: 32 bit memory at 0x80000000 [0x8001ffff]. BAR1: I/O at 0x1040 [0x107f]. ...