vagrant up启动虚拟机出现The following SSH command respondedwitha non-zeroexitstatus.Vagrant assumes that this means the command failed!ARPCHECK=no /sbin/ifup eth12> /dev/nullStdoutfromthe command:Device eth1 doesnotseemtobe present, delaying initialization.Stderrfromthe command:
解决方案:
虽然vagrant up启动报错,但是vagrant ssh还是能登陆虚拟机的,进入虚拟机后,执行如下命令
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
对, 问题就处在在持久网络设备udev规则(persistent network device udev
rules)是被原VM设置好的,再用box生成新VM时,这些rules需要被更新。而这和Vagrantfile里对新VM设置private
network的指令发生冲突。删除就好了。
vagrant reload 再次启动就OK。