Vagrant Up provisions on one computer but not on another - vagrant

I'm trying to get my Vagrant box setup from my work environment on my home computer but I've been running into issues. I've uninstalled and reinstalled Virtualbox and Vagrant twice now. At work, everything works as expected. At home, nothing. My vagrant file is as follows:
Vagrant::configure("2") do |config|
config.vm.box = "saucy64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :private_network, ip: "192.168.33.10"
# Allow more memory usage for the VM
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", "1024"]
end
# Fix rights and permissions on shared folder
config.vm.synced_folder ".", "/vagrant/", :mount_options => [ "dmode=777", "fmode=666" ]
config.vm.synced_folder "./www", "/vagrant/www/", :mount_options => [ "dmode=775", "fmode=644" ], :owner => 'vagrant', :group => 'www-data'
# Set the timezone to something useful
config.vm.provision :shell, :inline => "echo \"Europe/London\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata"
# Make sure APT is up to date
config.vm.provision :shell, :inline => "apt-get update --fix-missing"
# Fix locales
# config.vm.provision :shell, :inline => "apt-get -y install language-pack-en"
config.vm.provision :puppet do |puppet|
puppet.facter = { "fqdn" => "dev.oraculum2.local", "hostname" => "www" }
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "oraculum2.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
My output looks like this:
$ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'saucy64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[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...
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. This can
mean a number of things.
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.
Of course, I've tried to increase the boot timeout but that had the same effect. I tried to boot in the GUI but it goes to a black screen and never changes.
Using:
Vagrant 1.4.1 and Virtualbox 4.3.6
I'm on an Ubuntu 12.04 machine and that's the same as work as well.
I tried with Vagrant 1.4.3 as well but same result. I'm lost as it worked fine at work. Any ideas?

I was initially going to suggest that there are networking issues, but I missed the 'GUI goes to a black screen and never changes' part.
This sounds as if the VirtualBox setup itself seems to have some trouble. I would suggest to try it with a different box as well to determine if it is a problem with the box (maybe a broken download?) or with VirtualBox itself.

make sure the box user ~vagrant/.ssh/authorized_keys contain the pub key to match your vagrant private key.
I had a very similar problem. vagrant up would abort and virtual box would start just fine.
i would get this:
$ vagrant up
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] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
i watched open console and see it started up and THEN aborted.
and so i generated debug.
VAGRANT_LOG=debug vagrant up >> DEBUG.LOG.0 2>&1 &
i walked through that data and saw inside:
DEBUG ssh: == Net-SSH connection debug-level log END ==
INFO ssh: SSH not up: #<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.>
i started the virtual box from provider, logged in, checked and vagrant key was corrupt.
replaced it. tested ssh as vagrant without password. shutdown -h now. vagrant up…
SUCCESS!!
the output from vagrant up is misleading. in the debug we can see that it knows where it failed but this is not handled sufficiently to tell the user that the box /may be/ fine, the communication was bad.

Run the below command on the terminal
$ vagrant ssh-config
then check the output on the IdentityFile values, e.g.:
IdentityFile /home/{USERNAME}/.vagrant.d/insecure_private_key
then switch or login to the appropriate SSH user and run vagrant up, before login the SSH user, you must "suspend the vagrant box" using vagrant suspend command.

Related

Vagrant times out waiting for machine to boot (Virtualbox)

To preface, I realize this is a common error message with several different causes and solutions, but nothing I've found has worked so far. I have Vagrant 2.1.5 with Virtualbox 5.2.18, running on Windows 10.
I was testing Vagrant with a very simple Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
end
Running vagrant up then gives the typical "Timed out while waiting for the machine to boot" error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: vargrantTest_default_1537805339381_15444
==> 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
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.
Things I have tried:
Ensuring virtualization is enabled in BIOS
Increasing boot timeout in vagrantfile
Ensuring the VMs network settings are correct in Virtualbox (NAT adapter with cable connected)
Using vb.gui = true to watch the VM boot. It boots fine and waits at the login screen.
Using --debug flag on vagrant up. This doesn't give any obvious errors that I found, though before timing out it runs VBoxManage showvminfo --machinereadable several hundred times, resulting in a log file of over 80k lines.
As well as several other things I forgot to write down. I'm out of ideas and quite new to Vagrant, so I don't really know what the next step of troubleshooting this is. Any help would be appreciated.
Edit: Not sure why I didn't think to do it myself, but Marco gave me the idea to try to ssh directly to the VM. I tried doing so using the key file in "/.vagrant.d/insecure_private_key" created by Vagrant, but it timed out. I then tried to simply ping the VM, but doing so gives a seemingly random mix of "Request timed out" and "Destination host unreachable", so there's probably a bigger network issue somewhere (my machine, the VM, or Virtualbox) I'm unaware of.
Are you declaring some kind of network for this box? Either private or public, but something?
Also, how long is your boot timeout? Go overboard and give it 900=>15mn.

