Skip to content
Sam Joseph edited this page Apr 16, 2014 · 3 revisions
  • Install VirtualBox
  • Install Vagrant

Full instructions:

  • Install vagrant from http://www.vagrantup.com/downloads.
  • mkdir vagrant_practice && cd $_ This directory will be a shared folder between the host and VM.
  • vagrant init precise32 http://files.vagrantup.com/precise32.box for a 32-bit Ubuntu 12.04
  • If vagrant command not found, log out and in.
  • They also have 64-bit. The name precise32 is just a string that maps to the base image to use in the Vagrantfile.
  • Replace the contents of the created Vagrantfile with above.
  • Copy a script called ubuntu-install.sh into the same directory. It handles install and config of what you need besides the plain box.
  • vagrant up will start up the VM, and provision it by executing ubuntu-install.sh since it is the first time.
  • After that first launch, to have it re-run provision script, start it with: vagrant up --provision, or vagrant provision
  • vagrant reload will restart the VM and pick up any changes to the Vagrantfile, can also be run with --provision
  • You can ssh into it with vagrant ssh
  • You can check the port forwarding with telnet localhost 4567 and the output should be different from hitting port 4600
  • To stop the VM, use normal Ubuntu shutdown commands in ssh, or could use vagrant halt from the host.
  • To clean up the whole thing, use vagrant destroy