Reputation: 887
I create very simple Vagrantfile:
# -*- 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
The general purpose to up the Ubuntu 16.04 server. And all is good excepting troubles with SSH connection.
My log:
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.
I replace config.vm.box = "boxcutter/ubuntu1604" with box name "ubuntu/trusty64" and it's worked well, but how to fix with 16.04 ?
Upvotes: 3
Views: 2153
Reputation: 3176
I had the same problem and it was solved updating to the last VirtualBox and vagrant version. Try the "bento/ubuntu-16.04" vagrant box. The "ubuntu/xenial64" did not work for me.
Upvotes: 1
Reputation: 171
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
Try this may be help you.
Upvotes: 0
Reputation: 3959
Have you tried the in the error mentioned solution? The boot_timeout
is by default on 300 seconds [1] - did you gave the boxcutter box a little more time, e.g. 600 seconds, to see if it will respond afterwards?
However next to ubuntu/trusty64
there is also ubuntu/xenial64
[2] which is 16.04 - maybe you wanne try it.
Upvotes: 0