Vagrant Connection timeout error - vagrant

I'm trying to follow instructions in a book which involve bringing up a vagrant instance based on a Vagrantfile that I downloaded from git clone https://github.com/jorhett/learning-puppet4. For convenience, here are the contents of the Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.5.2"
# Copy files into place
$setupscript = <<END
# Hardlock domain name
echo 'supercede domain-name "example.com";' > /etc/dhcp/dhclient.conf
# Install etc/hosts for convenience
cp /vagrant/etc-puppet/hosts /etc/hosts
# Install puppet.conf in user directory to quiet deprecation warnings
#mkdir -p /home/vagrant/.puppetlabs/etc/puppet
#cp /vagrant/etc-puppet/puppet.conf /home/vagrant/.puppetlabs/etc/puppet
#chown -R vagrant:vagrant /home/vagrant/.puppetlabs
# Install example hiera settings in global directory
mkdir -p /etc/puppetlabs/puppet
cp -r /vagrant/etc-puppet/* /etc/puppetlabs/puppet/
mkdir -p /etc/puppetlabs/code
chown -R vagrant:vagrant /etc/puppetlabs
# Provide the URL to the Puppet Labs yum repo on login
echo "
You should start by enabling the Puppet Labs Puppet Collection 1 release repo
sudo yum install http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
Then install Puppet 4 and its companion packages
sudo yum install -y puppet-agent
" > /etc/motd
# Enable MotD
sed -i -e 's/^PrintMotd no/PrintMotd yes/' /etc/ssh/sshd_config
systemctl reload sshd
END
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
end
# Default client
config.vm.define "client", primary: true do |client|
client.vm.hostname = "client.example.com"
client.vm.network :private_network, ip: "192.168.250.10"
client.vm.provision "shell", inline: $setupscript
end
# A puppetmaster
config.vm.define "puppetmaster", autostart: false do |puppetmaster|
puppetmaster.vm.hostname = "puppetmaster.example.com"
puppetmaster.vm.network :private_network, ip: "192.168.250.5"
puppetmaster.vm.provision "shell", inline: $setupscript
end
# Puppet Server
config.vm.define "puppetserver", autostart: false do |puppetserver|
puppetserver.vm.hostname = "puppet-server.example.com"
puppetserver.vm.network :private_network, ip: "192.168.250.6"
puppetserver.vm.provision "shell", inline: $setupscript
puppetserver.vm.provider :virtualbox do |ps|
ps.memory = 1024
end
end
end
When running vagrant up client I get the following output that ends with an error:
Bringing machine 'client' up with 'virtualbox' provider...
==> client: Importing base box 'puppetlabs/centos-7.0-64-nocm'...
==> client: Matching MAC address for NAT networking...
==> client: Checking if box 'puppetlabs/centos-7.0-64-nocm' is up to date...
==> client: Setting the name of the VM: learning-puppet4_client_1439117612834_66
905
==> client: Clearing any previously set network interfaces...
==> client: Preparing network interfaces based on configuration...
client: Adapter 1: nat
client: Adapter 2: hostonly
==> client: Forwarding ports...
client: 22 => 2222 (adapter 1)
==> client: Running 'pre-boot' VM customizations...
==> client: Booting VM...
==> client: Waiting for machine to boot. This may take a few minutes...
client: SSH address: 127.0.0.1:2222
client: SSH username: vagrant
client: SSH auth method: private key
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
client: Warning: Connection timeout. Retrying...
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.
How to troubleshoot and fix this error?

This is happening at a really low level -- the Vagrant instance isn't booted far enough for provisioning to happen, so nothing you quoted from the Vagrantfile is relevant.
Look for an issue with the Vagrant setup on your machine, and check your machine's logfiles. In particular, check for out of memory conditions.
You can try reducing the Vagrantfile to something really simple, without any of the provisioning stuff and work with that until the virtual machine boots up.
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.5.2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
# Default client
config.vm.define "client", primary: true do |client|
client.vm.hostname = "client.example.com"
client.vm.network :private_network, ip: "192.168.250.10"
end
end

Related

Vagrant up fails with Warning: Remote connection disconnect. Retrying

Upgraded to vagrant version 2.1.1 and latest centos/7 (virtualbox, 1803.01) and $vagrant up now fails to build just after the new key is loaded. The Vagrant file being used has run fine on previous versions of vagrant (2.0.3).
Interestingly I am able to connect to the instance manually using vagrant, using the new key both using direct ssh and also with:
$vagrant ssh nat
Things already tried:
Extended timeout within vagrant config.vm.boot_timeout = 1200
Uninstalled both vagrant and virtualbox + manually removing plugins and removing both C:\Users\owner\.vagrand.d and C:\Users\owner\.VirtualBox directories before reinstall
Tried older version of nat.vm.box_version = "1704.01" which previous worked.
Why not roll back?
Initially I upgraded as I was having another issue which I will raise a separate thread about. Will link here once I have created it.
Versions
Host OS: Windows 7 Professional
Guest OS: centos/7 1803.01
Vagrant Version: 2.1.1
Vagrant Plugin list:
vagrant-hostmanager (1.8.8)
vagrant-hosts (2.8.1)
vagrant-proxyconf (1.5.2)
vagrant-reload (0.0.1)
vagrant-share (1.1.9)
vagrant-vbguest (0.15.1)
$ vagrant up
Bringing machine 'nat' up with 'virtualbox' provider...
Bringing machine 'fei' up with 'virtualbox' provider...
==> nat: Importing base box 'centos/7'...
==> nat: Matching MAC address for NAT networking...
==> nat: Checking if box 'centos/7' is up to date...
==> nat: Setting the name of the VM: brand_nat_1526342206425_95671
==> nat: Fixed port collision for 22 => 2222. Now on port 2200.
==> nat: Clearing any previously set network interfaces...
==> nat: Preparing network interfaces based on configuration...
nat: Adapter 1: nat
nat: Adapter 2: intnet
==> nat: Forwarding ports...
nat: 22 (guest) => 2200 (host) (adapter 1)
==> nat: Running 'pre-boot' VM customizations...
==> nat: Booting VM...
==> nat: Waiting for machine to boot. This may take a few minutes...
nat: SSH address: 127.0.0.1:2200
nat: SSH username: vagrant
nat: SSH auth method: private key
nat: Warning: Connection aborted. Retrying...
nat: Warning: Connection reset. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Connection aborted. Retrying...
nat:
nat: Vagrant insecure key detected. Vagrant will automatically replace
nat: this with a newly generated keypair for better security.
nat:
nat: Inserting generated public key within guest...
nat: Removing insecure key from the guest if it's present...
nat: Key inserted! Disconnecting and reconnecting using new SSH key...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
nat: Warning: Remote connection disconnect. Retrying...
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.
Also showing my slightly sanitized vagrant file. None of the scripts listed actually get run as the box fails before they are executed.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# abbreviated brand name
BRAND_NAME = "brand"
TOP_LEVEL_DOMAIN = ".some.dev"
BOX_NAME = "centos/7"
Vagrant.configure(2) do |config|
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.boot_timeout = 1200
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://192.168.100.3:3128/"
config.proxy.https = "https://192.168.100.3:3128/"
config.proxy.no_proxy = "localhost,127.0.0.1,.some.lan"
end
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.memory = 2048
vb.cpus = 2
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
end
config.vm.define "nat" do |nat|
nat.vm.box = BOX_NAME
nat.vm.network "private_network", ip: "10.0.0.2", virtualbox__intnet: true
nat.vm.hostname = "nat.staging." + BRAND_NAME + TOP_LEVEL_DOMAIN
nat.vm.provision :hosts, :sync_hosts => true
nat.vm.provision "shell", path: "./scripts/aws_replication.sh"
nat.vm.provision "shell", path: "./scripts/nat_ssh.sh"
nat.vm.provision "shell", path: "./scripts/nat_staging.sh"
nat.vm.provision "shell", path: "./scripts/nat_git_clone.sh"
nat.vm.provision "shell", path: "./scripts/nat_set_ansible.sh"
end
config.vm.define "fei" do |fei|
fei.vm.box = BOX_NAME
fei.vm.network "private_network", ip: "10.0.0.4", virtualbox__intnet: true
fei.vm.network "forwarded_port", guest: 80, host: 80, auto_correct: true
fei.vm.network "forwarded_port", guest: 443, host: 443, auto_correct: true
fei.vm.network "forwarded_port", guest: 9000, host: 9000, auto_correct: true
fei.vm.provision :hosts, :sync_hosts => true
fei.vm.hostname = BRAND_NAME + ".staging" + TOP_LEVEL_DOMAIN
fei.vm.provision "shell", path: "./scripts/aws_replication.sh"
fei.vm.provision "shell", path: "./scripts/non-nat_key_staging.sh"
end
end
nat: Vagrant insecure key detected. Vagrant will automatically replace
nat: this with a newly generated keypair for better security.
Every time you are running "Vagrant up" command it tries to find insecure key and replace it.To use default key mentioned at path "config.ssh.private_key_path" include below entry in Vagrantfile.
Use config.ssh.insert_key = false in your Vagrantfile and then try.
I use OSX, I resolved this problem by restart my computer.

Vagrant ssh authentication failure on windows

I am trying to get Linux Ubuntu 32 bit box running on Windows VM Ware. I was following a course on UDACITY and they told me to install these software. I don't know much about how to run these software. I tried to find answers on Stack but it was all on different OS not Windows. I tried some edit also by enabling GUI and i also added Vagrant configure in Vagrantfile.
Having a problem with ssh authentication:
Error:
e2sn7cy#EMR-HZDEV08-003 /C/Users/e2sn7cy/fullstack/vagrant (master)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8000 => 1234 (adapter 1)
default: 8080 => 8080 (adapter 1)
default: 5000 => 4321 (adapter 1)
default: 22 => 2222 (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
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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.
My Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
Vagrant.configure("2") do |config|
config.ssh.private_key_path = "~/.ssh/id_rsa"
config.ssh.forward_agent = true
end
config.vm.provision "shell", path: "pg_config.sh"
# config.vm.box = "hashicorp/precise32"
config.vm.box = "ubuntu/trusty32"
config.vm.network "forwarded_port", guest: 8000, host: 1234
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 5000, host: 4321
end
My pg_config.sh
apt-get -qqy update
apt-get -qqy install postgresql python-psycopg2
apt-get -qqy install python-flask python-sqlalchemy
apt-get -qqy install python-pip
pip install bleach
pip install oauth2client
pip install requests
pip install httplib2
su postgres -c 'createuser -dRS vagrant'
su vagrant -c 'createdb'
su vagrant -c 'createdb forum'
su vagrant -c 'psql forum -f /vagrant/forum/forum.sql'
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant(B[m"
echo -e $vagrantTip > /etc/motd
you can open the gui mode to see what happened in your virtual machine.
do not change the default configuration, download a new box and use the default config
if you want to use the python development environment, you can download a box including all python environment
Try setting config.vm.boot_timeout to a higher value, default is 300. Like this:
config.vm.box = "ubuntu/trusty32"
config.vm.boot_timeout = 600

Laravel Homestead not working, it just keeps on timing out

I'm trying to set up Laravel Homestead on Windows 8.1 x64 and I can't seem to get passed the error below.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: casensitive_default_1420409560257_10693
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (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
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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.
This is a very popular error with Homestead, and I've found a couple similar posts on stackoverflow such as: one, and two. But setting the boot_mode in my Vagrantfile didn't fix the issue.
Vagrant.configure("1") do |config|
config.vm.boot_mode = :gui
end
To make sure I had VT-x I downloaded intels tool, which I do: i7 core; and I checked that Virtualization is enabled in BIOS.
In the Vagrantfile I'm using defaults (most of it appears to be commented out) and I've set config.vm.box to:
"laravel/homestead"
and my Homestead.yaml is set to (and already had id_ras.pub and id_rsa):
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/d/projects
to: /home/vagrant/projects
sites:
- map: roopla.app
to: /home/vagrant/projects/test_app/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
This is pretty far out of my normal Composer, PHP, GruntJS, BowerJS, AngularJS day, and I'm not sure what I'm really doing, initially I was just learning Laravel 4/5 and then I jumped sideways because Homestead looked useful and kewl, so I'm just blindly following instructions so any snippets of knowledge that can be imparted would be much appreciated.
First, make sure you haven't turned on Hyper-V.
Second, probably you have problem with ssh keys. The simplest solution is to alter your vagrant file not to use SSH keys but login and password.
Look at my vagrantfile:
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION = "2"
homesteadYamlPath = File.expand_path("Homestead.yaml")
afterScriptPath = File.expand_path("after.sh")
aliasesPath = File.expand_path("aliases")
require_relative 'scripts/homestead.rb'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exists? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
end
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
if File.exists? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath
end
config.vm.network "forwarded_port", guest: 11300, host: 11301
end
I've added here 2 lines:
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
because I had the same problem as you and now Homestead works for me without any problems.

Vagrant 'remote connection disconnect' while booting

Whenever I try to boot a Vagrant box on my Windows 7 x64 laptop in git bash using vagrant up, I get a long series of Warning: Remote connection disconnect. Retrying... messages. Occasionally this results in failure with a couple of different messages (either guest VM tools not being installed, or a timeout), but sometimes, after 10 or 15 messages, it will boot successfully and I can SSH into it.
A picture, to illustrate:
And the full output of the vagrant up command:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ianwalter/ubuntu-node-nginx' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 9966 => 9966 (adapter 1)
default: 22 => 2222 (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
default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
And so on. Is this usual behavior? Is there some way I can fix it? I'm running Vagrant 1.6.2 with VirtualBox 4.3.12.
EDIT: After BrianC's advice, I booted a GUI session to see what the VM was doing while the connection was refused. This is what it looks like:
I have solved this for now by changing base box from ianwalter/ubuntu-node-nginx to ubuntu/trusty64 and installing node/NPM manually from the package manager. It doesn't seem to give me the same trouble, so I surmise there is something in the other image that is causing the stall.
I also faced similar issue with vagrant but in my case I was not able to SSH even the vagrant was up.
I was using following configurations.
windows 10 64 bit
virtual box 5.0.20
HP ab032tx laptop
enabled virtualization in BIOS settings
Following were the vagrant file setting in my project folder.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
config.vm.boot_timeout = 1000
# Optional NFS. Make sure to remove other synced_folder line too
#config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
end
Every time I run vagrant up command following error occurred.
default: Warning: Remote connection disconnect. Retrying..
Solution To fix this I run the following command (vagrant destroy)
vagrant destroy
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Once this command was run I again run vagrant up and everything started working.
Before this when ever I was running vagrang ssh I got following output.
vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile "C:/Users/muk_t/.vagrant.d/insecure_private_key"
IdentitiesOnly yes
LogLevel FATAL
Note : linux version used was 64 bit.

Allow two or more vagrant VMs to communicate on their own network

I want to create multiple servers that can communicate directly with each other without using public IPs. They'll still need internet access but nothing from outside the network will need to connect to them. Creating one box usually works, but when I add additional servers the networking fails.
MacOS: 10.8.5
Virtualbox: 4.3.12
GuestOS: Ubuntu "precise64"
Using version 2 of the Vagrant config
Most of the time if I use private network I get:
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
saltminion01: Warning: Connection timeout. Retrying...
Does anybody have a sample Vagrantfile that does this?
Here's an example which creates two VMs:
alpha 10.0.0.10
beta 10.0.0.11
From inside either VM you can reach the other by IP address, and can connect to the outside world.
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrant multi-machine sample setup
Vagrant.configure("2") do |config|
config.vm.define :alpha do |alpha|
alpha.vm.box = "hashicorp/precise64"
alpha.vm.network :private_network, ip: "10.0.0.10"
alpha.vm.hostname = "alpha"
end
config.vm.define :beta do |beta|
beta.vm.box = "hashicorp/precise64"
beta.vm.network :private_network, ip: "10.0.0.11"
beta.vm.hostname = "beta"
end
end

Resources