On Thu, Jun 30, 2016 at 09:20:04AM +0800, Huanle Han wrote:
hi, I have a question about interface hotplug. I attach and detach interface from vm for several times. I find the pci slot of interface increases in live xml while keep unchanged in config xml. Here is my test script and result: Test Script: #!/bin/bash VM=ub1504b print_xml() { echo "$* : ========inactive===========" virsh dumpxml --inactive $VM |grep -A 20 "<interface" |grep "mac\|slot" echo "$* : ======== active===========" virsh dumpxml $VM |grep -A 20 "<interface" |grep "mac\|slot" } print_xml begin_ virsh attach-device --config --live $VM if1.xml print_xml attach virsh detach-device --config --live $VM if1.xml print_xml detach Result: begin_ : ========inactive=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> begin_ : ======== active=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> Device attached successfully attach : ========inactive=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> <mac address='0c:da:11:11:11:11'/> <address type='pci' domain='0x0000' bus='0x00' slot='*0x0c*' function='0x0'/> attach : ======== active=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> <mac address='0c:da:11:11:11:11'/> <address type='pci' domain='0x0000' bus='0x00' slot='*0x0d*' function='0x0'/> Device detached successfully detach : ========inactive=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> detach : ======== active=========== <mac address='0c:da:41:1e:02:9c'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> When execute the script for more than 1 times, You can see the pci slot of attached interface in live xml differs from the one in config xml. Is this intentional or a bug ? If not a bug, why?
It definitely is a bug. Would you mind creating a new bug in our upstream bugzilla [1] with the details? Thanks a lot. Martin [1] https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users