Vagrant up fails with Warning: Remote connection disconnect. Retrying - vagrant

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.

Related

Configuration issue with OpenShift3 origin/all-in-one, vagrant Cluster setup

I am facing issue to see login page at
https://10.2.2.2:8443/console
,
even when I trying to do
"oc login https://10.2.2.2"
It worked for the first installation and I was able to login, but I had no luck when I did few re-installations to customize.
I have already gone throgh existing github vagrant issues, and stackoverflow as well but no clues for this issue.
I appreciate if someone can help me with this issue.
Installations Detals:
I've followed this blog for cluster setup in my mac ,
1) Installed VirtualBox Version 5.1.14 r112924 (Qt5.6.2)
2) Installed Vagrant 1.9.1
Here is my Vagrantfile config,
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.7.2"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version. Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "openshift/origin-all-in-one"
# uncomment this line if you downloaded the box and want to use it instead
# config.vm.box = "openshift3"
config.vm.box_check_update = false
config.vm.network "private_network", ip: "10.2.2.2"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.hostname = "origin"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# config.vm.network "forwarded_port", guest: 80, host: 1080
# config.vm.network "forwarded_port", guest: 443, host: 1443
# config.vm.network "forwarded_port", guest: 5000, host: 5000
# config.vm.network "forwarded_port", guest: 8080, host: 8080
# config.vm.network "forwarded_port", guest: 8443, host: 8443
config.vm.provider "virtualbox" do |vb|
# vb.gui = true
vb.memory = "4096"
vb.cpus = 2
vb.name = "origin-1.3.0"
end
end
This is my debug logs for Vagrant up --debug
Last login: Wed Feb 1 13:59:59 on ttys000
xxxxxs-MBP:origin xxxxx$ vagrant init openshift/origin-all-in-one
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
xxxxxs-MBP:origin xxxxx$ vagrant up --provider=virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'openshift/origin-all-in-one' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'openshift/origin-all-in-one'
default: URL: https://atlas.hashicorp.com/openshift/origin-all-in-one
==> default: Adding box 'openshift/origin-all-in-one' (v1.3.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/openshift/boxes/origin-all-in-one/versions/1.3.0/providers/virtualbox.box
==> default: Successfully added box 'openshift/origin-all-in-one' (v1.3.0) for 'virtualbox'!
/Users/xxxxx/.vagrant.d/boxes/openshift-VAGRANTSLASH-origin-all-in-one/1.3.0/virtualbox/include/_Vagrantfile:5: warning: already initialized constant VAGRANTFILE_API_VERSION
/Users/xxxxx/origin/Vagrantfile:5: warning: previous definition of VAGRANTFILE_API_VERSION was here
==> default: Importing base box 'openshift/origin-all-in-one'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: origin-1.3.0
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Adapter 3: hostonly
==> default: Forwarding ports...
default: 8443 (guest) => 8443 (host) (adapter 1)
default: 22 (guest) => 2222 (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:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Running provisioner: shell...
default: Running: inline script
==> default:
==> default: Successfully started and provisioned VM with 2 cores and 5 G of memory.
openshift.service in vm is failing to start automatically,
I did ssh to machine and started manually with command sudo systemctl start origin and everything working perfect.
I had a bit of issue with Origin myself. I ended up using Docker and OpenShift Client. I have written down step by step on how to get started with OpenShift Origin on Windows. I am not trying to promote anything here. The entry is too long for me to cut and paste it. Please visit the link below:
http://blog.muralibala.com/2017/01/getting-started-with-openshift-origin-on-windows/
Hope this is helpful.

Vagrant Connection timeout error

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

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.

Vagrant mount multiple folders on the same point - logout

I try to NFS mount 3 folders into my own vagrant box (I created this box with CentOS),
but it seems always mount the folders on the same point (/home/vagrant/logout)
here is my Vagrantfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "my_box"
config.vm.network "private_network", ip: "192.168.100.100"
config.ssh.pty = true
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.synced_folder "../Larvata/a", "/home/A", type: "nfs"
config.vm.synced_folder "../Larvata/b", "/home/B", type: "nfs"
config.vm.synced_folder "../Larvata/c", "/home/C", type: "nfs"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
end
my vagrant up message:
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (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:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Error: Connection timeout. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/A' logout
Stdout from the command:
export TERM=vt100
mount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/B' logout
exit
export TERM=vt100
logoutmount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/C
mount.nfs: /home/vagrant/logout is busy or already mounted
exit
logout
Stderr from the command:
this /etc/exports generated by vagrant:
# VAGRANT-BEGIN: 501
"/Users/zx1986/Box" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/a" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/b" "/Users/zx1986/Larvata/c" 192.168.100.100 -alldirs -mapall=501:20
# VAGRANT-END: 501
Virtaulbox 4.3.12
Vagrant 1.5.1
MacOS 10.9.3
Any idea or clues?
I have googled for a while, but haven't seem anything about the "logout" mount point.

Resources