2016-11-02 11 views
2

나는 Vagrantfile 매우 간단 만들 :우분투 16.04에 SSH를 할 수 없습니까?

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

Vagrant.configure(2) do |config| 
    config.vm.box = "boxcutter/ubuntu1604" 
    config.vm.hostname = "r1" 
    config.vm.network "forwarded_port", guest: 3000, host: 3000 

    config.vm.network "private_network", ip: "192.168.50.10" 

    config.vm.provider "virtualbox" do |vb| 
    vb.memory = "1024" 
    end 

end 

우분투 16.04 서버 최대 범용. SSH 연결시의 문제를 제외한 모든 것이 좋습니다.

내 로그 :

vagrant up

Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Checking if box 'boxcutter/ubuntu1604' is up to date... 
==> default: Fixed port collision for 22 => 2222. Now on port 2200. 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
    default: Adapter 2: hostonly 
==> default: Forwarding ports... 
    default: 3000 (guest) => 3000 (host) (adapter 1) 
    default: 22 (guest) => 2200 (host) (adapter 1) 
==> default: Running 'pre-boot' VM customizations... 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2200 
    default: SSH username: vagrant 
    default: 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 the box appears to be booting properly, you may want to increase 
the timeout ("config.vm.boot_timeout") value. 

내가 config.vm.box이 = "박스 커터/ubuntu1604"상자 이름 "우분투/trusty64는"하고 잘 작동 것 교체 16.04로 해결하는 방법은 무엇입니까?

+1

이전 버전 및 우분투에서 많은 문제가있는 최신 버전/가상 박스를 가지고 있는지 확인하십시오. 16.04 –

+0

https://atlas.hashicorp.com/boxes/search에서 찾은 '우분투/트러스티 64'처럼 보입니다. 서버 버전이 아닌 OS의 데스크톱 버전입니다. 그리고 설치 도중 * 'BIOS 업그레이드 또는 force_addr = 0xaddr'* 오류 문제가 발생하지만, Vagrant는 오류를 표시하지 않습니다. 가져 오기 및 사용 - * 유증자 상자에 https://atlas.hashicorp.com/gbarbieru/boxes/xenial*을 추가하면 잘 작동합니다. 누군가에게 도움이되기를 바랍니다. – sharp

+0

그래서이 코드를 vagrantfile에 추가하면이 경우를 해결할 수 있습니다. vb.customize [ "modifyvm", : id, "--cableconnected1", "on"] – sharp

답변

0

오류 해결 방법을 시도해 보셨습니까? boot_timeout은 기본적으로 300 초에 [1]입니다. 박스 커터 상자에 조금 더 시간을 주셨습니까? 예 : 600 초 후에 응답 할 것인가?

그러나 ubuntu/trusty64 옆에도 ubuntu/xenial64[2]이 있습니다. 어쩌면 그럴 수도 있습니다.

+0

시간 제한을 늘리려고하고 우분투/xenial64를 알아 봤습니다. 하지만 같은 결과와 .. – sharp

0
Vagrant.configure(2) do |config| 
    config.vm.box = "ubuntu/xenial64" 
    config.vm.provider :virtualbox do |vb| 
    vb.customize ["modifyvm", :id, "--memory", "2048"] 
end  

시도해보십시오.

1

나는 동일한 문제가 있었고 마지막 VirtualBox와 방랑자 버전으로 업데이트되어 해결되었습니다. "bento/우분투 - 16.04"방황 상자를 사용해보십시오. "우분투/xenial64"는 나를 위해 작동하지 않았다.