Vagrant will not boot up Ubuntu - linux

I am trying to boot a new machine up using Vagrant on my MacBook Pro. I already have one working linux machine on my Macbook but trying to boot up another.
Here is the error I am getting when running vagrant up.
==> default: Checking if box 'ubuntu/trusty64-juju' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2122 (adapter 1)
default: 80 => 6080 (adapter 1)
default: 6079 => 6079 (adapter 1)
default: 22 => 2200 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
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...
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...
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...
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.
I have also tried vagrant reload but same problem.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# 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-juju"
# 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: "192.168.33.10"
# 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"
# 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
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
end
Can anyone suggest a fix?

I can confirm that the issue was I had created a 64-bit Ubuntu box which is not supported by my CPU.
I installed ubuntu/trusty32 package and it worked first time.
vagrant init ubuntu/trusty32
I hope this helps someone else.

Related

Vagrant - No guest IP was given to the Vagrant core NFS helper

Recently our Vagrant DEV VM's will no longer boot on virtualbox (windows 10).
Is this related to the current kernel bug that is causing issues with a lot of the distributions?
BUG: https://bugs.launchpad.net/ubuntu/+source/linux-meta-lts-xenial/+bug/1820526
BUG: https://bugs.launchpad.net/vagrant/+bug/1821083
Here is the launch code:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Setting the name of the VM: LOCAL-DEV_20190322_113839
==> 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: You are trying to forward to privileged ports (ports <= 1024). Most
==> default: operating systems restrict this to only privileged process (typically
==> default: processes running as an administrative user). This is a warning in case
==> default: the port forwarding doesn't work. If any problems occur, please try a
==> default: port higher than 1024.
==> default: Forwarding ports...
default: 22 (guest) => 22 (host) (adapter 1)
default: 80 (guest) => 80 (host) (adapter 1)
default: 443 (guest) => 443 (host) (adapter 1)
default: 3306 (guest) => 3306 (host) (adapter 1)
default: 6379 (guest) => 6379 (host) (adapter 1)
default: 4369 (guest) => 4369 (host) (adapter 1)
default: 9090 (guest) => 9090 (host) (adapter 1)
default: 9100 (guest) => 9100 (host) (adapter 1)
default: 9104 (guest) => 9104 (host) (adapter 1)
default: 9150 (guest) => 9150 (host) (adapter 1)
default: 5672 (guest) => 5672 (host) (adapter 1)
default: 8883 (guest) => 8883 (host) (adapter 1)
default: 15672 (guest) => 15672 (host) (adapter 1)
default: 15674 (guest) => 15674 (host) (adapter 1)
default: 15675 (guest) => 15675 (host) (adapter 1)
default: 25672 (guest) => 25672 (host) (adapter 1)
default: 35197 (guest) => 35197 (host) (adapter 1)
default: 1883 (guest) => 1883 (host) (adapter 1)
default: 5673 (guest) => 5673 (host) (adapter 1)
default: 8161 (guest) => 8161 (host) (adapter 1)
default: 61613 (guest) => 61613 (host) (adapter 1)
default: 61614 (guest) => 61614 (host) (adapter 1)
default: 61616 (guest) => 61616 (host) (adapter 1)
default: 9900 (guest) => 9900 (host) (adapter 1)
default: 9910 (guest) => 9910 (host) (adapter 1)
default: 9200 (guest) => 9200 (host) (adapter 1)
default: 9300 (guest) => 9300 (host) (adapter 1)
default: 5601 (guest) => 5601 (host) (adapter 1)
default: 27017 (guest) => 27017 (host) (adapter 1)
default: 27018 (guest) => 27018 (host) (adapter 1)
default: 27019 (guest) => 27019 (host) (adapter 1)
default: 27080 (guest) => 27080 (host) (adapter 1)
default: 28017 (guest) => 28017 (host) (adapter 1)
default: 5432 (guest) => 5432 (host) (adapter 1)
default: 5480 (guest) => 5480 (host) (adapter 1)
default: 10000 (guest) => 10000 (host) (adapter 1)
default: 20000 (guest) => 20000 (host) (adapter 1)
default: 4444 (guest) => 4444 (host) (adapter 1)
default: 3128 (guest) => 3128 (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: password
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.16
VBoxService inside the vm claims: 5.2.26
Going on, assuming VBoxService is correct...
[default] GuestAdditions seems to be installed (5.2.26) correctly, but not running.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.16
VBoxService inside the vm claims: 5.2.26
Going on, assuming VBoxService is correct...
Job for vboxadd-service.service failed because the control process exited with error code. See "systemctl status vboxadd-service.service" and "journalctl -xe" for details.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.16
VBoxService inside the vm claims: 5.2.26
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.16
VBoxService inside the vm claims: 5.2.26
Going on, assuming VBoxService is correct...
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
No guest IP was given to the Vagrant core NFS helper. This is an
internal error that should be reported as a bug.
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
uname -r
4.4.0-143-generic
I have attempted to rebuild the kernel headers. They seemed to install correctly.
sudo dpkg-reconfigure virtualbox-dkms
-------- Uninstall Beginning --------
Module: virtualbox
Version: 5.1.38
Kernel: 4.4.0-143-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-143-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-143-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-143-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-143-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
------------------------------
Deleting module version: 5.1.38
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-5.1.38 DKMS files...
Building only for 4.4.0-143-generic
Building initial module for 4.4.0-143-generic
Done.
vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-143-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-143-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-143-generic/updates/dkms/
vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-143-generic/updates/dkms/
depmod.....
DKMS: install completed.
I also updated the virtualbox on Ubuntu
sudo apt install virtualbox-5.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libsdl-ttf2.0-0
The following packages will be REMOVED:
virtualbox virtualbox-guest-additions-iso virtualbox-qt
The following NEW packages will be installed:
libsdl-ttf2.0-0 virtualbox-5.2
0 to upgrade, 2 to newly install, 3 to remove and 4 not to upgrade.
Need to get 0 B/73.9 MB of archives.
After this operation, 28.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 375081 files and directories currently installed.)
Removing virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.3) ...
Removing virtualbox (5.1.38-dfsg-0ubuntu1.16.04.3) ...
Removing virtualbox-guest-additions-iso (5.1.38-0ubuntu1.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Selecting previously unselected package libsdl-ttf2.0-0:amd64.
(Reading database ... 374771 files and directories currently installed.)
Preparing to unpack .../libsdl-ttf2.0-0_2.0.11-3_amd64.deb ...
Unpacking libsdl-ttf2.0-0:amd64 (2.0.11-3) ...
Selecting previously unselected package virtualbox-5.2.
Preparing to unpack .../virtualbox-5.2_5.2.26-128414~Ubuntu~xenial_amd64.deb ...
Unpacking virtualbox-5.2 (5.2.26-128414~Ubuntu~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for systemd (229-4ubuntu21.17) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up libsdl-ttf2.0-0:amd64 (2.0.11-3) ...
Setting up virtualbox-5.2 (5.2.26-128414~Ubuntu~xenial) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Command exists and doesn't throw any errors.
sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
I'm stumped, maybe I will have to wait for a new kernel patch?
There isn't a quick and simple fix for this, your best bet is to downgrade the kernel version.
Get a list of kernels headers and images
dpkg --list | grep linux-header
dpkg --list | grep linux-image
Remove the offending kernel
sudo apt purge linux-image-4.4.0-143-generic linux-headers-4.4.0-143-generic linux-image-unsigned-4.4.0-143-generic linux-modules-4.4.0-143-generic linux-modules-extra-4.4.0-143-generic
apt-mark - hold the offending kernel for future updates
sudo apt-mark hold linux-image-4.4.0-143-generic linux-headers-4.4.0-143-generic linux-image-unsigned-4.4.0-143-generic linux-modules-4.4.0-143-generic linux-modules-extra-4.4.0-143-generic
sudo apt-mark showhold
Remove other kernels and dkms
sudo apt-get remove dkms build-essential linux-headers-*
Reinstall the older kernel and configure dkms using virtualbox-guest-dkms
sudo apt-get install dkms build-essential linux-headers-4.4.0-142-generic virtualbox-guest-dkms
Reboot to enable the old kernel version
sudo reboot
Run apt update
sudo apt update
sudo apt upgrade -y
And you should be able to launch your virtual-box / vagrant boxes again.
I pushed a fix some days ago, and today it migrated in release.
https://launchpad.net/ubuntu/+source/virtualbox/4.3.40-dfsg-0ubuntu14.04.1
https://launchpad.net/ubuntu/+source/virtualbox-lts-xenial/4.3.40-dfsg-0ubuntu1.14.04.1~14.04.1
https://launchpad.net/ubuntu/+source/virtualbox-guest-additions-iso/4.3.40-0ubuntu1.14.04.1
please use the fixed package.

On "vagrant up" getting Error "write error: No space left on device"

I am running the virtual box inside the centos7, On this virtul box I have installed the openstack. I was trying to start vagrant up, but getting the error
Error
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cat /tmp/vagrant-network-entry_enp0s8 >> /etc/sysconfig/network-scripts/ifcfg-enp0s8
Stdout from the command:
Stderr from the command:
cat: write error: No space left on device
OverAll Running output
[openstack#localhost kilo]$ 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: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 8080 => 8080 (adapter 1)
default: 5000 => 5000 (adapter 1)
default: 8000 => 8000 (adapter 1)
default: 9000 => 9000 (adapter 1)
default: 9696 => 9696 (adapter 1)
default: 8774 => 8774 (adapter 1)
default: 35357 => 35357 (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: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> 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!
cat /tmp/vagrant-network-entry_enp0s8 >> /etc/sysconfig/network-scripts/ifcfg-enp0s8
Stdout from the command:
Stderr from the command:
cat: write error: No space left on device

"vagrant up" succeeds but "vagrant ssh" fails with "VM must be running to open SSH connection"

On a Fedora Linux 3.6.11 system I'm using Jenkins to concurrently run two jobs that use the same script to test a software package on two different VMs. One of the jobs routinely fails because Vagrant can't ssh(1) to the VM that it just created.
The script contains this:
set -e
$vmName=...
( flock 9; vagrant up $vmName # attempt to prevent concurrent "vagrant up"
) 9>/tmp/`basename $0`-$USER
trap "vagrant destroy --force $vmName; `trap -p EXIT`" EXIT
# Execute test commands on the virtual machine:
vagrant ssh $vmName -- -T <<EOF
...
EOF
Here's the failure output (with some elision):
+ flock 9
+ vagrant up centos64_64
Bringing machine 'centos64_64' up with 'virtualbox' provider...
==> centos64_64: Importing base box 'centos-6.4-x86_64-devel'...
[KProgress: 10%
...
[K==> centos64_64: Matching MAC address for NAT networking...
==> centos64_64: Setting the name of the VM: delivery_centos64_64_1425494409930_40170
==> centos64_64: Fixed port collision for 22 => 2222. Now on port 2200.
==> centos64_64: Clearing any previously set network interfaces...
==> centos64_64: Preparing network interfaces based on configuration...
centos64_64: Adapter 1: nat
==> centos64_64: Forwarding ports...
centos64_64: 22 => 2200 (adapter 1)
==> centos64_64: Booting VM...
==> centos64_64: Waiting for machine to boot. This may take a few minutes...
centos64_64: SSH address: 127.0.0.1:2200
centos64_64: SSH username: vagrant
centos64_64: SSH auth method: private key
centos64_64: Warning: Connection timeout. Retrying...
centos64_64: Warning: Connection timeout. Retrying...
centos64_64: Warning: Remote connection disconnect. Retrying...
==> centos64_64: Machine booted and ready!
==> centos64_64: Checking for guest additions in VM...
==> centos64_64: Mounting shared folders...
centos64_64: /vagrant = <http://spock:8080/jenkins/job/LDM_Acceptance_64 bit_CentOS_6.4/ws/archive/delivery>
centos64_64: /tmp/vagrant-puppet-2/manifests => <http://spock:8080/jenkins/job/LDM_Acceptance_64-bit_CentOS_6.4/ws/archive/delivery/puppet>
==> centos64_64: Running provisioner: puppet...
==> centos64_64: Running Puppet with centos-devel.pp...
==> centos64_64: Notice: Compiled catalog for centos6464.unidata.ucar.edu in environment production in 1.30 seconds
++ trap -p EXIT
+ trap 'vagrant destroy --force centos64_64; ' EXIT
+ vagrant ssh centos64_64 -- -T
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.
+ vagrant destroy --force centos64_64
==> centos64_64: Destroying VM and associated drives...
==> centos64_64: Running cleanup tasks for 'puppet' provisioner...
Both VMs are NATed. The successful job's VM got port 2222 for ssh(1) while the failed job's VM (above) got port 2200. Each job has its own directory and copy of the Vagrantfile.
Any advice on how to ensure that both vagrant ssh-s succeed would be appreciated.

Vagrant up and reload - default: Warning: Connection timeout. Retrying...

I had a fully functional vagrant for three months now, but for the last three days, I am getting errors whenever I try to run vagrant up or vagrant reload.
This is the error I get when running vagrant reload
default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
default: Forcing shutdown of VM...
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: 80 => 8080 (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: Connection timeout. Retrying...
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...
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...
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...
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.
I am using Elementary OS Luna and updated the latest versions of vagrant as well as virtualbox as some answers suggested. But the problems persist.
I have tried most of the popular solutions including enabling the GUI and this. I also tried the solution given here but could not since my virtual box doesn't login.
However, the GUI presented me with this:
keys: press S to skip mounting or M for manual recovery
I tried both the keys one by one but the problem still remains.
Has anyone had this before who could offer a solution, vagrant isn't widely covered on the web yet and I cant find a reason why this is occurring.
After struggling with all the various options available on different questions, I was still facing the same problem.
Finally, I did a
vagrant destroy
followed by
vagrant up
And I have my system working again.
Note: If you too have the habit to directly switch off your computer, you might face this problem soon! In your vagrant terminal (vagrant ssh), always go for a:
sudo shutdown -h now
or you can just type
vagrant halt
after you logout from your ssh.
PS: For those of you who might be afraid to lose your data/code/anything during vagrant destroy, you might relax! I was hesitant using the command, but as per the documentation, all it does is:
This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process. After running this command, your computer should be left at a clean state, as if you never created the guest machine in the first place.
This implies that your code will remain intact, and the next vagrant up would lead you to the same state as you left, only with the problem solved now. :)
Instead of destroying the image. I was able to fix the issue by first adding the following lines/uncomment inside Vagrantfile to turn the virtualbox gui on.
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = "1024"
end
Then I did vagrant up to reboot it. It started both command line and virtualbox gui. Gui asked me for SSH passphrase (which I set up when I was playing with ssh last time I was logged into the machine) and I was able to login. Later I powered off the image. Later I removed above lines for gui from Vagrantfile and it was still booting fine.

Connection timeout when starting Vagrant

I am trying to use Laravel Homestead on 64-bit Ubuntu 12.04 machine. I have installed Vagrant 1.6.5 and Oracle's VM virtual box 4.3.1.
When I am starting my Vagrant by using vagrant up command, it is giving me following error:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: A newer version of the box 'laravel/homestead' is available! You currently
==> default: have version '0.1.6'. The latest is version '0.2.0'. Run
==> default: `vagrant box update` to update.
==> 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: 80 => 8000 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (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: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
How to resolve this?
Had this issue for more than one week, Tried all solutions,
1. giving SSH username and password
2. Enabling GUI interface
Finally got the solution from this link
Add the Google public DNS IP to your Wifi Settings
under Network Preferences > Wifi > Advanced > DNS add IP Address 8.8.8.8
Worked perfectly. May be this can help someone who have problem in Mac. Thanks Skovmand.
And also make sure that you've latest Vagrant and VMWare

Resources