Laravel/Homestead - OSX - Vagrant Connection Timeout - macos

Problem
I am attempting to get Laravel Homestead working on my Mac Book Air. I have followed the instruction from http://laravel.com/docs/4.2/homestead but when I vagrant up I get stopped on: default: Warning: Connection timeout. Retrying... After I vagrant up fails because of connection timeout i can not vagrant provision or vagrant reload. I can however vagrant ssh into the machine and I can ping google from the machine. I can also spin up other vagrant boxes on my machine with no problem...
Information:
OS: OSX 10.10 (Yosemite)
Vagrant: 1.6.5
Virtual Box: 4.3.16
I have searched around on the internet and found a few “solutions” that has not worked for me:
Turn on “Hardware Virtualisation”. This is automatically turned on in ant instal based mac computer.
Start VM with v.gui = true. This start the VM with with the server terminal in view. Nothing is throwing any errors. and this did not solve the problem
More Debugging Steps:
Tried just booting up the vagrant box laravel/homestead by running vagrant init laravel/homestead then vagrant up. This still gives the same problem.
I have tried vagrant box laravel/homestead versions 0.1.7, 0.1.8 and 0.1.9(newest) All giving the same problem.

Did you let the vagrant output continue after "default: Warning: Connection timeout. Retrying..." Vagrant may actually be retrying the connection. Sounds like you're exiting out when you see that error instead of waiting for vagrant to finish with an actual exit error

A year old post and maybe you have solved it, but I was struggling with it recently and just managed to solve it.
I had the same problem everything was configured correctly but there was no way to ping 192.168.10.10.
In my case it seemed that net-tools package wasn't installed in my distro (Archlinux) by default so installing it allowed me to connect.
See the relevant section at Archlinux Wiki.
Hope that helps someone.

Related

VirtualBox shared folders stopped working

