Vagrant and Virtual Box keep getting set to Aborted - vagrant

I am having an issue with vagrant and virtualbox in which I am able to vagrant up fine but after a few minutes (sometimes it's 5 minutes sometimes it's an hour) my virtualbox gets set to an 'ABORTED' status. I am unsure of why this happens.
I'm using VirtualBox 5.1.28 and the most recent version of vagrant (2.0.0). I'm running macOS Sierra 10.12.6.
Below is the output of my vagrant up command. I've noticed there is a disconnect retry thing but I don't know why that is there. It is not there for my coworkers. I've done some googling already and all the people with the same problem never make it out of the disconnect retry loop.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Specific bridge 'en1: Wi-Fi (AirPort)' not found. You may be asked to specify
==> default: which network to bridge to.
==> default: Available bridged network interfaces:
1) en0: Wi-Fi (AirPort)
2) en1: Thunderbolt 1
3) en2: Thunderbolt 2
4) bridge0
5) p2p0
6) awdl0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 80 (guest) => 8080 (host) (adapter 1)
default: 3306 (guest) => 33306 (host) (adapter 1)
default: 5000 (guest) => 5000 (host) (adapter 1)
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: password
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/jdavis/hts_vagrant
default: /app/localhost/html => /Users/jdavis/projects
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script

Related

Vagrant upn "unknown state"

After running vagrant up command, I get this error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-16.04-i386'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-16.04-i386' is up to date...
==> default: Setting the name of the VM: vagrant_default_1494490054450_47471
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8000 (guest) => 8000 (host) (adapter 1)
default: 8080 (guest) => 8080 (host) (adapter 1)
default: 5000 (guest) => 5000 (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: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'unknown' 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.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
When I look at the virtualbox GUI everything seems to be fine, it's in running state and I can even log in into linux. Im running it on Windows 10 OS, Vagrant 1.9.4, VirtualBox 5.1.22
Ok, I solved the problem. I did not have virtualization enabled on my laptop.

Windows: Running vagrant as administrator not working - works normally

I've been using vagrant to run laravel/lumen as well as just other general stuff such as node js scripts. I've run into problems installing some things using npm, and it seems that a solution working for a lot of people is just running the command line (or git bash in my case) as an administrator. However when I try this and use vagrant up, I get a long list of errors. I've also tried vagrant init which gives the same errors.
Here are the errors
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' 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: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (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: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
v==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Andy McNally/Homestead
vag default: /home/vagrant/home => C:/Users/Andy McNally/home
r==> default: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always
will still run.

vagrant - The capability 'nfs_mount' could not be found

The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
Cmd
C:\var\www\cc-dev-env>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: 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: Remote connection disconnect. Retrying...
==> 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.3.36
default: VirtualBox Version: 5.0
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.100.100 cc.dev
==> default: Mounting NFS shared folders from guest...
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
I am using
Windows 10 64-bit
Vagrant 1.8.1
vagrant-hostsupdater (1.0.2)
vagrant-nfs_guest (0.1.8)
vagrant-share (1.1.5, system)
vagrant-winnfsd (1.1.0)
Of course I would like to not see this error and see the VM that I am trying to boot open.

Port forwarding on Vagrant 1.8.1

I have a vagrant installed on Windows7 PC. I have jenkins, puppet other stuff installed on my centos7 vagrant box. When I do vagrant reload
==> default: Attempting graceful 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: Forwarding ports...
default: 8082 (guest) => 8080 (host) (adapter 1)
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: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
GuestAdditions 5.0.12 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => C:/vagrant/projects/jenkins
default: /vagrant_data => C:/Devops
==> default: Machine already provisioned. Run `vagrant provision` or use the `-
provision`
==> default: flag to force provisioning. Provisioners marked to run always will
still run.
Now when I do curl -v
C:\>curl -v http://127.0.0.1:8082
* Rebuilt URL to: http://127.0.0.1:8082/
* timeout on name lookup is not supported
* Trying 127.0.0.1...
* connect to 127.0.0.1 port 8082 failed: Connection refused
* Failed to connect to 127.0.0.1 port 8082: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 8082: Connection refused
Needless to say http://127.0.0.1:8082 doesnt fetch anything in the browser wither. What am I missing? BTW my vagrant and virtual box 5 is running on Windows7.
Thanks in advance
R

Connection to homestead Refused

Hey I have been trying to get my homestead running but I keep getting to the error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' 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: 80 => 8000 (adapter 1)
default: 443 => 44300 (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 refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
I am running windows 10 and Virtual box 5.0.4
The error is happening right after the line 'default: SSH auth method: private key' and presents a connection refused error, so I assume it can be related to your ssh keys. Did you check if your ssh keys are set properly?
ssh-keygen -t rsa -C "you#homestead"
Try running this again and set your public and private key paths in the homestead.yaml file (make sure it points to the file properly) then try again.
If the problem persists show us your homestead.yaml file so we can try to help better :) I hope I could be of help

Resources