> > So, qemu-ga doesn't understand that there can't be more than one
> > device with same MAC addr. So, I think we are left with the following
> > options:
>
> Actually that's wrong. You *can* have 2 completely different physical
> NICs with the same MAC address.
>
> > (i) Modify qemu-guest-agent to return addresses belonging to same
> > MAC address grouped under one interface only.
>
> You would not want to group based on MAC address - you explicitly just
> want to normalize by stripping the legacy aliases suffixes.
Actually, the order in which the qemu-agent returns the value isn't always:
ethX
ethX:0
ethX:1
ethY
ethY:0
ethY:2
It can be:
ethX
ethY:2
ethX:0
ethY:0
ethX:1
ethY
which, after stripping, will just be left with:
ethX
ethY
ethX
ethY
ethX
ethY
whereas, we would want:
Hence, grouping either by the stripped down interface name or
by the MAC address will be required. So that all IP addresses
related to a single NIC are not distributed in the output.