Vagrant mount multiple folders on the same point - logout - macos

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.

Related

default: SSH auth method: private key default: Warning: Authentication failure. Retrying

I have read kali linux in vagrant box:
and I follow this document.
but when I run up vagrant:
$ sudo vagrant up
/opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /Users/delo in PATH, mode 040777
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'Sliim/kali-linux-2.0-amd64' version '2.0.1' 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: 22 (guest) => 2222 (host) (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: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
there I get the Authentication failure error.
EDIT-01
When I execute the sudo vagrant ssh, there need password:
kali ldl$ sudo vagrant ssh
/opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /Users/delo in PATH, mode 040777
vagrant#127.0.0.1's password:
vagrant#127.0.0.1's password:
the password is not vagrant, so, who can help me to know the correct password?
In my terminal I use ssh to connect it, there I can not ssh success too:
$ ssh vagrant#127.0.0.1 -2222
You can try adding the following line to your Vagrantfile to get past the Authentication failure error message.
config.ssh.insert_key = false
Perhaps the root password is toor. Found here

vagrant doesn't boot up

I'm trying to boot up my VM using the 'vagrant up' command but with no success.it get some error like following:
vagrant destroy&&vagrant up
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...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu1404'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: ubuntu_default_1427785207620_64334
==> 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: Adapter 3: bridged
==> 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 refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
I have tried some method form here:https://laracasts.com/discuss/channels/general-discussion/homestead-doesnt-boot-up
my software information:
vagrant 1.7.2
virtualbox 4.3.26
window 8.1
anyone have idea to solve it?
It seems its a virtual box / vagrant version incompatibility issue
I uninstalled Virtual Box 4.3.14 and installed Virtual Box 4.3.12 and it worked. Basically I downgraded virtual box.
I found the answer here Vagrant Connection Refused Error

Vagrant Up Authentication Failure

I'm current doing GettingStartedWithDjango Tutorials but I've been furiously stuck/tried many solutions from other questions.
I use 'vagrant up' in the terminal and everything works ok. I can use 'vagrant halt' and do 'vagrant up' without a problem.
But once I 'vagrant ssh' and install postinstall.sh, my problem arises. I vagrant halt and and vagrant up but it comes with the following errors.
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: Forwarding ports...
default: 8000 => 8888 (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: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
Here is the debug info:
INFO ssh: Attempting SSH connection...
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 127.0.0.1
INFO ssh: - Port: 2222
INFO ssh: - Username: vagrant
INFO ssh: - Password? false
INFO ssh: - Key Path: ["/Users/kennyh/Desktop/GSWD/.vagrant/machines/default/virtualbox/private_key"]
INFO ssh: SSH not ready: #<Vagrant::Errors::SSHAuthenticationFailed: SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.>
Tried using PermitRootLogin without-password.. not sure if you're suppose to unhash it? (tried both anyway) still doesn't work.File was etc/sshd.config
# Authentication:
#LoginGraceTime 2m
PermitRootLogin without-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

Why does Vagrant not work right out of the box on Windows 7?

Windows 7 64-bit here. Went to the Vagrant stable version downloads page. Downloaded the Windows 64-bit installer, installed using all recommended defaults, and rebooted.
Then read their Getting Started Guide. Opened a command prompt:
vagrant init hashicorp/precise32
And see the following output:
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.
OK. So far so good. Then I do:
vagrant up
And here is the output:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise32' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'hashicorp/precise32'
default: URL: https://atlas.hashicorp.com/hashicorp/precise32
==> default: Adding box 'hashicorp/precise32' (v1.0.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/hashicorp/boxes/precise32/versions/1.0.0/providers/virtualbox.box
default:
==> default: Successfully added box 'hashicorp/precise32' (v1.0.0) for 'virtualbox'!
==> default: Importing base box 'hashicorp/precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Setting the name of the VM: vms_default_1421176231425_15801
==> 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: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. 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...
default: Warning: Remote connection disconnect. 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...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: 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.
Then I read the next part of the Getting Started Guide:
Now imagine every project you've ever worked on being this easy to set up.
LOL
Why am I getting this error?

default: Warning: Remote connection disconnect. Retrying

When I run vagrant up, I get:
D:\GitHub\website\rails-dev-box>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: 3000 => 1234 (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...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
This warning will be for ever ..
What I've noticed is that if I started the VM manually ( without vagrant ) it will work without any delay, but only If I enabled Adapter 2 at VM settings like this:
How can I enable Adapter 2 of VM when using vagrant up ?
EDIT
Vagrantfile is:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# config.vm.network :hostonly, "192.168.50.4"
end
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty32'
config.vm.hostname = 'rails-dev-box'
# config.vm.synced_folder ".", "/vagrant/web" #, type: "nfs"
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
config.vm.boot_timeout = 120
# config.winnfsd.uid = 1
# config.winnfsd.gid = 1
config.vm.network :forwarded_port, guest: 3000, host: 1234
config.vm.provision :shell, path: 'bootstrap.sh', keep_color: true
end
For me it turned out that patience was the answer.
I was getting the message (I got it 12 times) but I waited a couple of minutes and then it succeeded.
When you say "this warning will be for ever .." How long did you wait?
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'phusion/ubuntu-14.04-amd64' 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: Adapter 2: hostonly
default: Adapter 3: hostonly
default: Adapter 4: hostonly
==> default: Forwarding ports...
default: 3000 => 3334 (adapter 1)
default: 1080 => 1082 (adapter 1)
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: 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...
default: Warning: Remote connection disconnect. 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...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: 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...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: stop: Unknown instance:
==> default: mongod start/running, process 8424
Not really a solution per-say, but I have found that when I timed out after getting that message ~20 times that I could vagrant halt the machine (which forces it as there is no ssh connection that can be made), ran vagrant up, it worked only giving me the warning twice.
So... turn it off and on again? So stupid but does seem to work untill there's an actual solution.

Resources