diff --git a/plugins/guests/arch/cap/configure_networks.rb b/plugins/guests/arch/cap/configure_networks.rb index 0ef71d55f..12b1e20ec 100644 --- a/plugins/guests/arch/cap/configure_networks.rb +++ b/plugins/guests/arch/cap/configure_networks.rb @@ -41,10 +41,9 @@ module VagrantPlugins commands << <<-EOH.gsub(/^ {14}/, '').rstrip # Configure #{network[:device]} - mv '#{remote_path}' '/etc/netctl/#{network[:device]}' && - ip link set '#{network[:device]}' down && - netctl restart '#{network[:device]}' && - netctl enable '#{network[:device]}' + chmod 0644 '#{remote_path}' && + mv '#{remote_path}' '/etc/systemd/network/#{network[:device]}.network' && + networkctl reload EOH end diff --git a/templates/guests/arch/network_dhcp.erb b/templates/guests/arch/network_dhcp.erb index 377784574..e4e7286a6 100644 --- a/templates/guests/arch/network_dhcp.erb +++ b/templates/guests/arch/network_dhcp.erb @@ -1,4 +1,6 @@ -Description='A basic dhcp ethernet connection' -Interface=<%= options[:device] %> -Connection=ethernet -IP=dhcp +[Match] +Name=<%= options[:device] %> + +[Network] +Description=A basic DHCP ethernet connection +DHCP=ipv4 diff --git a/templates/guests/arch/network_static.erb b/templates/guests/arch/network_static.erb index 52b2f2d77..87a4f375d 100644 --- a/templates/guests/arch/network_static.erb +++ b/templates/guests/arch/network_static.erb @@ -1,8 +1,9 @@ -Connection=ethernet -Description='A basic static ethernet connection' -Interface=<%= options[:device] %> -IP=static -Address=('<%= options[:ip]%>/<%= options[:netmask] %>') +[Match] +Name=<%= options[:device] %> + +[Network] +Description=A basic static ethernet connection +Address=<%= options[:ip]%>/<%= options[:netmask] %> <% if options[:gateway] -%> -Gateway='<%= options[:gateway] %>' +Gateway=<%= options[:gateway] %> <% end -%> diff --git a/templates/guests/arch/network_static6.erb b/templates/guests/arch/network_static6.erb index e64ffd5ca..87a4f375d 100644 --- a/templates/guests/arch/network_static6.erb +++ b/templates/guests/arch/network_static6.erb @@ -1,8 +1,9 @@ -Connection=ethernet -Description='A basic IPv6 ethernet connection' -Interface=<%= options[:device] %> -IP6=static -Address6=('<%= options[:ip]%>/<%= options[:netmask] %>') +[Match] +Name=<%= options[:device] %> + +[Network] +Description=A basic static ethernet connection +Address=<%= options[:ip]%>/<%= options[:netmask] %> <% if options[:gateway] -%> -Gateway6='<%= options[:gateway] %>' +Gateway=<%= options[:gateway] %> <% end -%>