[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 4/5] qemu: Allow network device-detach by PCI address and/or MAC



On Thu, Mar 17, 2011 at 03:38:48PM +0100, Michal Privoznik wrote:
> Until now, users could detach interface by MAC address, which is not
> sufficient in cases when MAC is not unique. Therefore we need to
> support detaching via PCI address as well. Or in case when domain has
> exactly one interface users does not need to specify any MAC/PCI
> address at all.
> ---
>  src/qemu/qemu_driver.c  |    3 ++-
>  src/qemu/qemu_hotplug.c |   46 ++++++++++++++++++++++++++++++++++------------
>  2 files changed, 36 insertions(+), 13 deletions(-)

The semantics of the virDomainDetachDevice method are that you should
pass the complete XML for the device, as obtained from the current
domain XML dump. So as far as virDomainDetachDevice is concerned
all XML passed in should have the MAC address already.

The problem is really with the way virsh is calling this. It should
really be querying the XML of the guest & then extracting the device
it wants to detach & passing that data as is, rather than manually
building up XML.

So IMHO this patch is really not addressing the real problem. Just
hacking around it in one hypervisor driver, is not solving it for
all the other drivers, so NACK for now.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]