This assumes that you have already installed Vagrant and run "vagrant init ..." to create the VagrantFile.

Approach #1 - Setting up by hand

  1. Provision the vagrant instance by running "vagrant up"
  2. When that is complete, connect using "vagrant ssh", and carefully perform the setup sequence as described here.  (Note the caveat about "curl" on vagrant Ubuntu ...)

Approach #2 - Using a "bootstrap" script

  1. Edit the VagrantFile, and add a line like this:

    # Provision using a script ...
    config.vm.provision :shell, :path => ""
  2. Fetch the from here and copy it to "" in the same directory as the VagrantFile.
  3. Provision the vagrant instance by running "vagrant up".
  4. Wait ...
  5. Check the output for errors.  The following messages can be ignored:

    stdin: is not a tty
    dpkg-preconfigure: unable to re-open stdin: No such file or directory

    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 13347  100 13347    0     0  12202      0  0:00:01  0:00:01 --:--:-- 15683

    Others should be investigated.

What Next?

Next step is to SSH to your newly created vagrant instance:

vagrant ssh

... and check that it is working as expected.

You have no doubt noticed that it takes a long time to go through the sequence, whether you do it by hand or using a bootstrap script.  (A lot of software needs to be downloaded and installed into the new vagrant instance, and it just takes time.)

That's OK for a once-off, but if your use-case for Vagrant involves throwing away virtuals regularly, you may want to investigate turning your freshly created virtual with Chef & Berkshelf into a Vagrant "box".  (That is Vagrant terminology for a virtual image that you can create new vagrant instances from.)