Problem setting

Troubleshooting

Troubleshooting: shared directory is invisible

It may happen that the /vagrant directory seems empty inside the Vagrant machine. Two steps will fix this problem. First, run

Machine> sudo /etc/init.d/vboxadd setup

inside the Vagrant machine. Second, log out and run

Terminal> sudo vagrant reload

outside the Vagrant machine. Then do vagrant ssh and take an ls /vagrant to see that the files in the project directory (e.g., Vagrantfile and the Vagrant box) are visible.

Troubleshooting: "couldn't connect to display ..."

This error message points to the problem that X11 graphics on the Vagrant machine cannot be shown on the host's screen. Inserting the line config.ssh.forward_x11 = true in the file Vagrantfile in the project directory and starting X11 on the host are the two steps that will fix the problem. Unless you build a Vagrant box, the editing of Vagrantfile should not be required as a ready-made box was packaged with X11 forwarding (cf. the vagrant package command in the section Installing packages in a complete Vagrant machine). To start X11 on Mac, run Applications - Utilities - X11, while on Windows, go to Start - All Programs - Cygwin-X - XWin Server. Log out of the Vagrant machine (Ctrl-D) and in again (vagrant ssh).

Troubleshooting: Internet is not reachable

A test if Internet is reachable is to run a ping command inside the machine, e.g.,

Machine> ping us.ubuntu.archive.com

A hanging command indicates that Internet is not reachable. Log out of the box, run vagrant reload, and vagrant ssh. Try the ping command again.

Stopping the Vagrant machine

There are three ways to stop the virtual Vagrant machine from the host (i.e., you must be logged out by Ctrl-D from the machine):

Placing the Vagrant machine in the cloud

There are numerous free file hosting sites where a Vagrant machine can be stored and shared with others. We have found Google Drive to be a viable solution. It is free, can handle large enough files, and has flexible functionality for sharing the machine with others. A potential problem with Google Drive, Sky Drive, or Dropbox is that other computers connected to the account start to download the big Vagrant machines. To prevent such actions, click on the Google Drive icon on all machines that synchronize the account and deselect the directory where you store the Vagrant machine(s).

Using VMWare Fusion

Not written yet.

Documentation of Vagrant

Appendix: Condensed instructions for students

Say you want distribute a complete Vagrant machine with the URL

http://some.where.net/path/to/course.box

Here is the need-know-information for users:

Troubleshooting: shared directory is invisible

It may happen that the /vagrant directory seems empty inside the Vagrant machine. Two steps will fix this problem. First, run

Machine> sudo /etc/init.d/vboxadd setup

inside the Vagrant machine. Second, log out and run

Terminal> sudo vagrant reload

outside the Vagrant machine. Then do vagrant ssh and take an ls /vagrant to see that the files in the project directory (e.g., Vagrantfile and the Vagrant box) are visible.

Troubleshooting: "couldn't connect to display ..."

This error message points to the problem that X11 graphics cannot be shown on the host. It should be sufficient to start X11 on the host, see Step 4 above.

Troubleshooting: Internet is not reachable

A test if Internet is reachable is to run a ping command inside the machine, e.g.,

Machine> ping us.ubuntu.archive.com

A hanging command indicates that Internet is not reachable. Log out of the box, run vagrant reload, and vagrant ssh. Try the ping command again.