ubuntu – vagrant无法连接到虚拟框

当我使用基本的Vagrantfile,只配置了两条线:
config.vm.box = "ubuntu/trusty32"
config.vm.network "forwarded_port",guest: 80,host: 8080

我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:

default: Warning: Connection timeout. Retrying...

然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!

所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:

ssh_exchange_identification: read: Connection reset by peer

怎么了 ?任何想法 ?

(btw我的端口8080是免费的,我也试过vb.gui = true,

它正在使用box hashicorp / precise32)

如果您有一台支持硬件虚拟化的计算机,则需要在BIOS中启用它.

如果您没有配有支持硬件虚拟化的CPU的现代计算机,就像在您的情况下,您将不得不坚持使用32位盒.那个box,trusty32是32位,所以它应该工作.

但是如果没有,你可以尝试Piotr Banaszkiewicz在他的博客文章here中描述的任何事情.这个帖子有点老了(2012),但是我们在谈论一个更老的CPU(2009),所以它可能还是应用.

总结如下:

  • In the VirtualBox GUI select VM → Settings → System → Ac­cel­er­a­tion,then uncheck everything.
  • Go to the directory containing your VirtualBox VMs,then to your VM’s directory,then edit *.vbox XML file. Within the CPU tag children (like Hard­ware­Vir­tEx or PAE),replace every enabled=”true” with enabled=”false”.
  • Turn off hardware vir­tu­al­iza­tion via Va­grant­file (config.vm.customize [“modifyvm”,:id,“–hwvirtex”,“off”])
  • Check if number of CPUs for your Vagrant virtual machine is greater than 1. If so,go and change the count of CPUs in your *.vbox file to one.

希望这可以帮助.

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...