10–13 Oct 2011
Freiburg
Europe/Berlin timezone

Laptops and Virtual Machines

Some part of the school will be tutorials with computer exercises. Participants are expected to bring their own laptops.

The software needed for the tutorials will be provided in the form of a Virtual Machine. To run a virtual machine you first need a  program capable of doing this for you. For the school we have chosen the program VirtualBox.

It is mandatory to prepare your laptop in advance of the school.


Installing VirtualBox

* VirtualBox is available for various platforms here, including the most commonly used versions of Linux, Mac OS X and Windows. A detailed list of supported host operating systems can be found here.

* Download the appropriate package for your architecture and operating system. If you are running Windows or Mac OS X, install it as any other "point and click" software. Details on the installation for Linux are available here.

* Please install VirtualBox version 4.1.4 or later, or upgrade your existing installation to version 4.1.4.

Running the virtual machine in VirtualBox

Once you have the program VirtualBox running you can run the school's virtual machine inside of VirtualBox. To do this, follow the instructions below (name of buttons etc. as for VirtualBox 4.1.4 on ubuntu 11.04):

* Import the school's virtual machine
  - Make sure you have about 5 GB of free disk space
  - Download the LPPP2011.ova file from ftp://ftp.desy.de/pub/school/
    (via browser or wget ftp://ftp.desy.de/pub/school/LPPP2011.ova etc.)
  - Start VirtualBox
  - Click on `File', then on `Import Appliance'
  - Click on the `Choose' button and select the .ova file you just downloaded
  - Click on `Next', then on `Import'
  - Select the (LPPP2011) virtual machine from the left panel of VirtualBox's main menu
  - Click on Network in the right panel.
  - In the `Adapter 1' tab, click on `Advanced'
  - Next to the mac address field click the green arrows symbol.
  - Observe that the mac address has changed value and press OK.

* Start the school's virtual machine and log in
  - Select the (LPPP2011) virtual machine from the left panel of VirtualBox's main menu
  - Click the start button (green arrow)
  - When the virtual machine is starting, read the information about capturing of the mouse and the keyboard
  - Wait for the machine to complete start up
  - At the login manager, select "Terascale LPPP" as login. The user name is school.
  - In the middle of the bottom panel you can choose the session type - you might want to use
    'Ubuntu Classics (No effects)' if you are not used to their new window manager.
  - Enter the password "Sch00l" (with two zeros...).

Access to the host filesystem
 
* Create a new empty directory on the host, which will be shared with the guest system
 
* In the VirtualBox window frame for your VM, select "Shared Folders" under the "Devices" menu
    (to have the Devices menu visible, make sure the virtual machine window in VirtualBox is active).
  - Click the add-button (might appear as small icon of a folder with a green cross).
  - Enter the path of the empty directory you have created on the host machine in the "Folder Path".
  - Type "hosthome" in the "Folder Name", do not leave the default!
  - Select "Make Permanent".
  - Click OK.

* In the VM's terminal window do
  sudo mount -t vboxsf -o uid=1000,gid=1000 hosthome /mnt
  Now you can access your files on your host machine inside the VM under the /mnt directory.
 
* Every time you start the VM again, you need to re-run
  sudo mount -t vboxsf -o uid=1000,gid=1000 hosthome /mnt

* If you have updated packages on the system and they include a new kernel, you have lost the VM Guest Additions including mounting the host file system. You have to reinstall the VM Guest Additions:

   - In the VirtualBox window frame of your VM, select "Install Guest Additions" under the
  "Devices" menu. This will attach an image to the virtual CD-Rom drive. 
  (To have the "Devices" menu visible, make sure the virtual machine window in VirtualBox is active.)
   - If everything goes well, ubuntu will ask to autorun the image and you only need to click twice okay.
   - Unmount the image using the context menu (right click) and reboot the VM

Keyboard Mapping
 
* Use the command "setxkbmap de" in the VM terminal to change from the standard American keyboard layout
  to a German one if needed (us gives American, es Spanish , pl Polish, se Swedish etc. )


Installed Software

* The software for the tutorials is installed below /opt/software

* In order to set up ROOT, excude the following line (needs to be done in each shell, where you want to use ROOT):
  source /opt/software/root/5.30.02/bin/thisroot.sh