Using with Chef + GitEdit
Setting up the Vagrant machineEdit
Wait until I have time to write this :D
Using the Vagrant machineEdit
git clone --recursive <repository-path> cd <vagrant-repository> vagrant up
Vagrant failed to runEdit
Unfortunately this is quite common. You ran vagrant up and wait, but then see the error message:
[default] Failed to connect to VM! Failed to connect to VM via SSH. Please verify the VM successfully booted by looking at the VirtualBox GUI.
Fortunately this is quite easy to "fix". The problem is somewhere between VirtualBox and Vagrant. Attempt these solutions:
- Kill the running machine and run again. This can be done by using a "system monitor" application (most operating systems provide such a utility), look for a process named VBoxHeadless and terminate it. Then `vagrant up` again. 90% of the time this is all that is needed for the machine to kick off. If it doesn't work try solution 2 (more complicated) below
- Sometimes the networking service of the virtual machine doesn't come up correctly. Let the machine boot in GUI mode, then restart the networking service. Detailed instructions:
- Open the file named "Vagrantfile" in the root directory of the vagrant repository. Find the line that reads "# config.vm.boot_mode = :gui" and uncomment it so that it becomes "config.vm.boot_mode = :gui"
- Stop the virtual machine (see solution 1 above) and start it again. A console should be brought up by VirtualBox. Login with username and password "vagrant" (without quotes, of couse)
- Type sudo dhclient eth0
- (Optional) Open the Vagrantfile again and comment out the line in step 1. Next time the virtual machine will boot up in headless mode again