运行无业游民时ssh冻结

时间:2018-09-10 06:24:42

标签: ruby ubuntu vagrant

我正在尝试在计算机上设置RHCE实验室。我已经在Ubuntu 16.04上安装了无业游民的版本Vagrant 2.1.4和virtualbox 5。我从[https://computingforgeeks.com/how-to-addinstall-and-run-centos-7-vagrant-box-to-virtualbox-using-vagrant/][1]

下载了centos-7.0-x86_64.box

我安装了vagrant插件vagrant插件vagrant-vbguest && sahara

这是我无聊的剧本

# -*- mode: ruby -*-
# vi: set ft=ruby :
server_disk='server.vdi'
desktop_disk='desktop.vdi'
Vagrant.configure(2) do |config|
 config.vm.box = "centos/7"
 config.vm.define "classroom" do |s|
  s.vbguest.auto_update = false
  s.vm.network "private_network", ip: "192.168.33.254"
  s.vm.synced_folder ".", "/vagrant", disabled: true
  #s.vm.synced_folder "../repos", "/repos", owner: "root", group: "root"
  s.vm.synced_folder "scripts/classroom", "/usr/local/scripts", type: "rsync", owner: "root", group: "root"
  s.vm.provision "shell", inline: <<-SHELL
   chmod u+x /usr/local/scripts/classroom.sh
   /usr/local/scripts/classroom.sh
  SHELL
 end

 config.vm.define "server" do |a|
  a.vbguest.auto_update = false
  a.vm.provider "virtualbox" do |v|
   unless File.exist?(server_disk)
    v.customize ['createhd', '--filename', server_disk, '--size', 20 * 1024]
   end
   v.customize ['storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', server_disk]
   end
  a.vm.network "private_network", ip: "192.168.33.11"
  a.vm.synced_folder ".", "/vagrant", disabled: true
  a.vm.synced_folder "scripts/server", "/usr/local/scripts", type: "rsync", owner: "root", group: "root"
  a.vm.provision "shell", inline: <<-SHELL
   chmod u+x /usr/local/scripts/server.sh
   /usr/local/scripts/server.sh
  SHELL
  end

 config.vm.define "desktop" do |b|
  b.vbguest.auto_update = false
  b.vm.provider "virtualbox" do |v|
   unless File.exist?(desktop_disk)
    v.customize ['createhd', '--filename', desktop_disk, '--size', 20 * 1024]
   end
   v.customize ['storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', desktop_disk]
   end
  b.vm.network "private_network", ip: "192.168.33.10"
  b.vm.synced_folder ".", "/vagrant", disabled: true
  b.vm.synced_folder "scripts/desktop", "/usr/local/scripts", type: "rsync", owner: "root", group: "root"
  b.vm.provision "shell", inline: <<-SHELL
   chmod u+x /usr/local/scripts/desktop.sh
   /usr/local/scripts/desktop.sh
  SHELL
  end
end

当我运行 sudo vagrant up

我遇到错误

An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.

If the problem persists, please report a bug to the net-ssh project.

timeout during server version negotiating

我正在关注https://github.com/frezbo/lab。请帮帮我。

0 个答案:

没有答案