Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vanillasoftware's avatar

Can't get Vagrant to boot up

Hi, I'm using the Laracast tutorial https://laracasts.com/lessons/get-off-mamp-now to setup Vagrant/Virtualbox and a LAMP stack on my Mac OSX Yosemite.

Here is the log when I run "lamp" from Terminal.

Bradleys-iMac:Development bradley$ lamp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   196  100   196    0     0    304      0 --:--:-- --:--:-- --:--:--   304
100   991  100   991    0     0    539      0  0:00:01  0:00:01 --:--:--  1145
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   197  100   197    0     0    369      0 --:--:-- --:--:-- --:--:--   368
100   460  100   460    0     0    374      0  0:00:01  0:00:01 --:--:--  449k
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: Development_default_1432196370733_17603
==> 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: 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: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /var/www => /Users/bradley/Dropbox/Development
==> default: Running provisioner: shell...
    default: Running: /var/folders/2c/0w62hkm90qjcvw89fhkmyph00000gn/T/vagrant-shell20150521-2545-1u2n2pm.sh
==> default: stdin: is not a tty
==> default: Ign http://security.ubuntu.com precise-security InRelease
Bradleys-iMac:Development bradley$ 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: 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: Connection refused. Retrying...
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.

As you can see it will not boot up. Please could someone help!

0 likes
23 replies
bashy's avatar

Does it boot in VirtualBox alone?

vanillasoftware's avatar

Hi bashy,

No it doesn't boot in VirtualBox alone either. It just hangs on the login page and then says "aborted"...

bashy's avatar

Sounds your like VM is corrupt or not functioning correctly. I'd reinstall it.

vanillasoftware's avatar

I've tried reinstalling both VirtualBox and Vagrant about 10 times now but get the same thing every time. Does anyone have a good step by step guide of installing a LAMP setup on Yosemite? I've tried following the Laracast mentioned in my original post but getting this error each time.

vanillasoftware's avatar

Thanks, I tried Vaprobash, but still no luck. Here's the log. The box seems to get added but the remote connection cannot be made...

Bradleys-iMac:~ bradley$ vagrant -v
Vagrant 1.7.2
Bradleys-iMac:~ bradley$ cd /Users/bradley/Dropbox/Development
Bradleys-iMac:Development bradley$ curl -L http://bit.ly/vaprobash > Vagrantfile
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   148  100   148    0     0    263      0 --:--:-- --:--:-- --:--:--   263
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100 11272  100 11272    0     0   3017      0  0:00:03  0:00:03 --:--:-- 11840
Bradleys-iMac:Development bradley$ vagrant up
Bringing machine 'Vaprobash' up with 'virtualbox' provider...
==> Vaprobash: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    Vaprobash: Box Provider: virtualbox
    Vaprobash: Box Version: >= 0
==> Vaprobash: Loading metadata for box 'ubuntu/trusty64'
    Vaprobash: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> Vaprobash: Adding box 'ubuntu/trusty64' (v20150512.0.1) for provider: virtualbox
    Vaprobash: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20150512.0.1/providers/virtualbox.box
==> Vaprobash: Successfully added box 'ubuntu/trusty64' (v20150512.0.1) for 'virtualbox'!
==> Vaprobash: Importing base box 'ubuntu/trusty64'...
==> Vaprobash: Matching MAC address for NAT networking...
==> Vaprobash: Checking if box 'ubuntu/trusty64' is up to date...
==> Vaprobash: Setting the name of the VM: Vaprobash
==> Vaprobash: Clearing any previously set forwarded ports...
==> Vaprobash: Clearing any previously set network interfaces...
==> Vaprobash: Preparing network interfaces based on configuration...
    Vaprobash: Adapter 1: nat
    Vaprobash: Adapter 2: hostonly
==> Vaprobash: Forwarding ports...
    Vaprobash: 80 => 8000 (adapter 1)
    Vaprobash: 22 => 2222 (adapter 1)
==> Vaprobash: Running 'pre-boot' VM customizations...
==> Vaprobash: Booting VM...
==> Vaprobash: Waiting for machine to boot. This may take a few minutes...
    Vaprobash: SSH address: 127.0.0.1:2222
    Vaprobash: SSH username: vagrant
    Vaprobash: SSH auth method: private key
    Vaprobash: Warning: Remote connection disconnect. Retrying...
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.
bashy's avatar

You've confirmed you have VT-x virtualisation enabled/available on your iMac right? Sounds like it's not or you've got some problems with running any VM.

bashy's avatar

Well all Intel Macs have it available (maybe disabled though). I can't tell if this is the issue but if no VM boots, it could well be.

sysctl -a | grep machdep.cpu.features | grep VMX

vanillasoftware's avatar
Bradleys-iMac:Development bradley$ sysctl -a | grep machdep.cpu.features | grep VMX
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
jekinney's avatar

Have you tried homestead? Works amazingly easy in mac environment. I have a mac mini and had zero issues installing all three parts, virtualbox, vagrant and homestead. Editing your path file might take a few minutes. If you need help with that I can post a link to a tutorial/blog.

jekinney's avatar

By the way, looks like it can't find your ssh key. Make sure you have it set correctly. The laravel docs under homestead shows the command to set one.

bashy's avatar

@jekinney Either would work but it's something beyond the VM side of things. Not being able to even boot a VM up in VirtualBox is serious.

bashy's avatar

@jekinney You don't need an SSH key to be able to connect/login. It will fall back to password method.

You talking about this part?

default: Warning: Authentication failure. Retrying...

default: Warning: Connection refused. Retrying...

vanillasoftware's avatar

@bashy @jekinney I've just generated an SSH key - do I need to add anything to my bashrc file?

I just tried vagrant up command again and now i'm getting slightly different error:

Bringing machine 'Vaprobash' up with 'virtualbox' provider...
==> Vaprobash: Importing base box 'ubuntu/trusty64'...
==> Vaprobash: Matching MAC address for NAT networking...
==> Vaprobash: Checking if box 'ubuntu/trusty64' is up to date...
==> Vaprobash: Setting the name of the VM: Vaprobash
==> Vaprobash: Clearing any previously set forwarded ports...
==> Vaprobash: Clearing any previously set network interfaces...
==> Vaprobash: Preparing network interfaces based on configuration...
    Vaprobash: Adapter 1: nat
    Vaprobash: Adapter 2: hostonly
==> Vaprobash: Forwarding ports...
    Vaprobash: 80 => 8000 (adapter 1)
    Vaprobash: 22 => 2222 (adapter 1)
==> Vaprobash: Running 'pre-boot' VM customizations...
==> Vaprobash: Booting VM...
==> Vaprobash: Waiting for machine to boot. This may take a few minutes...
    Vaprobash: SSH address: 127.0.0.1:2222
    Vaprobash: SSH username: vagrant
    Vaprobash: SSH auth method: private key
    Vaprobash: Warning: Remote connection disconnect. Retrying...
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.```
bashy's avatar

SSH key wasn't the problem, it's the booting of the VM.

I would boot up again in VirtualBox and check the error log while it's booting.

1 like
jekinney's avatar

@bashy I noticed this in the booting output

default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.

Now it still fails around the same time, but no more going to insecure key.

bashy's avatar

Interesting but it should just replace it and carry on

Please or to participate in this conversation.