The virsh attach virsh detach interface command fails
when both live and config are set and when the interface
gets attached to different pci slots on live and config
xml respectively.
When we attach an interface with both --live and --config,
the first time they get the same PCI slots, but the second time
onwards it differs and hence the virsh detach-interface --live
--config command fails. This patch makes sure that when both
--live --config are set , qemuDomainDetachDeviceFlags is called
twice, once with config xml and once with live xml.
Steps to see the issue:
virsh attach-interface --domain DomainName --type network --source default --mac
52:54:00:4b:76:5f --live --config
virsh detach-interface --domain DomainName --type network --mac 52:54:00:4b:76:5f --live
--config
virsh attach-interface --domain DomainName --type network --source default --mac
52:54:00:4b:76:5f --live --config
virsh detach-interface --domain DomainName --type network --mac 52:54:00:4b:76:5f --live
--config
Nitesh Konkar (2):
virsh: Introduce virshDomainDetachInterface function
virsh: Pass the corect live/config xml to virshDomainDetachInterface.
tools/virsh-domain.c | 114 +++++++++++++++++++++++++++++++--------------------
1 file changed, 69 insertions(+), 45 deletions(-)
--
1.8.3.1