With the Official Ubuntu 16.04 LTS (Xenial Xerus) Vagrant box image (on VirtualBox) I have problems with basic network settings:
My Vagrantfile
:
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/xenial64'
config.vm.define "xenial" do |server|
server.vm.network "private_network", ip: "192.168.10.10"
end
end
vagrant up
result:
==> xenial: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown eth1 2> /dev/null
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host ubuntu-xenial
mesg: ttyname failed: Inappropriate ioctl for device
Leaving the configuration to DHCP also does not work:
server.vm.network "private_network", type: "dhcp"
At the same time, the above configurations work for ubuntu/trusty64
and ubuntu/wily64
and unofficial gbarbieru/xenial
.
Trying the command /sbin/ifdown eth1 2> /dev/null
gives no results as the interface has different naming scheme (the main one is enp0s3
).
Am I missing something obvious here or is the box just broken?
Best Answer
The problem seems to be solved in the next release of vagrant: https://github.com/mitchellh/vagrant/issues/7155
I tried another box from Jeff Geerling https://twitter.com/geerlingguy/status/723571293174427648?lang=fr and it worked perfectly for me. Jeff has done a lot of great work on Vagrant/Ansible so I guess it's the best solution before the release of the next version of Vagrant