Vagrant启动报错

来源:互联网 发布:mysql date_format 编辑:程序博客网 时间:2024/05/22 11:48

Vagrant虚拟机,使用centos6.6,配置文件中,设置网络问public network, 启动过程老是报错,通过端口跳转的方式登录虚拟机之后,执行ifconfig发现取不到DHCP提供的IP:

==> default: Configuring and enabling network interfaces...The following SSH command responded with a non-zero exit status.Vagrant assumes that this means the command failed!ARPCHECK=no /sbin/ifup eth1 2> /dev/nullStdout from the command:Device eth1 does not seem to be present, delaying initialization.Stderr from the command:

网上搜了出来的例子无非都是说:

问题就处在在持久网络设备udev规则(persistent network device udev rules)是被原VM设置好的,再用box生成新VM时,这些rules需要被更新。

然后执行命令删除某个文件:sudo rm -f /etc/udev/rules.d/70-persistent-net.rules 然后重启


但我实际运行之后发现还是无非解决,后来在github上一个老外提供了解决办法,在此记录一下以备日后需要:

sudo ln -sf /dev/null /etc/udev/rules.d/70-persistent-net.rules
具体见https://github.com/mitchellh/vagrant/issues/2614#issuecomment-105314244



0 0
原创粉丝点击