Vagrant GuestAdditions seems to be installed (5.1.20) correctly, but not running

I want to copy one entire folder present on my windows machine to a vm hosting ubuntu/trusty64.
But every time I try to bring my vagrant up i get below error message.
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' 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: 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: Machine booted and ready!
==> default: Configuring proxy for Apt...
==> default: Configuring proxy environment variables...
[default] GuestAdditions seems to be installed (5.1.20) correctly, but not running.
vboxadd: unrecognized service
vboxadd-service: unrecognized service
bash: line 4: setup: command not found
==> default: Checking for guest additions in VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
setup
Stdout from the command:
Stderr from the command:
bash: line 4: setup: command not found
Note:
Ubuntu version is up to date as you can see in the third line.
Vagrant version : Vagrant 1.9.3
Windows version : Windows 7 Enterprise Service Pack 1
Oracle VirtualBox version : Version 5.1.20 r114628 (Qt5.6.2)
On running the command vbguest status i get
$ vagrant vbguest --status
[default] GuestAdditions seems to be installed (5.1.20) correctly, but not running.
My vagrant file contents are
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
config.ssh.insert_key = false
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# 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
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "xxxxx"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder "../data", "/vagrant_data" , "/vagrant"
config.vm.synced_folder ".", "/mydata", :mount_options => ['dmode=775','fmode=664']
#config.vm.synced_folder "./", "/vagrant", id: "vagrant-root", type: "nfs"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "xxxxx"
config.proxy.https = "xxxxx"
config.proxy.ftp = "xxxxx"
config.apt_proxy.http = "xxxxx"
config.apt_proxy.https = "xxxxx"
config.proxy.no_proxy = "xxxxx"
end
if !Vagrant.has_plugin?("vagrant-proxyconf")
system('vagrant plugin install vagrant-proxyconf')
raise("vagrant-proxyconf installed. Run command again.");
end
end
Please suggest
1. How can i correct this error?
2. Share the complete folder from windows to vm?
Connect the Guest VM using WinSCP. Copy the VBoxGuestAddition.iso from the host machine. In my case, the VBoxGuestAddition present in C:\ProgramFiles\Oracle\VirtualBox.
Once iso file copied to Guest VM, login to GUest VM using putty.
mkdir /media/GuestAdditionsISO
Then execute the below command
mount -o loop /path/of/VBoxGuestAddition.iso /media/GuestAdditionsISO
Once mount command executed successfully,
cd /media/GuestAdditionsISO
sudo ./VBoxLinuxGuestAddition.run
Then re-start the VM. This works for me

Laravel Homestead hangs at SSH auth method: private key on mac

