Arch Linux builds official Arch Linux Vagrant images under the namespace (Archlinux/Archlinux) on vagrant cloud. We are constantly trying to reduce the image size. Today I've encountered a bug report for our images, where a user tried to use the network segment: https://github.com/archlinux/arch-boxes/issues/70
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.network "private_network", ip: "192.168.0.50"
end
This failed, because our image doesn't provide netctl (the next version will possibly do, but I am interested in a change of the Arch plugin).
Arch Linux ships systemd in their default installation, with systemd systemd-networkd is available. I have to admit, that I am not a big fan of netctl, I think most of the features are covered by systemd-networkd (Ethernet) and iwd (wifi).
Therefore I would like to request a change of the Arch network plugin. I don't know ruby, but the particular lines I would like to change are here:
https://github.com/hashicorp/vagrant/blob/85acf0cac724ef4bfda593a66e0c17f7e4110da0/plugins/guests/arch/cap/configure_networks.rb#L42L49
A quick fix would be to install netctl (either in the image or via the plugin), but on the long term I would like to have systemd-networkd been used in this plugin. Is there an easy way to accomplish this? I guess you have already some sort of systemd-networkd network provider?
Hey there @shibumi - thanks for the report! I think ideally, we could make the Arch guest plugin work similar to how the debian guest plugin works for configuring networks. Essentially we can do a bit of inspection before configuring to see what tools we have available, and use what's on the system based on what is available.
Hi @briancain I had a look on the debian plugin and debian is using netplan. We don't use netplan on Arch Linux. I would actually prefer just plain systemd-networkd, because it's the only piece of software that you'll find on every Arch Linux system (netplan, netctl, etc are all optional).
The inspection sounds good however, but I don't know if it's really necessary. Could get a little bit chaotic.
Hey @shibumi - I was mostly using the debian network class as an example of how we could support multiple network configuration tools (if necessary), rather than using the same tools it uses. If we can just center the implementation around systemd-networkd, then that's great! It would make things a lot simpler :smile:
@briancain cool! Hit me when I should help with something.
vagrant box update in the past two months will be able to use #11400 once it's merged into master.I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
11400 implements this. I've assumed that anyone hitting this issue (as I did) has an Archlinux box that's fairly recent, and therefore has systemd v244 or later. Systemd v244 was first added to the Archlinux box on 2019-11-29, so anyone who's run a
vagrant box updatein the past two months will be able to use #11400 once it's merged into master.