BOINC clients running inside Virtual Machines

The idea behind this project is to use Virtual Machines (VM) to run boinc clients. We have used two VM:

In this paper we are going to describe how we have setup the different VM in Windows XP.


VMware Player

This VM is the easiest one to install and set up. First of all we have to download the player from here. After that we install it. You must follow the steps and accept the license. After that you need an image that works with this program. We have used prebuild debian stable images. You can find it here. After download it, you have to unzip it, and then you can open it with the VMware player. This Debian version needs some steps to get fully installed. It will ask you which packages do you want to install, the users that you want to create and obviously the root password. Choose what you want, but I recommend you to not install nothing that offers you the debian installer and after that install exactly what you want. I also recommend you to create a normal account for running the boinc client.

The version of the image is a bit outdated so I advice you to upgrade it first.

Installling Boinc Client

When you have done all that steps, you are now prepared to install the boinc client. In our case we have used the seti@home project. So go to the web and download the boinc client, create an account and get the account user ID. As we haven't install any X server, we have to do it all with command lines. Once you have downloaded the client, you have to do the next steps:

  • bash
  • cd BOINC
  • ./boinc --attach_project account_user_ID (where the user id must be a big string with numbers and letters)

After all these steps you will have your VM set up, and running the boinc client.


This VM is a bit difficult to install and set up correctly. First of all we need the emulator and we can get it from here. Once you have downloaded you have to unzip it and after that you can run one small example of a linux machine executing the batch file called qemu-win. Now we need to download an image of debian to use with the VM. We can get one image from here. After download it we only need to unpack it and then modify the batch file qemu-win.

We have to modify the last line that will be something like this:

  • qemu.exe -L . -m 128 -hda linux.img -soundhw all -localtime
  • qemu.exe -L . -m 128 -hda name_of_debian_image.img -soundhw all -localtime -net nic -net tap,ifname=mytap

With the new line we are enabling the use of the network that it will necessary to use the Boinc Client. This image has a root password and is in a file called README in the tar file. So you must read it, and after that login and change it if you want.

Now we need to install an application that Qemu needs to use the network. We have to download OpenVPN for Windows and install it. After that we can go to Windows Network Connections and see that it will be a new device called something like "New connection TUN" or something like that. This new device is the one that we can use now from Qemu as network device. When we run again the Qemu batch command we will have that this device is connected. From the Debian image we have to use ifconfig to set up the eth0 device. The commands are the next ones:

  • ifconfig eth0 down
  • ifconfig eth0 up
  • route add default gw
and then add some DNS name servers to /etc/resolv.conf

After that we need to set up the TUN windows device to some ip and check if from Debian we can ping it. So we set up the TAP interface to have for example the IP Now you can check if you can ping from Debian your Windows machine.

Now we want to have access to Internet from our emulated machine. For do that we need to have a connection from our Windows machine to Internet. We must know which is the interface that access Internet, and then go to the properties of that interface. We must select the advance tab, and enable Internet Connection Sharing. After we have enabled that we must choose the TAP interface as the one that will access Internet. When you click OK you will be advice that the IP of the TAP interface will be changed to Click OK and don't worry about that because we have set up all correctly. Now if you go to your Debian, you must access Internet.

The version of Debian is a bit outdated so I advise you to upgrade it first, and after that do the same as in the previous VM when you are installing the BOINC client.


Kqemu is an accelerator for Windows and nix OSes. Here we need it because with this module we can have a fully virtualization machine using Qemu. First of all we have to download the accelerator from here. After that we need to be root in the windows machine to install it. To install it you only have to unpack it, and then right click in the file called: kqemu.inf and click in the install option. After that we only have to run the new service: * net start kqemu

The binary of Qemu has enabled this option by default so now we have to modify the .bat file to use the accelerator. We only need to add the option: * -kernel-kqemu

If all went well you will have a real virtual machine.

NOTE: every time you want to run the accelerator you will need to be root. That's all.


I have performed some benchmarks to know which are the best Virtual Machine, and if we obtain improvements with the kQemu accel. The experiments have been running for two days and a half. I have compared the number of workunits that each machine has processed (more workunits means better performance). An important note is that we have used different version of kernel: 2.6 and 2.4 branches. VMware has used 2.6 and kQemu 2.4, by the moment I don't know if this is relevant.

Qemu vs. Qemu with kQemu
Qemu Qemu with kQemu
Workunits 1 3

VMWare Player vs. Qemu with kQemu
VMware Player Qemu with kQemu
Workunits 12 8

We can conclude that using only the emulator is the worst solution for our VM. KQemu is really a good improvement in the performance, but we have to remember that this code is free but not GPL. Another important conclusion after the benchmarks is that VMware Player is the best even though we use the accel for Qemu.

So if we are planning to use a virtual machine we must use VMware Player as software. Is the fastest and easiest one: first because install it is very easy (we only have to install it and have an image) and second because is faster than Qemu.

BoincServer Howto

If you are planning to install the boinc server in a Scientific Linux, be aware that if you choose to enable SE Linux you will have to add a new policy that will let apache + php to write files and access the MySQL database. The easiest way is to change the SE Linux behavior to Permissive in /etc/selinux/config

Building boinc_samples

In GNU/Linux

If you want to build the example applications that the boinc project has, you have first to download all of them for that you must go to the father folder that holds your boinc source code. After that you must execute the next command:
cvs -d checkout boinc_samples

When you have downloaded all the source code you will only need to execute as always:

make install
in the example application that you want to try.

In MS Windows XP

If you want to build the example applications you will need first to download the source code of boinc server and after that the boinc_samples. To do that you will need to have installed a CVS client for Windows. You can use this one: Tortoise CVS. The commands are the same as you have in the GNU/Linux section.

After you have the source code, you will need to install MS Visual Studio 2003.NET. I have tried the 2005 free version and it doesn't work with the source code. If you are working at CERN you will only need to open CMF and install the software using it. Once you have installed the MSVS you are prepared to start compiling.

Now you have to go to the folder boinc and open the folder win_build. There you will see a lot of project/solution files. We need to open: boinc_2003.sln. After that you will only need to go to Build -> Build Solution. You will get an error because you don't have installed the wxWidgets. Forget it because we are not going to build the client from windows, we only need the libs for building the examples.

Now we can try to build the examples. We have to open the file that is in the folder boinc_samples/win_build/samples_2003.sln. When you have done that you will have to check one thing: if the library delayimp.lib is in the sub-projects sleeper and wrapper. Using the propierties of that projects you can check that in the Linker folder -> Input you should see inside: Additional Dependencies the library delayimp.lib. If is not there you have to add it. Then you can compile all the code without problems.

Daniel Lombraña 21/Nov/2006 Daniel Lombraña González 07 Nov 2006

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2006-12-06 - DanielLombrana
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback