Installing the Geant4 virtual machine
The Geant4 Virtual Machine provides a compiler, the extra software which Geant4 requires including a large set of visualisation libraries, and a fully working Geant4 system.
It avoids the effort to find and install the key pieces needed to create an installation on your own system, which varies depending on the OS, its version and many other factors.
This is the only method that we will support for this course.
The following information is a summary of the key steps. Further details can be found at the CENBG home of the Geant4 Virtual Machine.
Step 1: Ensure that your machine can run the Geant4 Virtual Machine
Make sure that your computer meets the minimum requirements:
- Windows or Linux users : desktop or laptop PC running Windows or Linux with a virtualization software installed
- Mac users : desktop or laptop Mac running Mac OS with a virtualization software installed
- 20 GB of free disk space available
- at least 4 GB of RAM available for use on the PC or Mac
Step 2: Obtain a Virtual Machine 'player'
There is a choice of Virtual machine host software:
- The host software (player) from VMware, Inc is our recommendation:
- On Windows and Linux the Player is free Workstation Player and can find be found for download and evaluation
- On Macintosh VMware Fusion has a download for evaluation, but is a commercial product (after the evaluation period of 30 days, a license must be purchased to keep using it).
- The alternative player is the free Virtual Box open source software available from Virtual Box software - using different download files (see below).
Step 3: Obtain the Geant4 virtual machine
Obtain the file with the Virtual machine which corresponds to your player, and uncompress it:
- Download the corresponding file with the Geant4 Virtual Machine for your player. Be careful as the files that contain the VM work are specific to either Virtual Box or VMware (you cannot use the VM files for one player with the other player). Note that the VM file is large (4.4 GBytes), so it can take a long time to download, depending on your network bandwidth. Choose either the FR or US keyboard version, according to your system.
- The VMware version can be downloaded directly at:
- ftp://ftp.cenbg.in2p3.fr/info/Vmware/geant4.10.05/VmWare/
- The VirtualBox version can be downloaded at:
- ftp://ftp.cenbg.in2p3.fr/info/Vmware/geant4.10.05/VirtualBox/
- The VMware version can be downloaded directly at:
- For more information see http://geant4.in2p3.fr/spip.php?rubrique8
Step 4: Uncompressing
-
You need software which can un-compress '7z' files.
-
For Linux and Windows these are available at http://www.7-zip.org/
- On Macintosh you can use either The Unarchiver (free) or Rar-7zExtractor (not free).
- There are many other choices, as popular compressors such as WinZip
- On Linux there are several other archivers available, as was documented in a article on Geek Stuff
-
Step 5: Opening the Virtual Machine
-
Use the files you downloaded to start a Virtual Machine with Geant4:
-
Uncompress the archive G4-10.05-CentOS7_en.7z choose a location you remember, e.g. Downloads or /Users/my-username/VirtualMachines/G4-10.05-CentOS7-VMware (or VirtualBox)
- Check that you can find the uncompressed files: for VMware this should be
G4-10.05_us.vbox <----- the key file to open G4-10.05-CentOS7_us-disk1.vmdk Logs
or for Virtual BoxCENBG-G4-CentOS7 64-bit.vmx <----- important CENBG-G4-CentOS7 64-bit.vmxf \ CENBG-G4-CentOS7 64-bit0-Home.vmdk CENBG-G4-CentOS7 64-bit0-Soft.vmdk ...
- Locate the file Open that file using the corresponding program - i.e. for the VMware case use VMware Workstation (on Linux or Windows), or VMware Fusion (on Mac).
- G4-10.05_us.vbox if you are using Virtual Box
- G4-10.5-CentOS7_us.vmx if you are using VMware
- Note that you may encounter issues on opening this file:
- on Windows systems typically you will need to enable features needed for virtualisation in the BIOS. This is needed if you encounter a message such as "Intel Vtx is disabled..."
- on recent versions of MacOS like High Sierra, you may get a message like: "Could not open /dev/vmmon: No such file or directory. Please make sure that the kernel module 'vmmon' is loaded." This can be fixed by Opening the "Security and Privacy" dialog of "System Preferences", and from "General" tab looking for the message "System software from developer "VMware, Inc." was blocked from loading." If you click the Allow button, it should resolve the issue (for further details about this topic, please see the item on stackexchange).
-
- Opening a Terminal window:
- Open a Terminal window using the menu Application menu and you can find Terminal in 'Favourites' submenu (as shown) or the 'System' submenu.
- You should see a new window, ready to accept your commands
- It is running a command shell called 'tcsh'
- You are now ready to find the software installed, including Geant4 (task 0).
- The Geant4 installation is located under the path defined for the $G4COMP environment variable; example for building and running one of the Geant4 examples (B1):
mkdir $HOME/geant4/work/buildB1 cd $HOME/geant4/work/buildB1 cmake -DGeant4_DIR=$G4COMP $G4EXAMPLES/basic/B1 make -j4 ./exampleB1
- DONE
We thank CENBG and CNRS for providing the Geant4 Virtual Machine, which is described in the article Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178, for updating it regularly and promptly and in time for this tutorial. and for their helpful collaboration.