Using the CernVM Virtual Machine


This page aims brings together links that explain how to run the LHCb software inside the CernVM virtual machine and to document any known problems. It is not about installing the CernVM-FS filesystem as a shared software area. For that, please look at the excellent CernVM-FS deployment page maintained by the UK GridPP.


The CernVM portal contains detailed installation instructions for a variety of virtualisation products. You may also find these page useful:

Please note

CERNVM3 requires a second host only adaptor to work with Virtualbox. If you have trouble with your virtual machine, try following the instructions found here if you have not already.

LHCb Software environment

When using the graphical CernVM environment, the LHCb software setup does not always seem to run for new shells. To work around this add

if [ -f /cvmfs/ ]; then
      . /cvmfs/

To your ~/.bash_profile file.

In addition, there is a script you can source that sets up various extra settings, which you should add to your ~/.bashrc file.

if [ -f /cvmfs/ ]; then
      . /cvmfs/

If for some reason you prefer (t)csh, add

if ( { ( [ -f /cvmfs/ ] ) } ) then
 . /cvmfs/
if ( { ( [ -f /cvmfs/ ] ) } ) then
 . /cvmfs/

to your ~/.cshrc or ~/.tcshrc file.

Grid Usage

In order to use grid tools like LHCbDirac or Ganga on CernVM, you need to enable the Grid UI options in the CernVM settings. In the web interface navigate to the CernVM -> Preferences section and in the CernVM Groups and Repositories section make sure grid is in your list of selected repositories.

You will of course need to copy your grid certificate to your CernVM instance, under ~/.globus, as per any other linux site. More instructions on this are available here.

In your home directory, you should create a file ~/.dirac.cfg in your home directory on the virtual machine with the following content

  Site =
You may change the country if you like. It will affect the location where a file is retrieved from if available in more than one place.


  • If you have problems with your grid certificate not authenticating and you have followed all the usual steps try starting ganga and try:
  • If you have problems downloading files from the grid, but otherwise the internet and your grid proxy work inside the VM, you might need to change the type of networking used by your virtualizing software. For example, in VirtualBox the default NAT mode did not work, and when using dirac-dms-get-file caused an error including the message GSS Major Status: Unexpected Gatekeeper or Service Name. Switching to the "NAT Network" mode worked. You can create a "NAT network" inside the VirtualBox network preferences menu, and in the network adapter settings for the CernVM itself set it as the network adapter.




Other useful Links

Edit | Attach | Watch | Print version | History: r29 < r28 < r27 < r26 < r25 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r29 - 2017-05-23 - BenjaminCouturier
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

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