18–22 Mar 2013
DESY Hamburg
Europe/Berlin timezone

Laptops and Virtual Machines

An essential part of the school will be tutorials with computer exercises. Participants are expected to bring their own laptops with an X environment. Please mark during registration if you urgently need a computer provided by DESY instead. Please note that you have to provide 8 GB of disk space and that your laptop has enough memory to 'delegate' 1 GB of RAM.

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.2.6 or later, or upgrade your existing installation.


Setup a New Virtual Machine in VirtualBox 

Once you have the program VirtualBox running you can create a new machine and later install the system used during the school. To do this, follow the instructions below (name of buttons etc. as for VirtualBox 4.2.6 on ubuntu 11.10 - small differences could arise for other systems/versions):

* Download the AC2013.iso ISO image file. We use the same image as another Analysis Centre School and you get the image from https://indico.desy.de/materialDisplay.py?materialId=2&confId=6680.

* Start VirtualBox.

* In VirtualBox, press the “New” symbol. - Assign a name to the new machine, e.g. “statistics2013”.

* Choose “Linux” as operating system and as version “Ubuntu” (NOT the 64-bit variant).

* Assign 1 GB of memory.

* Choose “Create a virtual hard drive now” and in the next step

* select “VDI (VirtualBox Disk Image)”.

* In the next choice, select that the memory should be “dynamically allocated”.

* When prompted for the location, specify the name of the NEW folder which should be put under your ~/VirtualBox VMs/ folder. It best corresponds to the name of the machine that you assigned in step 5 above (i.e. statistics2013).

* Assign 8 GB of hard-disk space.

* Press “create” and you will have a new entry in the VM menue on the left-hand side of your VirtualBox window, named “statistics”.

* Select the new VM in the left-hand side of the VirtualBox window. Then focus on the right-hand side of this window.

* In box “System”, in the “Accelerator” tab, click (enable) the two boxes for “Enable VT-x/AMD-V” and “Enable Nested Paging”

* In box “Display”, allocate 128 MB of video memory and “Enable 3D Acceleration”.

* In box “Network”, go to “advanced” and choose “paravirtualized Network (virtio-net)”.


Install the New Virtual Machine in VirtualBox

* Start the machine.

* In the window asking for the installation medium choose the ISO file AC2013.iso from its location. If asked, confirm “Start Linux Mint”. The system will boot from it the installation medium.

* Double-click on the “Install Linux-Mint” disk symbol on the VM desktop.

* It now takes about 5-25 minutes (depending on your system) to go through the process of installation on the hard disk and answering all the related questions.

* Don’t worry when you come to the point “Erase disk and install Linux MInt” - it is just the virtual disk for the machine you are erasing ;-)

* In the process, you can also provide your user name login and password for the VM. Give some reasonable names.

* At the end you have to restart. (You an simply confirm “Please remove installation media... ENTER:”)


Customising the Interaction between the Virtual Machine (guest) and Your Laptop (host)

 * Enable copy/paste between guest and host system by choosing “Devices => Shared Clipboard => Bidirectional” from the menu bar of the VirtualBox window for your VM.

* Shared folder to access files from both guestand host:
  - Choose “Devices => Shared folder” from the menu bar of the VirtualBox window for your VM,
  - select add (icon with green cross),
  - select a folder on your host, provide a name for it (e.g. “myShared” for the command below), and select 'make permanent'.
  - Then on the command line do “sudo mount -t vboxsf -o uid=1000,gid=1000 myShared /mnt”,
  - now you have read/write access to the host system folder under /mnt - but you have to redo the mount command after each reboot.
  - Remark: 1000 is the user ID of the one user you have created during installation.


Simple Tests and Further Preparations

* ROOT
  - open a terminal and try to start root
  - check whether you can open a TBrowser (e.g. typing new TBrowser)
  - note that it is ROOT 5.34.00
  - you might want to create your favourite .rootrc or .rootlogon.C
    (but please note that this might change the result of tutorials...)

* Editing
  - at least emacs, pico and vi are installed - if your favourite is missing, see below
  - configure your favourite editor such that it behaves similar to what you are used to.

* Browsing
  - firefox is installed. Add your favourite bookmarks if you like, e.g. the agenda of the school: https://indico.desy.de/conferenceOtherViews.py?view=standard&confId=6980

* Viewing postscript, pdf etc.
   - at least evince is installed - if your favourite is missing, see below.

* Configure the desktop as it is convenient for you.

* If you miss a useful program you can install it via
  sudo apt-get install <package>
  If you do not know the package of your program, just type the program name and enter on the command line - you
  might get a hint...


Trouble Shooting

* If your laptop runs Llinux and you get a warning from VirtualBox like "...The host I/O cache for at least one controller
  is disabled and the medium ... for this VM is located on an ext4 partition. There is a known Linux kernel bug which
  can lead to the corruption of the virtual disk image under these conditions. Either enable host I/O cache permanently
  in the VM settings or put the disk image and the snapshot folder onto a different file system. The host I/O cache will
  now be enabled for this medium.", then shutdown the machine and modify the virtual machine settings in the
  VirtualBoxwindow: In box “Storage”, take acre that for all controllers there is a tick mark in front of "Use host I/O
  cache".

* No further known troubles so far :-) .