Friday, May 13, 2016

Vagrant trouble shooting

https://github.com/Varying-Vagrant-Vagrants/VVV/issues/375

1. run the sshd command

chkconfig sshd on
chkconfig --list sshd

service sshd status

2. Start a VM in the VBox GUI
what is the message
3. Check the virtualization settings in the bios 
4. May be a firewall issue
5. Check that you can ssh to localhost

From the above link:

"I see there are still some users who are experiencing this issue. So, I will attempt to summarise a list below of some possible solutions to the SSH timeout problem:
Make sure your firewall or antivirus is not blocking the program (which I doubt will happen often)
Give your vagrant machine some time for timeouts to happen. If you dont have a very fast PC / Mac, the VM will take while to boot into an SSH ready state, so timeouts will happen.
Therefore, first try to let vagrant timeout COMPLETELY before concluding that there is a fault.
If vagrant times out completely then increase the timeout limit in the vagrant file to a few min and try again.
If that still doesnt work, then try to clean boot your vagrant machine through the VirtualBox interface and enable the GUI of the machine beforehand. If the GUI doesn't show anything happening (ie. just blackscreen, no text) while it is booting, then your vagrant machine has got problems.
Destroy the entire machine through the VB interface and reinstall.
Delete the ubuntu image files in the Vagrant Images folder in the user folder and redownload and install.
Do you even have an intel processor that supports 64bit hardware virtualisation? Google it. If you do, make sure there is no setting in your Bios disabling this feature.
Disable hyper-v feature if you are running windows 7 or 8. Google how to disable.
Make sure you are running through an SSH enabled client. Use Git bash. Download: http://git-scm.com/downloads
Install a 32bit version of ubuntu like trusty32 or precise32. Just change the version in the vagrant file and reinstall vagrant in new directory.
Make sure you are using the latest vagrant and virtualbox versions.
Last resorts: Format your computer, reinstall windows and buy an intel core isomething processor.
Hope that helps.
a processor has to have HW support for virtualization in order to launch virtual machines (VM's)
Yeah I was having this same error on my Windows 7 64 bit laptop. To fix I went into the BIOS and looked for the Virtualization Settings. I made sure to enable Intel Virtualization. Once that was done and the machine rebooted I was able to 'vagrant up" with no problem.
This may not be a solution for every case, but it's worth looking into–this suggestion on SO sets thev.gui = true flag, which causes VirtualBox to open the console for the machine as it's booting. In some cases, it may be an error with the boot process that is causing the long delay.
I can confirm that on Ubuntu 14.04 the connection timeout problem with ubuntu/trusty64 virtual machine was fixed when I enabled Intel Virtualization from the BIOS.
service sshd status
what does that return
Best recommendation for me was to load it with GUI (configurable in Vagrantfile).
Logged in with vagrant:vagrant.
Checked if SSHD is running
# service sshd status (CentOs 5.3).
And then tried to run it. It gave me error:
# sudo service sshd start
/var/empty/sshd must be owned by root and not group or world-writable
I had to chown and chmod, that issue was originally introduced by me before.
Just FYI, it can be pretty helpful to simply start the VM in the VirtualBox GUI to see what the issue might be:"