[libvirt] [PATCH 0/3] device-detaching with generated mac

Hu Tao hutao at cn.fujitsu.com
Fri Feb 25 07:24:01 UTC 2011


On Thu, Feb 24, 2011 at 03:56:12PM +0100, Michal Privoznik wrote:
> When detaching interface via detach-device or virDomainDetachDevice() we
> parse input XML and (probably) generate a random MAC. This leads then into

It's apparently not reasonable to generate random MACs for NICs to be
detached. A better way to fix the problem is to check wheter enough
information is gathered from xml file to uniquely identify the NICs
to be detached, if not, fail and give user a hint. For NICs, the
information could be mac address or pci address.

> not finding interface and thus error. When a mac wasn't specified and domain
> has exactly one interface, semantic is clear. Otherwise we require <mac> in
> input XML.
> 
> Michal Privoznik (3):
>   Introduce flag representing if MAC address of interface was generated
>         or not.
>   qemu: Check for generated MACs while detaching interface
>   xen: Check for generated MACs while detaching interface
> 
>  src/conf/domain_conf.c  |    2 ++
>  src/conf/domain_conf.h  |    1 +
>  src/qemu/qemu_hotplug.c |   26 ++++++++++++++++++++------
>  src/xen/xm_internal.c   |    3 ++-
>  4 files changed, 25 insertions(+), 7 deletions(-)
> 
> -- 
> 1.7.4
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

-- 
Thanks,
Hu Tao




More information about the libvir-list mailing list