Vagrant 流浪汉无法与虚拟机通信
我在Windows10上。我已经安装了oracle虚拟盒。当我尝试在命令提示符中使用命令“vagrant up”时,我在15分钟后遇到超时错误。这是我在命令提示符中得到的结果Vagrant 流浪汉无法与虚拟机通信,vagrant,virtualbox,Vagrant,Virtualbox,我在Windows10上。我已经安装了oracle虚拟盒。当我尝试在命令提示符中使用命令“vagrant up”时,我在15分钟后遇到超时错误。这是我在命令提示符中得到的结果 Bringing machine 'sparkvm' up with 'virtualbox' provider... ==> sparkvm: Checking if box 'sparkmooc/base2' is up to date.. ==> sparkvm: Clearing any previou
Bringing machine 'sparkvm' up with 'virtualbox' provider...
==> sparkvm: Checking if box 'sparkmooc/base2' is up to date..
==> sparkvm: Clearing any previously set forwarded ports...
==> sparkvm: Clearing any previously set network interfaces...
==> sparkvm: Preparing network interfaces based on configuration...
sparkvm: Adapter 1: nat
==> sparkvm: Forwarding ports...
sparkvm: 8001 (guest) => 8001 (host) (adapter 1)
sparkvm: 4040 (guest) => 4040 (host) (adapter 1)
sparkvm: 22 (guest) => 2222 (host) (adapter 1)
==> sparkvm: Booting VM...
==> sparkvm: Waiting for machine to boot. This may take a few minutes...
sparkvm: SSH address: 127.0.0.1:2222
sparkvm: SSH username: vagrant
sparkvm: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the eror(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
我使用的是Virtual box版本5.0.14r105127,我的vagrant版本是1.8.1,我的vagrant文件如下所示:
# -*- mode: ruby -*-
# vi: set ft=ruby :
ipythonPort = 8001 # Ipython port to forward (also set in IPython notebook config)
Vagrant.configure(2) do |config|
config.ssh.insert_key = true
config.vm.define "sparkvm" do |master|
master.vm.box = "sparkmooc/base2"
master.vm.box_download_insecure = true
master.vm.boot_timeout = 900
master.vm.network :forwarded_port, host: ipythonPort, guest: ipythonPort, auto_correct: true # IPython port (set in notebook config)
master.vm.network :forwarded_port, host: 4040, guest: 4040, auto_correct: true # Spark UI (Driver)
master.vm.hostname = "sparkvm"
master.vm.usable_port_range = 4040..4090
master.vm.provider :virtualbox do |v|
v.name = master.vm.hostname.to_s
end
end
end
有人能告诉我这里出了什么问题吗?机器在Virtualbox中吗?是的。机器已启动并正在运行。@jsfan当我尝试在chrome中打开localhost:2222时,我收到消息“此网页不可用错误\u连接\u重置”@jsfan当我尝试时,即,我收到消息“我们无法访问此网页”。试试这个•确保你有正确的URL:“@jsfan是的,我可以看到Virtualbox中的所有三个端口2222、4040、8001,这台机器在Virtualbox中运行?是的。机器已启动并正在运行。@jsfan当我尝试在chrome中打开localhost:2222时,我收到消息“此网页不可用错误\u连接\u重置”@jsfan当我尝试时,即,我收到消息“我们无法访问此网页”。试试这个•确保你有正确的URL:“@jsfan是的,我可以在virtualbox中看到所有三个端口22240408001