wiki:VmServer

Version 33 (modified by davea, 16 years ago) (diff)

--

Linux Virtual Machines for use with BOINC

Linux Virtual Machines (VMs) are useful for several purposes in BOINC:

  • Running a BOINC server in a VM. Use a 'BOINC virtual server' VM for this (see below).
  • Compiling applications so that they will run on older Linux versions. Use a 'compatibility VM' for this (see below).
  • Applications that run in a VM on the client. This is an object of research.

The BOINC virtual server

This VM is for use as a BOINC server. It has all the BOINC prerequisites installed, the BOINC software installed and compiled, and user accounts and permissions set up. It's ready to run make_project and go.

Instructions and more information is in the readme.html file in ~boincadm. The passwords can be found in the file README-vmware-image that is part of the zip file. The root (or sudo) password is 'rootpw'. There is a user account 'boincadm' with password 'boincadmpw'; build software under this account. Change these passwords if you're concerned about security.

The BOINC software on this VM is not necessarily the latest version. If you want the latest version, run update_latest.sh and then configure/make.

The Linux/PHP/MySQL/Apache software on these VMs is not necessarily the latest version. If you want the latest version, use 'yum' or other distro-specific tool.

This is a VMWare virtual machines; you'll need the VMWare player (freeware). The file is large (~1 GB). Please download it as seldom as possible.

The following versions are available:

Network Access

VMWare provides two ways to access the network from the VM: Bridged Ethernet and NAT (Network Address Translation). These are selected using the pulldown menu below "Ethernet" in the VMWare player. We recommend that you start with Bridged Ethernet.

Bridged Ethernet

The VM will act like a real machine on your network. Scanning the network will reveal two machines, your host and the VM. Outgoing and incoming connections are possible.

By default, the VM will get an IP address via DHCP. This will work if your network has a DHCP server configured to issue IP address to new hosts.

Alternatively, you can give the VM a static IP address. To do this, edit /etc/network/interfaces. For example:

# The primary network interface
auto eth0
#iface eth0 inet dhcp
#       pre-up iptables-restore < /etc/iptables.up.rules
iface eth0 inet static
address 141.142.234.9
netmask 255.255.255.0
gateway 141.142.234.1
dns-search yourdomain.edu
dns-nameservers a.b.c.d

Where a.b.c.d is your DNS server IP address (you can supply more than one).

Edit /etc/resolv.conf to include

nameserver a.b.c.d

where a.b.c.d is the DNS server IP address

You should also add the IP address and hostname of the VM to your hosts file. To do this edit C:\Windows\system32\drivers\etc\hosts (if the host is Windows) or /etc/hosts (as root; if the host is Unix) with an editor, and add for example:

141.142.234.9 debian.localdomain

With this you can connect a client from your host machine to your VM. If you're using a proxy to access the internet you should add 'debian.localdomain' to your list of exceptions in your browser. You won't need a proxy to resolve a local address.

NAT

In this mode, the VM shares the IP address of the host machine in order to make outgoing connections (access Internet sites from within the VM). Scanning the network will only reveal one machine.

Incoming connections from other machines (except the host machine) are, in principle, not possible. However, there is a way to circumvent this lack of incoming (to your server) connectivity and, thus, be able to receive connections from BOINC clients outside your network: port forwarding (not available with the free VMware player). This can be done using the VMware virtual network editor (Edit > Virtual Network Settings > NAT > Edit > Port Forwarding). More information in Configuring a Virtual Network. On Windows, if NAT is to be used and not already set, you need to do the following to get network access in the VM:

Start | Programs | VMware | VMware Server | Manage Virtual Networks
(Virtual Network Editor):
Host Virtual Network Mapping:
VMnet0: Bridged to an automatically chosen adapter.
VMnet8: VMware Network Adapter VMnet8
In the NAT tab: VMnet host: VMnet8

The 'compatibility' VM for building and testing apps

This VM is based on Microsoft Virtual PC. (VMWare can reportedly also run these files, though this feature is just experimental at the moment. You'll need the VMware Converter to convert a VirtualPC image to VMware).