[libvirt] [BUG] When PLUG a bridge interface to an active VM, the generated LIVE and CONFIG mac address are different

Ján Tomko jtomko at redhat.com
Tue Aug 27 12:44:55 UTC 2019


On Tue, Aug 27, 2019 at 02:13:28PM +0200, Michal Privoznik wrote:
>On 8/22/19 10:43 AM, Xu Yandong (Yandong Xu) wrote:
>>Hi,
>>
>>When plug a bridge interface to an active VM with both LIVE AND CONFIG flags,
>>libvirt generate different mac address to LIVE and CONFIG instance, so After
>>I reboot the VM, DHCP server doesn't assign the same IP address to the new
>>bridge interface.
>>
>
>This is kind of expected. In general, live and inactive XMLs can be 
>significantly different. 

Well, if the live and inactive XMLs have sufficiently diverged, then
I don't see the point of calling AttachDevice with both AFFECT_LIVE and
AFFECT_CONFIG - you might as well use two different API calls.

However for a guest with the definitions in sync, quietly accepting a
both flags while attaching a device with different MAC addresses (so
essentially two different devices) feels wrong.

>And I guess it's out of libvirt's scope to 
>try and autofill missing data in such way that fits both libe and 
>inactive XMLs. For instance, a PCI address can be taken/free in live 
>XML because of hotplug/hotunplug but that might not be the case for 
>inactive XML. Should libvirt try and find a slot that suits both XMLs?
>

That possibly might be out of scope, but autofilling the mac address as
early as virDomainNetDefParseXML also is not ideal.

Jano

>Michal
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190827/936044dc/attachment-0001.sig>


More information about the libvir-list mailing list