I can't seem to get Homestead running. It hangs at SSH auth method: private key.
The Homestead VM starts. I can go to VirtualBox and open the terminal window and login with vagrant:vagrant.
I can't vagrant ssh, ssh vagrant#127.0.0.1:2204 or ssh vagrant#127.0.0.1 -p 2204.
None of my folders show up in the VM, but the VirtualBox says they are mapped.
Every time I vagrant up, I get:
vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Clearing any previously set forwarded ports...
==> homestead-7: Fixed port collision for 80 => 8000. Now on port 2200.
==> homestead-7: Fixed port collision for 443 => 44300. Now on port 2201.
==> homestead-7: Fixed port collision for 3306 => 33060. Now on port 2202.
==> homestead-7: Fixed port collision for 5432 => 54320. Now on port 2203.
==> homestead-7: Fixed port collision for 22 => 2222. Now on port 2204.
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
homestead-7: Adapter 1: nat
homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
homestead-7: 80 (guest) => 2200 (host) (adapter 1)
homestead-7: 443 (guest) => 2201 (host) (adapter 1)
homestead-7: 3306 (guest) => 2202 (host) (adapter 1)
homestead-7: 5432 (guest) => 2203 (host) (adapter 1)
homestead-7: 22 (guest) => 2204 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
homestead-7: SSH address: 127.0.0.1:2204
homestead-7: SSH username: vagrant
homestead-7: 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 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.
I replaced the homestead insecure private key with my key on my box. I see a lot of people get Warning: Connection timeout. Retrying..., but I don't get that far.
I'm on a mac 10.11.6
Any help would be greatly appreciated!
I had the same problem on macOS 10.12 today, and lost 6 hours trying to find a fix. Finally, after several reinstallations, reboots, and trial and error, I somehow got it to work by following these steps...
Completely uninstall and reinstall Vagrant, VirtualBox, and Homestead.
Ensure the homestead-7 box is shut down within the VirtualBox UI
Right-click the homestead-7 box, and choose Settings
Click 'Network'
Under 'Adapter 1', which should be attached to NAT, click 'Advanced'
Tick the box beside 'Cable Connected'
Save settings, and reprovision Homestead with vagrant up --provision
Run vagrant reload --provision to reprovision the machine
That should be it! I was able to SSH in after this, but not able to view Homestead sites through the browser (even though I'd configured the /etc/hosts file), but a simple reboot of the Mac seemed to fix this.
Given I don't know what exactly caused this in the first place, this might just be a bit of luck for my case, but let me know how you get on.
Open VirtualBox UI and enter the virtual machine.
press Enter key to make system continue to boot.
And then you can see the vagrant up going on.
I had this problem. I enabled Vt-x in the bios and it cleared it.
Vagrant 2.1.2
vagrant destroy then vagrant up --provision worked for me.
I have noticed that it usually happens when new version of vagrant released
If you are on Windows, you have done everything here and still have trouble, maybe this is the solution you need.
Open the Command Prompt as an administrator. Type the bcdedit command. You may find hypervisorlaunchtype Auto. If that is the case, type bcdedit /set hypervisorlaunchtype off to turn it off. Reboot and try again.
Hope this helps.
Nothing here worked for me. I got into the situation of SSH auth method: private key because my mac black screened and crashed.
All that worked for me was a vagrant destroy then vagrant up --provision. Beware this will of course trash anything in your VM. but you should be using ephemeral principles anyway...
Enable "Virtualization Technology" in BIOS settings
I had to do a fsck. (disclaimer, I typed the commands from memory)
Open VirtualBox UI and enter the virtual machine.
If you see (initramfs), type exit
fsck /dev/mapper/vagrant-vg-root -y
reboot
Go back to your normal terminal and try a:
vagrant halt
vagrant up
For me, things were back to normal from here.
This happened to me all of a sudden after working fine for a while using Homestead v6.4 with virtualbox. To fix, Open VirtualBox - if using - and check the logs there.
I found instructions to manually fsck a directory which fixed the issue
Your directory will likely be different, but mine was
fsck /dev/mapper/homestead--vg-root
And then select y to fix all of the errors
Try to call vagrant up from CMD with admin rights
If you're still stuck, here's something you can quickly rule out:
For me the issue was too little video memory, for some reason in Virtual Box my video memory was set to 4mb, the minimum is 12mb, I set it to 24mb (with vm off) and ran vagrant up again, and it fixed the issue!
I got this error after installing Docker Desktop for Windows.
The two aren't compatible.
run Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
this will disable hypervisor.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
to enable.
I've found that now Homestead takes a long time to boot, Open VMBox, select homestead and click on Show (green button). Wait until you have the homestead login prompt.
Then go back & you can run vagrant ssh into Homestead.

vagrant up fails for bento/ubuntu-16.04 on Oracle VirtualBox 5.0.16 r105871

Today I was planning to get the latest Ubuntu release into my virtual box using vagrant. After loading the image and running vagrant up, I got an error as reported below, which relates to the network configuration of the virtual box.
Interestingly, there are already some posts online (mainly on GitHub, e.g.: https://github.com/mitchellh/vagrant/issues/7155), but also on AskUbuntu (https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box), StackOverflow (vagrant up command giving error and eth1 not showing a resolvable ip address) and StackExchange (https://unix.stackexchange.com/questions/188413/not-able-to-resolve-ip-address-for-eth1-in-vagrant-vm). However these issues relate to either xenial64 (i.e. not bento) or use a public_network configuration.
As reported in https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box, this issue does not exist for ubuntu/trusty64 or ubuntu/wily64, but seems to be an issue for both ubuntu/xenial64 and bento/ubuntu-16.04 (i.e. both Ubuntu 16 boxes).
As you will see in my Vagrantfile below, I have a simple setup for bento/ubuntu-16.04 and use private_network only. To be clear, I can't really use this post (vagrant up command giving error and eth1 not showing a resolvable ip address) since it suggests to comment out the public_network part of the vagrant configuration. Also, I should mention that there are no other VM's running at the time this error occurs.
From the error log it seems obvious that there is an issue with the netowrk interface eth1, but what exactly the problem is, is unclear to me. I have previously successfully started the hashicorp/precise32 and ubuntu/trusty64 Ubuntu boxes with the same vagrant configuration and the same Oracle VB and have not encountered this problem.
Any help is appreciated. My technical setup and reference files are listed below.
Cheers
AHL
Setup:
Vagrant: v1.8.1
Oracle VirtualBox: v5.0.16 r105871
Ubuntu box: bento/ubuntu-16.04 (https://atlas.hashicorp.com/bento/boxes/ubuntu-16.04)
Host machine: Lenovo X1 Carbon, Windows 10
Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.network "private_network", ip: "192.168.33.10"
end
Output:
C:\Users\AHL\workspace>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04' 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: 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: Machine booted and ready!
GuestAdditions 5.0.16 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown eth1 2> /dev/null
Stdout from the command:
Stderr from the command:
mesg: ttyname failed: Inappropriate ioctl for device
C:\Users\AHL\workspace>
I had the problem and found that for some reason, the virtual box did not connect the virtual cable to the network interface.
I solved it by adding
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
to my config.vm.provider "virtualbox" do |vb| loop, for example in my case I wanted 1GB RAM, USB3 and the network cable connected:
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.customize ["modifyvm", :id, "--usbxhci", "on"] # Connect USB3 disk
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
I did not need this --cableconnected1 line in any other boxes I have used, only in config.vm.box = "bento/ubuntu-16.04".
Maybe you have to check if doing vagrant updoes not connect any of your cables, I had also an extra network and eth0 was unwired and eth1 was wired.
Check your particular case. Maybe you have to play with the number after the option.
Hope this helps!
I think in your list, you need to add https://github.com/mitchellh/vagrant/issues/6871
The issue is still open - There are some users who reported they could fix the issue (https://github.com/mitchellh/vagrant/issues/6871#issuecomment-223290622 or https://github.com/mitchellh/vagrant/issues/6871#issuecomment-222348226)
If you can build your box yourself using packer, there are some fixes on the network issue.

Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer

It seems I can't SSH to my virtual box.
I have a virtual box running with Win7. The host PC is also in Win7.
The virtual box was created through Vagrant with the following Vagrantfile.
Vagrant.configure("2") do |config|
config.vm.box = "http://aka.ms/vagrant-win7-ie11"
end
Open cmd. Go to the root folder of the VagrantFile.
Execute the following command:
vagrant up
cmd displays:
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: 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
Timed out while waiting for the machine to boot...
Time out appears though the virtual box has already finished the boot. (Checking via VirtualBox Manager)
Execute the following command:
vagrant ssh
cmd displays:
ssh_exchange_identification: read: Connection reset by peer
While debugging the vagrant ssh, I may have found some useful logs:
INFO subprocess: Starting process: ["C:\\Program Files\\Git\\usr\\bin/ssh.EXE"]
INFO ssh: Invoking SSH: ss ["vagrant#127.0.0.1", "-p", "2222", "-o", "Compression=yes", "-o", "DSAAuthentication=yes", "-o", "LogLevel=FATAL", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-o", "IdentitiesOnly=yes", "-i", "C:/Users/hostpcname/.vagrant.d/insecure_private_key"]
Can you suggest some ways on how to get out of this?
I've tried the non-Windows image - hashicorp/precise64, and it worked fine.
I have the same issue. Do by follow this step and working for me.
vagrant reload
and
vagrant ssh
again and working fine
These steps will work
vagrant halt
open virtual box and uncheck hardware virtualization , save it
vagrant up
vagrant ssh
Note: vagrant halt is must, settings can't be edited in running state
The following commands worked for me.
vagrant halt
vagrant up
vagrant ssh
Enable de virtualization on BIOS
After rebooting my computer and enabling intel virtualization in BIOS, I was able to get past this.
I was getting error as : ssh_exchange_identification connection reset by peer
Please follow below link ,it worked for me.
https://talk.openmrs.org/t/error-on-vagrant-up/8833/30
Step:
Please open virtualbox and check if any vm is running.
Run vagrant destroy to remove all vms created by current Vagrantfile.
Remove .vagrant directory in the bahmni-vagrant directory.
Make sure you have the same Vagrantfile file as https://github.com/Bahmni/bahmni-vagrant/blob/master/Vagrantfile 37.
Run vagrant up. Monitor virtualbox while it is starting up.

Resources