Predictable and consistent net interface naming in guests

Edward Haas edwardh at
Mon Oct 31 18:21:51 UTC 2022

On Mon, Oct 31, 2022 at 6:55 PM Andrea Bolognani <abologna at>

> On Mon, Oct 31, 2022 at 04:32:27PM +0200, Edward Haas wrote:
> > That discussion mentioned that a guest PCI address may change in two
> cases:
> > - The PCI topology changes.
> > - The machine type changes.
> >
> > Usually, the machine type is not expected to change, especially if one
> > wants to allow migrations between nodes.
> > I would hope to argue this should not be problematic in practice, because
> > guest images would be made per a specific machine type.
> The machine type might not change from q35 to i440fx and vice versa,
> but since the domain XML is constructed every time a KubeVirt VM is
> started, the machine type might be q35-6.0 on one boot and q35-7.0
> the next one if a KubeVirt upgrade that comes with a new version of
> QEMU has happened in between.
> This is unlikely to make a difference in terms of PCI addresses seen
> in the guest OS, but it's still not accurate to say that the machine
> type will not change.

Thank you for the clarification.
It makes me wonder now what are the actual implications of
the machine type change.

> Live migration is a separate matter, as the machine type will
> definitely not change while the VM is running.
> > Regarding the PCI topology, I am not sure I understand what changes
> > need to occur to the domxml for a defined guest PCI address to change.
> > The only think that I can think of is a scenario where hotplug/unplug is
> > used,
> > but even then I would expect existing devices to preserve their PCI
> address
> > and the plug/unplug device to have a reserved address managed by the one
> > acting on it (the management system).
> >
> > Could you please help clarify in which scenarios the PCI topology can
> cause
> > a mess to the naming of interfaces in the guest?
> A change in libvirt (again, due to a KubeVirt upgrade in between two
> boots of the same VM) might result in different PCI addresses being
> assigned to devices despite the same input XML.
> We generally try fairly hard to avoid this kind of situation, but we
> can only really guarantee stable PCI addresses for the lifetime of a
> VM that has been defined and can't promise that the same input XML
> will result in the same guest ABI when using different versions of
> libvirt.

I would expect the PCI addresses that have been explicitly set in the
domxml [2] to be honored. We cannot assume that?
I mainly referred to that input option, not to the expectation that the
configuration (of the domxml) to be identical between different versions.


> --
> Andrea Bolognani / Red Hat / Virtualization
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the libvirt-users mailing list