Support for consistent/persistent network device naming #609
In the latest distros (RHEL7, Ubuntu 16.04, others?) NICs are labelled persistently and not simply eth0-x by order of nic detected.
This poses a problem because we rely on the management interface being a DHCP NIC and if a box image isn't sending out dhcp requests on the right nic, or not starting DHCP at all, we end up nowhere:
We also may have a situation where the a nic ends up named differently because libvirt attaches it to some different bus or slot (e.g. enp2s0f0 or enp1s0f0 and so on) depending on other devices in the VMs XML. This is a tricky case to handle since we need to know beforehand what the NIC is being called in order to do proper detection/configuration.
This can all be worked around by passing
So if any box image creators/mutators are reading this: use
The text was updated successfully, but these errors were encountered:
This is becoming even more of an issue now that most distributions are using systemd/udevd > v197 "Predictable Network Interface Names" ( https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ ).
It is definitely something to be solved in this module rather than requiring what could be disruptive changes to the host configuration via kernel command-line
I've just started working with vagrant + vagrant-libvirt on Ubuntu 18.04 and lost a day trying to diagnose why a basic ubuntu/bionic64 box fails to start with:
which is directly from libvirt (same error in syslog).
For many hours I thought it was due to my not getting a
At that point I realised the culprit is the 'hidden'
This needs documenting as a gotcha up-front for newcomers especially (in docs and in the generated Vagrantfile) and an attribute provided to over-ride the interface device name at a minimum.
It would be preferable to detect the host's interface. Manually that is achieved with:
I did try working around it using an alias, but that isn't exposed in any useful way as an alternate name, as in:
I've just noticed after pulling the source that an attribute has been added as of:
which has added: