Description

This twiki describes the steps you will need to perform to install Geant4 appliance. This appliance can be used also for other tasks. It is particularly well suited for tutorials and courses that require ROOT and/or Geant4 software. It has been used also with PYTHIA (but software is now provided in this case).

Introduction

A virtual machine appliance is a complete operating system that runs in a virtual machine; i.e. a computer program that can simulate a real computer.

CERNVM is a CERN project to build appliances for HEP applications. A customised appliance has been prepared with the latest version of Geant4 and chosen additional software. The virtual machine contains: A Linux operating system A (minimal) GNOME desktop environment A pre-installed release of Geant4 9.3 A pre-installed release of ROOT 5.26

Using a Virtual Machine works best on a laptop with more memory ( 2 GBytes or more is recommended in most cases.) At least 8 GBytes of hard disk space are necessary during installation. In addition your computer must support files bigger than 2GBytes (for example old windows installations cannot handle VM ware image disks).

Please note that there is no browser inside this virtual machine - for details see the note below.

A support forum to help with installation has been opened at this address: http://etherpad.com/f8QOOiXKVn

Virtualization software

To run the CernVM you need a virtualization software. We have tested the appliance with:
  • VMware Version 3.0 for windows (free with registration) - site
  • VMware Version 3.0 for linux (free with registration)
  • VirtualBox Version 3.1.2 for Mac OS X (free) - site, download
  • VMware Fusion 3.0.1 for Mac OS X (commercial)

Please download the necessary virtualization software (from the original web site).

The Geant4 appliance has been built for these virtualization software in two flavours: 32 bits (labelled x86) and 64 bits (labelled x86_64).

Important Note: The CERN Geant4 tutorial will use the 32 bit appliance. We require that you download the 32 bits appliance (labelled x86).

Given the results of our tests we recommend the following:

  • If you have a windows computer, use VMware Player 3. Both 32 and 64 bits appliances
  • If you have linux computer, use VMware Player 3 with 32 bits appliance
  • If you have a Mac computer, use VirtualBox 3.1.2 with 32 bits appliance or VMware Player 3.0.1 with 23 bits appliance
Consult the Known Issues section for more details

Running the appliance

This paragraph describes how to install the Geant4 appliance and how to run some simple tests to check that everything works.

Download

  • Download latest version from the Geant4 VM location: http://rbuilder.cern.ch/project/geant4-app/ (or follow direct links below):
    • Select, on the left column the latest build available: in "Recent Releases" menu select "Geant4 Appliance Version 9.3"
    • Pay attention to use the version with the correct title - e.g. "Geant4 Appliance (VirtualBox)" in the left column. The type of file (e.g. "VMware (R) Image") is not always a reliable indicator!
    • Prefer a x86 (32 bits) over a x86_64 (64 bits) image
  • Unzip and untar the archive
    • You can use any archiving utility, e.g.
      • winzip, 7-zip on Windows
      • Archive Utility or Stuffit Expander on MacOS X.
  • Direct links (the easy way):

Installation

  1. VMware (Fusion on Mac, Workstation on Linux and Windows, Player on Linux and Windows, Server on Linux):
    • Download, unzip and unarchive
    • Important Note: if you are asked to upgrade to latest version of VMware tools, answer NO.
    • You must make the following revisions in order for the Virtual machine to work correctly
    • [Open]
      • [Browse]
        • [geant4-app-1.4.0-xxx.vmx]
          • [Open]
            • [Edit Virtual Machine Settings]
              • Memory: 1024 MB
              • Ethernet 1: NAT This is very important and mandatory, the VM will not work if done differently!
              • Processors: 1 or 2
    • Under options: Shared Folders : select folder to be shared with host machine
    • Check the following screenshots and verify the setup is as the following:

vmware2.png
VMware Setup: Hardware settings
vmware1.png
VMware Setup: Options settings

    • [Start up this guest operating system]
    • If everything worked correctly you should see the following login, please note the displayed web-address:

login.png
Virtual Machine login, note the web address

    • Use your (real) computer browser to open URL shown on the console screen
      • Important note: if the address is of the form 10.5.6.* there is a problem with VMware, shut down the appliance and restart VMware, restart the appliance. On windows machine if the problem persists check that there is no windows firewall blocking WMware and/or you do not have any proxy server in your browser. See http://etherpad.com/f8QOOiXKVn for more details.
      • The following should appear in the browser

web.png
Web management utility, first login

      • In this web page, login with user: admin and password: password and proceed in changing management tool password
      • Create an account with which you will login in the virtual machine:
        • Select a username, use /bin/bash as shell and set a password

user.png
Virtual Machine web configuration, creating user account

        • In the following window: Vritual Organization Name: None, CernVM edition: Desktop
        • Select screen resolution and keyboard (usually it is enough to accept suggested values) and select Start X at boot

final.png
Virtual Machine web configuration, user preferences

    • Proceed, VM will do a reboot. Note: do not close the web browser and VMware player application until reboot process is completed.
    • After reboot, login to console or ssh to your VM

  1. VirtualBox (3.1.2):
    • See screenshots of VMware instructions
    • Download, unzip and unarchive
    • Start VirtualBox
    • [New]
      • [Next]
        • Name: Geant4 1.4.0
        • Operating System: Linux
        • Version: Linux 2.6 or Linux 2.6 (64 bit)
        • [Next]
        • Base Memory Size: 1024
        • [Next]
        • Use existing hard disk [YES]
        • [Folder +]
          • Add [YES]
          • Select geant4-app-1.4.0-xxxx.vmdk
          • [Open]
          • [geant4-app-1.4.0-xxxx.vmdk]
          • [Select]
          • [Next]
          • [Finish]
    • [Settings]
      • System - Motherboard : Enable ACPI [YES] ; Enable IO APIC [YES, required for SMP] ; important: do not select enable EFI otherwise VM will not boot

vbox1.png
VirtualBox configuration: System

      • System - Processor: 1-32 CPUs ; Enable PAE/NX [YES, for 32 bit guest using more than 3GB of memory, NO otherwise] ; Acceleration: Enable VT-x/AMD-V [YES] ; Enable Nested Paging [YES, if CPU suppors it]
      • Display: Video Memeory: 32 MB [YES] ; Enable acceleration [NO/YES ]
      • Storage: [CD/DVD-ROM] ; Mount CD/DVD Drive [YES] ; ISO Image File [YES] ; Select [!VBoxGuestAdditions.iso]
        • The step above regarding VBoxGuestAdditions.iso is mandatory: if you do not do it, the installation process will not succeed (X server does not start).
        • If VBoxGuestAdditions.iso is not available in the menu (first time you run VirtualBox) do the following:
          • Open a Terminal and issue: cp /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso Desktop/
          • Click on the [OpenFolder] icon on the right of the [CD/DVD Device] menu
          • Click [Add] button, select Desktop folder and then [VBoxGuestAdditions.iso] file
      • Check that no additional drive is present: if you have a third driver (a second CD/DVD drive) remove it. Cross check with screenshots below that everything is exactly as it should

vbox4.png
VirtualBox configuration: Storage

      • Network: [Adapter 1]
        • Enable Network Adapter [YES] ; Adapter Type: Intel PRO/1000 MT Desktop ; Attached to: NAT This is very important and mandatory, the VM will not work if this is not done!
      • Network: [Adapter 2]
        • Enable Network Adapter [YES] ; Adapter Type: Intel PRO/1000 MT Desktop ; Attached to: Host-only Adapter ; Name: vboxnet0

vbox2.png
VirtualBox configuration: Network Adapter 1
vbox3.png
VirtualBox configuration: Network Adapter 2

      • Shared Folders : [Folder+] ; [Folder Path] select your home folder; [Other] ; [Select folder] ; [OK]
      • Check the following screenshot to verify that your configuration matches what is expected, note the two network card and their type

vbox.png
VirtualBox configuration: check that your configuration is exactly like this one

    • [Start up this guest operating system]
    • Follow instructions given for VMware

  • VMware Fusion 3.0.1
    • Important Note: if you are asked to upgrade to latest version of VMware tools, answer NO.
    • For the rest of installation process follow instructions from VMware Player for windows

A note about browsing the web

You probably noticed that the appliance does not provide a web browser. You still have access to wget to get files from the web, but the recommended way to download files from the web and put them in the appliance is to use the mechanism of the shared folder.

A shared folder is a directory in your host machine (for example your home directory) that is visible, as an external disk, on your appliance.

In this way:

  1. You can copy files on your home directory directly from the appliance
  2. You can download files with your host machine browser and share them with your appliance
  3. You do not need a big disk space on your appliance: put big files in your shared folder

Sharing files with host computer

It is possible to create a shared folder on your physical machine that it will be visible in appliance as a device. Follow installation instructions to configure use of shared folders. When you start the virtual machine you will need to mount the shared folder as it is a physical device.
    • VMware Fusion (MAC) / VMware Player 3 (WIN):
      sudo mount -t vmhgfs .host:/ /mnt/hgfs
    • VirtualBox (MAC):
      sudo mkdir /mnt/sharedfolder
      sudo mount -t vboxsf myfolder /mnt/sharedfolder
      myfolder is the name of the shared folder on host machine.

Testing

To check that the appliances work we performed a set of tests. All of them require the $G4WORKDIR directory to be created.

What we tested

You can check your VM repeating yourself test 1 and 2.

After starting CERNVM the following tests have been performed:

  1. example novice N01: basic functionality test
    • cd $G4WORKDIR
    • cp -r $G4INSTALL/examples/novice/N01 .
    • cd N01
    • gmake
    • exampleN01
  2. example novice N03: graphic display with OGLIX and OGLIQt drivers
    • cd $WORKDIR
    • cp -r $G4INSTALL/examples/novice/N03 .
    • cd N03
    • gmake
    • exampleN03
      • Idle> /run/beamOn 1
      • Idle> exit
    • unset G4UI_USE_TCSH
    • unset G4UI_USE_XM
    • Edit vis.mac and change /vis/open OGLIX to /vis/open OGLIQt
    • touch exampleN03.cc
    • gmake
    • exampleN03
      • Idle> /run/beamOn 1
      • test mouse functionalities
      • Idle> exit
  3. MC-PAD task2 example: SVN and ROOT plus OLIQt driver ONLY FOR Geant4 COLLABORATION MEMBERS
    • works only if a valid SVN account is available
    • svn co https://svn.cern.ch/reps/g4course2010
    • cd g4course2010/task2
    • gmake
    • task2
      • Idle> /run/beamOn 10
      • Idle> exit
    • ln -s tree_run0.root ntuple.root
    • root show.C
  4. verify sharedfolder mechanism

Known issues

Please report any new issue to: Andrea Dotti.

  • If after booting up the appliance the management web address has the format: 10.5.6.* and you cannot open the management website it means that the DHCP server of the virtualization software is not working. The only (known) solution to this problem is to restart the virtualization software.
  • x86 appliance (32bits)
    • VMware Player 3 (WIN): all tests passed
    • VirtualBox 3.1.2 (MAC): all tests passed
    • VMware Player 3 (LINUX): all tests passed
    • VMware Fusion 3.0.1 (MAC): all tests passed
  • x86_64 appliance (64 bits)
    • Not confirmed: in old versions of the appliance it was necessary to modify the .vmx file and add the line: ethernet0.virtualDev = "e1000". Try this if you have problems with network connectivity.
    • VMware Player 3 (WIN): all tests passed
    • VirtualBox 3.1.2 (MAC): With Qt extensions, mouse wheel (if present, used to zoomtask2) does not work.
    • VMware Player 3 (LINUX): 64 bits appliance is not supported on player running on a SLC5 machine.
    • VMware Fusion 3.0.1 (MAC): all tests passed

#References 1. CernVM virtual machine

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng final.png r1 manage 197.4 K 2010-02-05 - 17:36 AndreaDotti  
PNGpng login.png r1 manage 39.1 K 2010-02-05 - 13:58 AndreaDotti  
PNGpng user.png r1 manage 83.7 K 2010-02-05 - 17:38 AndreaDotti  
PNGpng vbox.png r1 manage 164.5 K 2010-02-09 - 10:00 AndreaDotti  
PNGpng vbox1.png r1 manage 67.6 K 2010-02-09 - 10:16 AndreaDotti  
PNGpng vbox2.png r1 manage 70.2 K 2010-02-09 - 10:17 AndreaDotti  
PNGpng vbox3.png r1 manage 74.9 K 2010-02-09 - 10:18 AndreaDotti  
PNGpng vbox4.png r1 manage 64.6 K 2010-02-09 - 10:20 AndreaDotti  
PNGpng vmware1.png r1 manage 40.7 K 2010-02-09 - 12:24 AndreaDotti  
PNGpng vmware2.png r1 manage 41.1 K 2010-02-09 - 12:24 AndreaDotti  
PNGpng web.png r1 manage 66.3 K 2010-02-05 - 13:58 AndreaDotti  
Edit | Attach | Watch | Print version | History: r24 < r23 < r22 < r21 < r20 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r24 - 2010-06-16 - AndreaDotti
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Geant4 All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback