Ssh Wagrant在等待机器启动时超时

Ssh Wagrant在等待机器启动时超时,ssh,timeout,vagrant,vagrantfile,Ssh,Timeout,Vagrant,Vagrantfile,我是新来的流浪汉。我当前的环境是Ubuntu->在虚拟机上运行->在Mac book上运行 我已经成功地在Ubuntu上安装了Virtualbox和Vagrant软件包。我建立了我的回购协议,开始了我的建设(流浪者)。成功复制映像后,我已在我的文件中加入步骤,以便通过SSH连接到VM。。它只是挂起并最终超时 请参阅下面的错误 ==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and insta

我是新来的流浪汉。我当前的环境是Ubuntu->在虚拟机上运行->在Mac book上运行

我已经成功地在Ubuntu上安装了Virtualbox和Vagrant软件包。我建立了我的回购协议,开始了我的建设(流浪者)。成功复制映像后,我已在我的文件中加入步骤,以便通过SSH连接到VM。。它只是挂起并最终超时

请参阅下面的错误

==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20190514.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
==> default: Successfully added box 'ubuntu/trusty64' (v20190514.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: postgres_default_1588691813886_34109
==> default: Clearing any previously set forwarded ports...

Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:

  https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

  VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

  config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key

#<Thread:0x00005618d3a47468@/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true):

....
....
....

Timed out while waiting for the machine to boot. This means that (Vagrant::Errors::VMBootTimeout)

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 error(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.
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 error(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.

Vagrantfile

# -*- mode: ruby -*-
# # vi: set ft=ruby :

IMAGE_NAME = "bento/ubuntu-18.04"
N = 1

Vagrant.configure("2") do |config|

  config.vm.box = IMAGE_NAME
  config.vm.provision "shell", path: "provision/vagrant_provision.sh", privileged: true

  config.vm.provider "virtualbox" do |v|
    v.memory = 2048 
    v.cpus = 1
  end

  # Nodes
  (1..N).each do |number|
      config.vm.define "node-#{number}" do |node|
          node.vm.network "private_network", ip: "192.168.50.21#{number}"
          node.vm.hostname = "node-#{number}"
          node.vm.synced_folder "scripts/", "/scripts"
      end  
  end


end
=>默认值:找不到“ubuntu/trusty64”框。正在尝试查找并安装。。。
默认值:框提供程序:virtualbox
默认值:框版本:>=0
==>默认值:加载“ubuntu/trusty64”框的元数据
默认值:URL:https://vagrantcloud.com/ubuntu/trusty64
==>默认值:为提供程序virtualbox添加框“ubuntu/trusty64”(v20190514.0.0)
默认值:下载:https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
==>默认设置:成功为“virtualbox”添加了“ubuntu/trusty64”(v20190514.0.0)框!
==>默认值:导入基本框“ubuntu/trusty64”。。。
==>默认值:匹配NAT网络的MAC地址。。。
==>默认设置:检查“ubuntu/trusty64”框是否是最新的。。。
==>默认设置:设置VM的名称:postgres_default_1588691813886_34109
==>默认值:清除以前设置的所有转发端口。。。
Vagrant当前配置为使用创建VirtualBox同步文件夹
已启用“SharedFolderEnableSymLinksCreate”选项。如果流浪汉
来宾不受信任,您可能要禁用此选项。更多
有关此选项的信息,请参阅VirtualBox手册:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
可以使用环境变量全局禁用此选项:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
或者在文件中的每个文件夹上:
config.vm.synced_文件夹'/host/path','/guest/path',SharedFolderEnableSymLinksCreate:false
==>默认设置:清除任何以前设置的网络接口。。。
==>默认值:根据配置准备网络接口。。。
默认值:适配器1:nat
==>默认值:转发端口。。。
默认值:22(来宾)=>2222(主机)(适配器1)
==>默认值:正在启动VM。。。
==>默认值:等待机器启动。这可能需要几分钟。。。
默认值:SSH地址:127.0.0.1:2222
默认值:SSH用户名:vagrant
默认值:SSH auth方法:私钥
#异常终止(异常报告为真):
....
....
....
等待机器启动时超时。这意味着(Vagrant::Errors::VMBootTimeout)
Vagrant无法与内的来宾计算机通信
配置的(“config.vm.boot\u timeout”值)时间段。
如果你看上面,你应该能够看到错误
流浪汉在试图连接到机器时发生了意外。这些错误
通常是关于可能出错的好提示。
如果您使用的是自定义框,请确保网络已正确连接
正在工作,您可以连接到机器。这是一个常见的问题
问题是这些框中的网络设置不正确。
验证身份验证配置也已正确设置,
也
如果该框看起来启动正常,您可能需要增加
超时(“config.vm.boot\u timeout”)值。
等待机器启动时超时。这意味着
Vagrant无法与内的来宾计算机通信
配置的(“config.vm.boot\u timeout”值)时间段。
如果你看上面,你应该能够看到错误
流浪汉在试图连接到机器时发生了意外。这些错误
通常是关于可能出错的好提示。
如果您使用的是自定义框,请确保网络已正确连接
正在工作,您可以连接到机器。这是一个常见的问题
问题是这些框中的网络设置不正确。
验证身份验证配置也已正确设置,
也
如果该框看起来启动正常,您可能需要增加
超时(“config.vm.boot\u timeout”)值。
流浪汉档案
#-*-模式:ruby-*-
##vi:set ft=ruby:
IMAGE_NAME=“bento/ubuntu-18.04”
N=1
Vagrant.configure(“2”)do | config|
config.vm.box=IMAGE\u NAME
config.vm.provision“shell”,路径:“provision/vagrant_provision.sh”,特权:true
config.vm.provider“virtualbox”do | v|
v、 内存=2048
v、 CPU=1
结束
#节点
(1..N).每个do |编号|
config.vm.define“node-#{number}”do| node|
node.vm.network“专用网络”,ip:“192.168.50.21{number}”
node.vm.hostname=“节点-#{number}”
node.vm.synced_文件夹“scripts/”,“/scripts”
结束
结束
结束

问题与在已经在Mac上运行VirtualBox的Ubuntu虚拟机下使用Vagrant/VirtualBox有关。当我在Mac上本机安装Vagrant/VirtualBox时,我没有遇到任何问题。

问题与在已经在Mac上运行VirtualBox的Ubuntu虚拟机下使用Vagrant/VirtualBox有关。当我在Mac上本机安装Vagrant/VirtualBox时,我没有问题。

你能提供你的
Vagrant文件吗
我看不懂。。。编辑你的答案,将你的
Vagrantfile
包括在内,并删除这些评论。我将其添加到我的帖子顶部的Vagrantfile中。为什么会出现
而不是错误跟踪?似乎日志和
vagrant文件
不匹配。在日志中写着
ubuntu/trusty64
,在vagrant文件中写着
bento/ubuntu-18.04
。我尝试了两个有用的源代码。。问题是当我尝试SSH到它挂起的VM时。。努力通过其他职位解决该问题。我在SSH方面遇到了多个错误。你能提供你的
vagrant文件吗
我看不懂。。。编辑你的答案,将你的
Vagrantfile
包括在内,并删除这些评论。我将其添加到我的帖子顶部的Vagrantfile中。为什么会出现
而不是错误跟踪?似乎日志和
vagrant文件
不匹配。在日志中是