For many months I had been successfully using VirtualBox 5.xx.xx along with Vagrant 2.xx (don't remember the rest of the version numbers) on a Windows 10 host with Ubuntu 16 guest. At some point in the past six weeks, on vagrant up Guest Additions started being reported as different versions on the host and guest, and changes I would make to my synced files from the Windows side would not always be realized on Ubuntu. To try to fix this problem, I upgraded Vagrant to the latest version, and then tried upgrading and downgrading VirtualBox from as low as 5.0.18 (generates an error on vagrant up) to as high as the latest (6.0.4). Trying 5.2.24 and 5.2.26 yielded messages upon Vagrant startup stating that Guest Additions on the host were reported as 5.0.18 but on the guest were reported as 5.2.24 (or .26). Then a final startup message stated that the Virtualbox version was at 5.2 and the Guest Additions version was 5.1.30 - so at times I've gotten a total of three different versions of Guest Additions reported. I have the vagrant-vbguest plugin installed. I downloaded the matching Guest Additions ISO version for the VBox versions, and loaded the Guest Additions ISO into the virtual optical drive in VirtualBox (as well as specified config.vbguest.iso_path = "VBoxGuestAdditions_5.x.x.iso" in my Vagrantfile.
My Vagrant/VirtualBox setup had been working fine for probably at last a year, and I never wanted to "upgrade" because I've been through this mess before when "upgrading" to newer versions. From too-long searching online, I'm pretty sure this problem has been caused from doing dist-upgrade to Ubuntu (which I do regularly) because I've changed nothing in the Vagrant/VBox setup for a long time. I was hoping that the upgrade to the latest VirtualBox (6) would solve the problem but, sadly, this version is even worse - Ubuntu cranks SLOWLY through the boot process, and it's been taking so long that I haven't even let it finish after trying several times.
It would be great to see if this latest VirtualBox 6 would solve the problem, so maybe someone has an idea about why that would be so slow (I have an 8 core 16Gb machine, and I've assigned 4 cores and plenty of RAM to VBox - and it starts up fine under 5.2.xx).
The vagrant up output:
SSH username: vagrant
SSH auth method: private key
Warning: Connection reset. Retrying...
default: Machine booted and ready! Got different reports about
installed GuestAdditions version: Virtualbox on your host claims:
5.0.18 VBoxService inside the vm claims: 5.2.26 Going on, assuming VBoxService is correct...
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.0.18 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.0.18 VBoxService inside the vm
claims: 5.2.26 Going on, assuming VBoxService is correct... bash: line
4: setup: command not found
Checking for guest additions in VM...
The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
prevent things such as shared folders from working properly. If you
see shared folder errors, please make sure the guest additions within
the virtual machine match the version of VirtualBox you have installed
on your host and reload your VM.
Guest Additions Version: 5.1.30
VirtualBox Version: 5.2 The following SSH command responded with a
non-zero exit status. Vagrant assumes that this means the command
failed!
After many hours of searching and trying different suggestions, the following is what solved the problem:
downloaded the latest unofficial release build of VirtualBox (in my case 5.2.27) and installed it
Placed the following in my Vagrantfile: config.vbguest.iso_path = "https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.2.27-129578.iso"
Ran vagrant up
Ubuntu booted OK, but on the host side Vagrant was displaying an error message something like this:
Failed to mount folders in Linux guest. This is usually because the
"vboxsf" file system is not available.
So next, on the booted Ubuntu guest:
sudo apt autoremove to clean up the Linux headers
And then:
Run vagrant vbguest from the host
vbguest then went through a process of uninstalling the existing Guest Additions and installing VBoxGuestAdditions_5.2.27 from the config.vbguest.iso_path.
To verify that Guest Additions are installed properly, run vagrant vbguest --status (or just vagrant vbguest again). Both commands returned:
[default] GuestAdditions 5.2.27 running --- OK.
The above operations resulted in a folder named VBoxGuestAdditions-5.2.27 being placed within the /opt folder. This VBoxGuestAdditions-5.2.27 folder has seven subfolders, two files (uninstall.sh and routines.sh) and a LICENSE file. I can find no documentation about vagrant-vbguest placing the installed items into the /opt folder, but I did find a small mention here.
I suspect that this process would have worked for any of the 5.2.xx versions (available here), but I had already installed 5.2.27 so went ahead with that.
I had he same issue after updating laravel/homestead box to v7.2.1 . This blog post helped me solve it.
in summary, this is what you have to do:
navigate to the directory that contains your Vagrantfile and run vagrant plugin install vagrant-vbguest
The first time I executed the command, it disabled my WiFi adapter and the installation failed. If this happens, re-activate it back and rerun the command.
when it is done installing, run vagrant up to boot the VM. It will update the Guest Additions

Vagrant box add - Failed to connect to cloud-images.ubuntu.com port 443: Timed out

I'm new to Vagrant. Using this vagrant add box command:
vagrant add box ubuntu/trusty64
to add this box ubuntu/trusty64, I'm getting this error:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Failed to connect to cloud-images.ubuntu.com port 443: Timed out
Reinstalling Vagrant didn't work.
vagrant -version output: Vagrant 2.1.4
OS: Windows 10 Enterprise
first initialize the vagrant
$ vagrant init ubuntu/trusty64
$ vagrant up
Reinstalling VirtualBox fixed it for me. To be on safe side I removed Vagrant, Git Bash and VirtualBox and all references. Reinstalled all of these using default settings. Issue doesn't occur anymore.

Vagrant laravel/homestead shared folders not mounting after 2.1.0 update

I have scoured the internet up and down for this issue and always consider asking here a last resort. That being said if this has been asked and solved before please point me in the right direction.
I am using Virtualbox 5.1.22 on macOS Sierra 10.12.5 with vagrant version 1.9.6
Yesterday I upgraded my homestead box from version 2.0.0 to 2.1.0. I only upgraded after running vagrant up and it did its thing and was fine until I come in today and turn my machine one and try booting up the vagrant machine again. I get the following error at the end of the normal stuff:
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=900,gid=900 vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
I have tried vagrant reload, vagrant halt and then vagrant up, restarting the machine and re-running, vagrant reload --provision
Any help is greatly appreciated.
Thanks.
EDIT: Why the downvote? This seems like a perfectly reasonable question?
The box comes with VirtualBox Guest Addition for a given version of VirtualBox, which is not the one you're running on your host.
what you need to do is update the Guest Additions in your guest VM to the same version of VirtualBox that you run on your host machine.
The easy way as mentioned in my comments is to use the vagrant vbguest plugin, it will compare the version from your host and guest software and will automatically aligned if needed. I find it pretty convenient and there are options to disable the update if you need.
In case you do not want to run an additional plugin, you can make the update on the guest VM manually.
You will need to download the Guest Addition for the same version of your VirtualBox (5.1.22 in your case) and follow the instructions to install
So I found and installed this: https://github.com/dotless-de/vagrant-vbguest
I have no idea why I need a plugin now when it was working just fine before updating but hey...it works.

VirtualBox/Vagrant stopped working after Windows 10 Creators Update

I was happily using Vagrant with VirtualBox for my laravel projects (Homestead) but after the Creators Update for Windows 10, VirtualBox stopped working - vagrant up was not throwing any errors and I was even able to vagrant ssh successfully but my web projects were unreachable from the browser.
Initially I was using VirtualBox v.5.1.14 but decided to update to the latest (which is v.5.1.22) - no luck whatsoever, so after reading the answers from this thread I've downgraded to v.5.0.38
Now when I try to vagrant up this error is shown:
vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Resuming suspended VM...
==> homestead-7: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "e5ac5ef8-07fa-412f-b59c-bfd745db047e", "--type", "headless"]
Stderr: VBoxManage.exe: error: Failed to load unit 'cpum' (VERR_INVALID_FLAGS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
p.s. I've already set Host-Only Network Adapter through preferences in VirtualBox
What I did to resolve the issue was to "plug off" my virtual machine's state using discard, hoping not to lose any information... Now I'm on VirtualBox v.5.1.14 and will stick with it until all things work.
I had to update to Virtualbox Version 5.2 to get my boxes running again.
and also need to reinstall git for windows 2.15.1.2-64 bit and select the option "use windows default console" (cmd.exe) instead of "MinTTY"
With MinTTY the command :
vagrant ssh
will not show the bash command line.
using windows default Console worked.
see more possibe workarounds to this piont also in this git issue
My Working env:
- Windows 10 - 1709 - Build 16299.125
- vagrant 2.0.1
- virtualbox 5.2.0
- git for windows 2.15.1.2. 64 bit
Turning off Hyper-V solved my problem.
Solution:
Control Panel -> Turn Windows Feature on or Off -> Uncheck Hyper-V
I had the same problem. My vagrant up stopped working after the Windows Fall Creators Update (1709). It worked after I turned off Hyper-V.
Current Working Environment:
- Windows 10 (1709)
- Vagrant 1.9.7
- VirtualBox 5.1.32

vagrant up throwing error after configuring and enabling network interfaces

I have installed vagrant and virtual-box added homestead box on it now i am executing a command from terminal "vagrant up" which throws error here is snapshot:
I have installed virtual-box is 5.0 and vagrant is 1.8.1. I am totally stuck here. I don't know what should i do now? I am new to unubtu 16.04. Any kind of help will be appreciated.

Resources