[libvirt-users] sttic vnet device for guest

Vincent Bernat bernat at luffy.cx
Sun Oct 30 16:11:41 UTC 2016

 ❦ 28 octobre 2016 14:32 -0700, Michal Privoznik <mprivozn at redhat.com> :

> vnet* devices are created by libvirt when a domain is being started (or
> on device hotplug). In general, unless all devices would be statically
> allocated, it would be impossible to guarantee certain vnet name.
> However, what you can do is to create the device yourself and then just
> tell libvirt to use it:
>     <interface type='bridge'>
>       <source bridge='vnetX'/>
>     </interface>

I think that libvirt will just dismiss the interface because of its
prefix and creates another one itself. It would work with another prefix.
Make sure your code "does nothing" gracefully.
            - The Elements of Programming Style (Kernighan & Plauger)

More information about the libvirt-users mailing list