Created attachment 1441477 [details] simple Vagrantfile to reproduce the issue Description of problem: When using Debian guest with systemd-networkd (default), the network configuration is being created as /etc/systemd/network/99-vagrant.network But the default config, in /etc/systemd/network/99-default.network sets all the network interfaces matching the pattern "e*" to use DHCP. As the result, it is not possible to use static IP on any interface. Version-Release number of selected component (if applicable): vagrant-2.0.2-1 How reproducible: Always Steps to Reproduce: 1. Install vagrant (disclaimer: I'm using 'libvirt' provider, but this really should behave the same for others, including the default VirtualBox provider) 2. Create the Vagrantfile as in attachment 3. Run the command: "vagrant up" Actual results: When you login to the vm, using "vagrant ssh test_vm", and check the IP configuration, you'll notice the interface got the address in "172.16.0/24" network via DHCP. The address is different than "172.16.0.2" which is specified in the Vagrantfile. If you check /etc/systemd/network, you'll see what I described at the beginning of this bug -- the 99-default.network enforces all interfaces matching "e*" to use DHCP, which overwrites the manual setting, which is in 99-vagrant.network. Expected results: The machine should use the address specified in the Vagrantfile ("172.16.0.2" in my example). Additional info: This problem has been reported upstream as: https://github.com/hashicorp/vagrant/issues/9592 It is now set to CLOSED, it was supposed to be fixed in 2.0.4 by the following PR: https://github.com/hashicorp/vagrant/pull/9646/files This patch is incorrect, because it changes the priority of the "netplan" file, not the systemd-networkd configuration. I've already commented on that issue, asking for it to be re-opened. And I've created a proper patch for this: https://github.com/hashicorp/vagrant/pull/9867 If we don't want to patch Vagrant in Fedora, I can monitor, and comment here once my patch is merged upstream.
https://github.com/hashicorp/vagrant/pull/9867 is merged.
Anatoli, thanks for the patch! I'll backport it. In the meantime you can check my COPR with latest rawhide Vagrant[0](which has the issue solved). Regards, Pavel [0] https://copr.fedorainfracloud.org/coprs/pvalena/vagrant/
vagrant-2.0.2-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-66659d070f
vagrant-2.0.2-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-66659d070f
Just to be clear - the patch is not mine, I just gave the pointer. ;)
Anatoli, thanks and no worries. The PR you linked was merged and the changes stayed in `master` branch, so it's upstream code now. (Also, the fix was obvious.) Regards, Pavel
vagrant-2.0.2-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.