[libvirt] [PATCH 0/2] virsh: Properly handle detach-interface --live --config.

Nitesh Konkar niteshkonkar.libvirt at gmail.com
Thu Apr 28 09:11:41 UTC 2016


The virsh attach/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 | 107 +++++++++++++++++++++++++++++++--------------------
 1 file changed, 65 insertions(+), 42 deletions(-)

-- 
1.8.3.1




More information about the libvir-list mailing list