I started to create a new VM for developement, cause my ubuntu 14.4 seems out of date.
I desicided to switch to ubuntu 17.10 for the future but fail on first installation.
This is my vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "1024"
end
config.vm.box = "generic/ubuntu1710"
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: false
config.vm.network "private_network", ip: "192.168.37.200"
end
And during the provisioning I got this
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown 'eth1' || true
/sbin/ip addr flush dev 'eth1'
# Remove any previous network modifications from the interfaces file
sed -e '/^#VAGRANT-BEGIN/,$ d' /etc/network/interfaces > /tmp/vagrant-network-interfaces.pre
sed -ne '/^#VAGRANT-END/,$ p' /etc/network/interfaces | tac | sed -e '/^#VAGRANT-END/,$ d' | tac > /tmp/vagrant-network-interfaces.post
cat \
/tmp/vagrant-network-interfaces.pre \
/tmp/vagrant-network-entry \
/tmp/vagrant-network-interfaces.post \
> /etc/network/interfaces
rm -f /tmp/vagrant-network-interfaces.pre
rm -f /tmp/vagrant-network-entry
rm -f /tmp/vagrant-network-interfaces.post
/sbin/ifup 'eth1'
Stdout from the command:
Stderr from the command:
bash: line 4: /sbin/ifdown: No such file or directory
bash: line 20: /sbin/ifup: No such file or directory
The machine is not available via the hosting windows. Do I have to install something before provisioning? Or do you prefer another machine template from hashicorb?
Regards n00n
Vagrant cannot be used with Ubuntu 17.10 at the moment, due to the removal of the traditional networking configuration tools and files:
/sbin/ifup
and/sbin/ifdown
.But you can create vagrant VM with a network interface with the following workaround:
1. Add installing
ifupdown
into your Vagrantfile:2. Create vagrant VM:
Of course it fails with the error in question.
3. Start provision script inside just created VM. It installs package
ifupdown
with necessary files:4. And now reload your VM: