CernVM trouble-shooting

I have been using CernVM to run LHCb software on my Mac OSX 10.6.5 laptop and hope to use it on Linux desktops in the near future. It is an extremely useful and elegant way of dealing with the OS and software installation problems. In a nutshell, it runs the appropriate version of CERN scientific Linux in a virtual machine and takes care of loading necessary software on-demand, as long as the software has been made available in the CernVM servers. I tried one of the early versions a few years ago, and have recently installed the latest version from scratch, and I must say the installation has become much easier and solid. There are a currently few little things that have to be taken care of, particularly if you want to run interactive sessions, and you want grid access. This is a purely personal page, and some of the problems I encountered are likely to be due to my own incompetence rather than a problem with CernVM. And some problems or features are specific to the LHCb software distribution.


I have a Macbook Pro running Mac OSX 10.6.5. It claims to have a 2.4GHz Intel Core 2 duo processor, and 4GB or RAM.

Virtual machine

There are a few options here but VirtualBox, formerly from Sun Microsystems, now Oracle, is very good and easy to use. The insatallation is just a matter of downloading it from here. I am using version 3.2.12 r68302. And I am keeping my fingers crossed that VirtualBox will not start going the same way as or Java seem to be going lately...

CernVM installation

My suggestion here is to follow the steps in the CernVM page to the letter. They will be the most up to date instructions and if something goes wrong you know where to ask for support. There are already quite a few obsolete wiki pages lying around on the interwebs. So, go to the CernVM page, follow User support -> Documentation -> Running in VirtualBox on Mac. Follow all those steps!

Step 1. As a CernVM image, I got the 64 bit desktop version. I suggest putting the image in a place you will remember and you won't delete by accident. I have something like ~/VM/CernVM/. After unzipping and untarring this leaves me with an image at /Users/my_local_username/VM/CernVM/cernvm-2.2.0-x86_64/cernvm-2.2.0-x86_64.vmdk.

Step 2 tells you how to configure the VirtualBox. It is worth mentioning that you can have more than one virtual machine on VirtualBox. I currently have a CernVM and an Ubuntu installation, but you could have more than one version of each, so you don't have to delete one CernVM if you want to upgrade to a newer version. I set the memory to 2048MB. I also followed the instructions to set up the shared folder, which points to my /Users/my_local_username/VM/CernVM/Shared, and is available in the VM as /mnt/shared/jpalac. I can see the folder, I can create files on ib both from the VM and from the host, but there are pboblems (see below).

Step 3 is where you would have to take experiment-specific actions. I took no action other than selecting LHCb as my group.

Specific configuration issues

CernVM fixes and improvements

It seems that (t)csh users (I am not one of them) have problems with the LHCb environment being set. There are also some available optimisations that cure part of a problem whereby accessing many catalogs (for instance upon issuing SetupProject DaVinci) is exceedingly slow. These problems are not fully fixed but the cernvmfs updates should help. Issue the commands

sudo conary update
sudo conary update

Then, reboot, and check the changes:

conary q cvmfs2
> cvmfs2=
conary q cernvm-config
> cernvm-config=0.18.13-1-1

Setting up AFS

Following the CernVM 2.20 release notes, I do

sudo conary update group-openafs-client openafs openafs-client

sudo mkdir -p /afs

echo > /tmp/ThisCell

sudo cp /tmp/ThisCell /usr/vice/etc/ThisCell

To log in and get AFS tokens I do


Setup for passwordless access to SVN, CVS

Follow the instructions, doing the same in .ssh/config for as is done for My .ssh/config now looks like this:
Host lxplus
Protocol 2
PubkeyAuthentication no
PasswordAuthentication yes

Host svn
Protocol 2
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
ForwardX11 no

Host isscvs
Protocol 2
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
ForwardX11 no

This works because my username is the same as my AFS username. If not, add an User your_afs_username entry to each Host. I need to have valid tokens.

Outstanding problems

No automatic LHCb group login

The LHCb script that sets up useful aliases does not run automatically. The script is /opt/lhcb/ or /opt/lhcb/group_login.csh depending on your shell, and need to be run by hand. There is a fix for (t)csh in the updates above, whereas bash is an LHCb problem that is being addressed.

Group login script, SetupProject, getpack hang

Running . /opt/lhcb/, SetupProject and getpack take about 1 minute or more. I don't know if this is normal but it seems too slow to me. In fact, I would not like the "no automatic LHCb group login" problem to be solved if it is going to slow down xterm startup like this!

Cannot build software on shared folder

I have set up a build area in /mnt/shared/jpalac. I can checkout code from the repository via SVN, I can write files there, but when I build, I get the following:
#CMT---> installing file into /mnt/shared/jpalac/cmtuser/DaVinci_v26r4/InstallArea/x86_64-slc5-gcc43-opt/lib
eval ${install_command} ${full_source_name} ${dest_file_path}
python /opt/lhcb/lib/lhcb/GAUDI/GAUDI_v21r11/GaudiPolicy/scripts/ -xCVS -x*~ -x*.stamp -x*.bak -x.* -x*.pyc -x*.pyo -s --log=./install.x86_64-slc5-gcc43-opt.history /mnt/shared/jpalac/cmtuser/DaVinci_v26r4/Phys/DaVinciTools/x86_64-slc5-gcc43-opt/ /mnt/shared/jpalac/cmtuser/DaVinci_v26r4/InstallArea/x86_64-slc5-gcc43-opt/lib/
Create Link to '../../../Phys/DaVinciTools/x86_64-slc5-gcc43-opt/' in '/mnt/shared/jpalac/cmtuser/DaVinci_v26r4/InstallArea/x86_64-slc5-gcc43-opt/lib'
Traceback (most recent call last):
  File "/opt/lhcb/lib/lhcb/GAUDI/GAUDI_v21r11/GaudiPolicy/scripts/", line 309, in <module>
  File "/opt/lhcb/lib/lhcb/GAUDI/GAUDI_v21r11/GaudiPolicy/scripts/", line 84, in main
    opts.symlink, realpath(dirname(opts.logfile)))
  File "/opt/lhcb/lib/lhcb/GAUDI/GAUDI_v21r11/GaudiPolicy/scripts/", line 266, in install
  File "/opt/lhcb/lib/lhcb/GAUDI/GAUDI_v21r11/GaudiPolicy/scripts/", line 231, in update
OSError: [Errno 1] Operation not permitted
echo ${full_source_name} >${ref_file}
if test "${makecmd}"; then set +v; fi
#CMT---> installation done
#CMT---> (constituents.make) DaVinciTools done
#CMT---> (constituents.make) Building DaVinciToolsRootMap.make
#CMT---> Info: Document DaVinciToolsRootMap
#CMT---> (constituents.make) Creating DaVinciToolsRootMap.lock and Starting DaVinciToolsRootMap
lockfile: Try praying, giving up on "DaVinciToolsRootMap.lock"
gmake[3]: *** [DaVinciToolsRootMap] Error 69
gmake[2]: *** [common_target] Error 2
gmake[1]: *** [check_config] Error 2
gmake[1]: Leaving directory `/mnt/shared/jpalac/cmtuser/DaVinci_v26r4/Phys/DaVinciTools/cmt'
#CMT---> Error: execution_failed : make
make: *** [Phys/DaVinciTools_build] Error 2

This is because VirtualBox doesn't allow links on the shared area. I don't think this can be easily solved.

Cannot SSH to CernVM.

In the past, I used to ssh to the VM via port 2222:
alias cernVM='ssh -Y -p 2222 jpalac@localhost'

This now gives

ssh: connect to host localhost port 2222: Connection refused

The same problem happens when I ssh to the default port, 22.

Since I am running X, this is no longer a serious issue, but I'd like to know what ssh magic has to be done to get this to work again.

Copy and paste

I have not been able to figure out how to copy-and-paste in the X session to between emacs or xterm and anything else. Using a terminal emulator I can cut and paste easily between guest and host.

-- JuanPalacios - 07-Jan-2011

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2011-01-11 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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