使用官方的Ubuntu 16.04 LTS(Xenial Xerus) Vagrant框图像(在VirtualBox上),我在基本网络设置方面遇到问题:
我的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
结果:
==> 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
将配置留给DHCP也不起作用:
server.vm.network "private_network", type: "dhcp"
与此同时,上述配置工作,为ubuntu/trusty64
和ubuntu/wily64
和非官方的gbarbieru/xenial
。
尝试使用该命令/sbin/ifdown eth1 2> /dev/null
不会产生任何结果,因为接口具有不同的命名方案(主要是enp0s3
)。
我在这里缺少明显的东西吗?还是盒子刚坏了?