Associate
- Joined
- 9 Mar 2008
- Posts
- 1,039
Hi all.
Having just built a new machine and reinstalled all the folding clients again, I thought I might take the time to produce an illustrated guide to folding on Linux Virtual Machines, as I know it's come up a few times in the forum. Hopefully my experiences will be useful to some guys new to folding, or maybe spur some of you old timers into upping your ppd!
Why fold on a Virtual Machine?
The simplest answer is that the Linux SMP client is a lot better than the windows one - in my experience, its more stable and generates a higher average ppd (points per day) due to the Linux clients use of the A2 core (compared to the rather inefficient A1 core on the windows client). The Linux client still picks up A1-based units, and indeed is not much faster than the windows client, but it's the A2 units that give it an edge. Obviously, Linux is not for everyone, and setting up the windows GPU client is a lot easier than fiddling with WINE on Linux, so using a Virtual Machine running a Linux distribution is a good half way house. Running Virtual Machines has its own problems, mostly a fairly hefty RAM requirement to run smoothly (reducing host performance), not to mention it's a bit of a pain to have to shut them down whenever you turn your folding box 'not on'. Personally I have found it to be worthwhile, with the added bonus of learning a little bit more about Linux and virtualisation along the way!
Software Requirements:
The F@H Linux client requires a 64-bit Linux distro (which means its a no-go for those with 32-bit machines and host operating systems) and requires the virtualisation platform to support virtual SMP. This has been a limiting factor, but there are now three pieces of software capable of virtual folding:
1. VMware Server 2.0 (and 1.0) - free. VMware Workstation also works and is available as a free trial, but the Server version provides almost all of the same function for no money (with some tweaking!).
2. Virtualbox 3.0 (not previous versions) - free
3. Microsoft's Hyper-V (only available on with a copy of Windows Server 2008 and Server 2008 R2) - cost of a copy of Server 2008, ie lots.
VMware Installation + Guide
VMware has been the most popular choice, and is probably the best choice for those running on a quad-core processor. I have personally used VMware for a long time, and have had (almost!) no stability problems, although some have reported problems with installations. More information about VMware Server can be found here: http://www.vmware.com/products/server/
Registration is required, but once registered, you very rarely hear from VMware. Personally, i am using VMware server build 2.0.0 116503. There is a more up to date version, v2.0.1, which has a slightly smaller download size. However, there is method in my madness, and all will be revealed soon enough...
Im sure i dont need to bother you with details of the download and installation, but there are a couple of pointers that could be useful. Be sure to disable any antivirus software before installation, since these can interfere with installation of drivers (particularly be wary of any registry guard type programs, as VMware makes quite a few reg. edits upon installation). When asked for the FQDN, make a note of the port numbers, as you may need them later on. Personally, i have not changed these - ever. However, some (cleverer!) people may need to change them for security purposes etc. Install VMware.
You will be asked to restart (and thus enter a 'not on' state briefly...!), and after this you should have a working install.
Next step is to set up VMware and get some VMs going. Go to the Start Menu, and find the entry for VMware and VMware Server. There should be an icon for 'VMware Server Hompage'. Clicking this will try to launch the VMware Server web interface.
*** Note: The web page will probably fail to open in most browsers due to a certificate issue. On Windows 7, it may fail to open at all, giving the error message shown in the screen below. If it will not open in your browser (for example, Opera), copy the URL and paste it into the address bar of Internet explorer - a good all round fail safe strategy. IE will still give a certificate error, but clicking 'Continue to this website' will take you to the login screen. If your PC is not password protected, im not sure what happens here - at any rate, you can set your windows username and password if this is a problem. Google is your friend here.***
You should now be presented with the (awful) web interface of VMware server. I hate it. However, its possible to use a much better and less hassle free interface. The VMware VIClient is used in 'real' server environments, and comes packaged with other VMware products that cost a lot. However, it will work fine on VMware server. This is the main reason for choosing an out dated build of VMware Server - the download may be bigger, but it comes already packaged with the VIClient. To install this, type: https://localhost:8333/client/VMware-viclient into the address bar of IE. This should start a 'download' (although in reality its already on your pc), and can be installed by just clicking 'Run', as shown below.
Alternatively, you can install manually by navigating to C:\Program Files (x86)\VMware\VMware Server\hostd\docroot\client, and double clicking the installer. More info can be found here: http://communities.vmware.com/docs/DOC-2401.
Clicking the VIclient icon in the start menu or on the desktop will prompt a login. If no server name is listed, the server you are trying to connect to should be https://localhost:8333. The username and password is simply your Windows username and password. You should be presented with something like this... (give or take a few of the 'View' options that i may/may not have turned on/off)
Click 'Create new Virtual Machine' to make a Virtual Machine.
The setup is mostly self explanatory. Make sure to select the correct OS (in this case Ubuntu Linux 64bit) from the menu. If you need to change the datastore, this can be done easily by logging in to the dreaded web interface... It's also possible to change this during the initial setup. I have a screenshot of this, but will refrain from posting for now. For this guide, choose a virtual hard disk at least 2.5 Gb in size. This allows for the use of the Linux auto partitioner, and much less than this results in a 'disk to small' error when installing Ubuntu.
A few things to note are that the 'CPUs' setting must be set to 2, else the folding client will not run. Memory wise, it is advisable to provide the VM with as much memory as possible. It is recommended that a machine running the SMP client has 1Gb of memory or more to cope with larger work units, but in reality this isnt necessary. I have run VMs with 512Mb/768Mb of Virtual memory without a hitch - having more memory merely reduces paging and makes the VM smoother.
Follow the options through, leaving everything on its default settings and click 'Finnish' when done. Networking wise, VMware is a little unusual. I have always found that on Vista, setting the Virtual Network adaptor to NAT gives the VM an internet connection, whereas on Windows 7, I have found that only 'Bridged' mode provides a reliable connection - this may be something to play with and should be your first port of call if you find your client cannot download work.
Once finished, the client will create the virtual disk. General PC performance may be slow whilst this is happening - don't worry, it only takes a few minutes. Once done, you should be able to view the files in Windows Explorer (in my case C:/Virtual Machines). Click 'Start Virtual Machine' in either the VIClient or in the Web Interface, and click on the 'console' tab that appears. Users of the Web interface will need to install an add-on, but VIclient users will be fine. You should now have a running VM...
Onto the Linux install itself. I prefer to use Ubuntu, partially because its fairly simple to get to grips with and has excellent online support, but mainly because I don't see the point in fiddling about with some of the more obscure ditros! This guide should be applicable to any Debian based distribution, although i can't be 100% sure. Rest assured that someone more experienced will have a solution to any problems you encounter! The 8.04 release of Ubuntu is the one to go for due to problem with MPI implementation in some of the newer Linux kernels. Since most features of Linux are not necessary for a folding box, a bleeding edge distro is not necessary. Ubuntu can be found here:
http://www.ubuntu.com/getubuntu/download
Choose Ubuntu 8.04 LTS Desktop version, and make sure to select the 64-bit edition. You should begin to download an .ISO image roughly 700 Mb in size (give or take).
Once the VM is running, it should load a boot screen and proceed to inform you there is no OS installed. Click the 'Connect to CD/DVD' button and select 'Connect to ISO image'. Navigate to the Ubuntu image downloaded and click open. The VM should now boot from the image and the Ubuntu install will begin.
There are plenty of guides to installing Ubuntu/other Linux distros on the web, so i won't waste too much time by going through the whole process. Instead, Ihave highlighted a few key areas. The advantage of using the Desktop version is a graphical installer, but it's very easy to set up and get running. I suggest using the guided partitioner if you are completely new to Linux. This will set up the SWAP file and home directories for you.
Once installed, you will need to reboot the VM, and we can begin to set up the folding client. It is not necessary to update Ubuntu (which mostly updates the software), but the choice is yours. Full details of the client can be found on the Stanford page, but the necessary steps are presented here. Open a terminal Window by clicking on 'Applications - Accessories -Terminal' on the panel at the top of the screen. A command prompt window will open and we can begin to set up the client. Type:
This will install the 32 bit libraries needed for F@H. You will be prompted to enter your password you set during the installation of Ubuntu, and will need to confirm the installation by pressing y/Y.
Once completed, type:
Then type:
To setup the client in the usual fashion.
To start the client, ensure you are in the right directory by typing, cd ~/folding, followed by:
(Add any other flags, -oneunit, -verbosity 9 etc at this stage). The client should then start, and (hopefully!) download a work unit and begin crunching!
Monitoring the Client
It is possible to monitor your client within the VM by checking the terminal window, by installing FahMon within the VM (follow the installation guide on the FahMon site), but it is also possible to monitor the progress of the client within Windows using shared folders. To share the folding directory on the virtual machine, click 'Places' on the Gnome Panel at the top of the screen, and select the 'Home' folder. You should see the directory 'folding' within this Window. Right click the folder and select 'Sharing Options'. You will then be given the choice of sharing the folder. Clicking 'Share this folder' will prompt the installation of the Samba service, proceed with this installation, and restart the session when prompted. Navigate to the folder again and repeat the steps above. Now that Samba is installed, the folder can be configured for sharing. Once the options have been set, the folder should now appear on the 'Network' section in Windows Explorer.
Simply point FahMon to the 'folding' directory to monitor the client from within Windows. Easy!
That's it for now! Long post. If anyone spots any mistakes or has something to add, please say and I'll change as needed. I plan on adding some extra stuff for Hyper-V and Virtualbox, plus some configuration advice. Trust SUN to release a new SMP capable Virtualbox just as I do this guide! Thanks for reading, hope it provides some useful advice.
Having just built a new machine and reinstalled all the folding clients again, I thought I might take the time to produce an illustrated guide to folding on Linux Virtual Machines, as I know it's come up a few times in the forum. Hopefully my experiences will be useful to some guys new to folding, or maybe spur some of you old timers into upping your ppd!
Why fold on a Virtual Machine?
The simplest answer is that the Linux SMP client is a lot better than the windows one - in my experience, its more stable and generates a higher average ppd (points per day) due to the Linux clients use of the A2 core (compared to the rather inefficient A1 core on the windows client). The Linux client still picks up A1-based units, and indeed is not much faster than the windows client, but it's the A2 units that give it an edge. Obviously, Linux is not for everyone, and setting up the windows GPU client is a lot easier than fiddling with WINE on Linux, so using a Virtual Machine running a Linux distribution is a good half way house. Running Virtual Machines has its own problems, mostly a fairly hefty RAM requirement to run smoothly (reducing host performance), not to mention it's a bit of a pain to have to shut them down whenever you turn your folding box 'not on'. Personally I have found it to be worthwhile, with the added bonus of learning a little bit more about Linux and virtualisation along the way!
Software Requirements:
The F@H Linux client requires a 64-bit Linux distro (which means its a no-go for those with 32-bit machines and host operating systems) and requires the virtualisation platform to support virtual SMP. This has been a limiting factor, but there are now three pieces of software capable of virtual folding:
1. VMware Server 2.0 (and 1.0) - free. VMware Workstation also works and is available as a free trial, but the Server version provides almost all of the same function for no money (with some tweaking!).
2. Virtualbox 3.0 (not previous versions) - free
3. Microsoft's Hyper-V (only available on with a copy of Windows Server 2008 and Server 2008 R2) - cost of a copy of Server 2008, ie lots.
VMware Installation + Guide
VMware has been the most popular choice, and is probably the best choice for those running on a quad-core processor. I have personally used VMware for a long time, and have had (almost!) no stability problems, although some have reported problems with installations. More information about VMware Server can be found here: http://www.vmware.com/products/server/
Registration is required, but once registered, you very rarely hear from VMware. Personally, i am using VMware server build 2.0.0 116503. There is a more up to date version, v2.0.1, which has a slightly smaller download size. However, there is method in my madness, and all will be revealed soon enough...
Im sure i dont need to bother you with details of the download and installation, but there are a couple of pointers that could be useful. Be sure to disable any antivirus software before installation, since these can interfere with installation of drivers (particularly be wary of any registry guard type programs, as VMware makes quite a few reg. edits upon installation). When asked for the FQDN, make a note of the port numbers, as you may need them later on. Personally, i have not changed these - ever. However, some (cleverer!) people may need to change them for security purposes etc. Install VMware.

You will be asked to restart (and thus enter a 'not on' state briefly...!), and after this you should have a working install.

Next step is to set up VMware and get some VMs going. Go to the Start Menu, and find the entry for VMware and VMware Server. There should be an icon for 'VMware Server Hompage'. Clicking this will try to launch the VMware Server web interface.

*** Note: The web page will probably fail to open in most browsers due to a certificate issue. On Windows 7, it may fail to open at all, giving the error message shown in the screen below. If it will not open in your browser (for example, Opera), copy the URL and paste it into the address bar of Internet explorer - a good all round fail safe strategy. IE will still give a certificate error, but clicking 'Continue to this website' will take you to the login screen. If your PC is not password protected, im not sure what happens here - at any rate, you can set your windows username and password if this is a problem. Google is your friend here.***

You should now be presented with the (awful) web interface of VMware server. I hate it. However, its possible to use a much better and less hassle free interface. The VMware VIClient is used in 'real' server environments, and comes packaged with other VMware products that cost a lot. However, it will work fine on VMware server. This is the main reason for choosing an out dated build of VMware Server - the download may be bigger, but it comes already packaged with the VIClient. To install this, type: https://localhost:8333/client/VMware-viclient into the address bar of IE. This should start a 'download' (although in reality its already on your pc), and can be installed by just clicking 'Run', as shown below.

Alternatively, you can install manually by navigating to C:\Program Files (x86)\VMware\VMware Server\hostd\docroot\client, and double clicking the installer. More info can be found here: http://communities.vmware.com/docs/DOC-2401.
Clicking the VIclient icon in the start menu or on the desktop will prompt a login. If no server name is listed, the server you are trying to connect to should be https://localhost:8333. The username and password is simply your Windows username and password. You should be presented with something like this... (give or take a few of the 'View' options that i may/may not have turned on/off)

Click 'Create new Virtual Machine' to make a Virtual Machine.

The setup is mostly self explanatory. Make sure to select the correct OS (in this case Ubuntu Linux 64bit) from the menu. If you need to change the datastore, this can be done easily by logging in to the dreaded web interface... It's also possible to change this during the initial setup. I have a screenshot of this, but will refrain from posting for now. For this guide, choose a virtual hard disk at least 2.5 Gb in size. This allows for the use of the Linux auto partitioner, and much less than this results in a 'disk to small' error when installing Ubuntu.

A few things to note are that the 'CPUs' setting must be set to 2, else the folding client will not run. Memory wise, it is advisable to provide the VM with as much memory as possible. It is recommended that a machine running the SMP client has 1Gb of memory or more to cope with larger work units, but in reality this isnt necessary. I have run VMs with 512Mb/768Mb of Virtual memory without a hitch - having more memory merely reduces paging and makes the VM smoother.

Follow the options through, leaving everything on its default settings and click 'Finnish' when done. Networking wise, VMware is a little unusual. I have always found that on Vista, setting the Virtual Network adaptor to NAT gives the VM an internet connection, whereas on Windows 7, I have found that only 'Bridged' mode provides a reliable connection - this may be something to play with and should be your first port of call if you find your client cannot download work.

Once finished, the client will create the virtual disk. General PC performance may be slow whilst this is happening - don't worry, it only takes a few minutes. Once done, you should be able to view the files in Windows Explorer (in my case C:/Virtual Machines). Click 'Start Virtual Machine' in either the VIClient or in the Web Interface, and click on the 'console' tab that appears. Users of the Web interface will need to install an add-on, but VIclient users will be fine. You should now have a running VM...
Onto the Linux install itself. I prefer to use Ubuntu, partially because its fairly simple to get to grips with and has excellent online support, but mainly because I don't see the point in fiddling about with some of the more obscure ditros! This guide should be applicable to any Debian based distribution, although i can't be 100% sure. Rest assured that someone more experienced will have a solution to any problems you encounter! The 8.04 release of Ubuntu is the one to go for due to problem with MPI implementation in some of the newer Linux kernels. Since most features of Linux are not necessary for a folding box, a bleeding edge distro is not necessary. Ubuntu can be found here:
http://www.ubuntu.com/getubuntu/download
Choose Ubuntu 8.04 LTS Desktop version, and make sure to select the 64-bit edition. You should begin to download an .ISO image roughly 700 Mb in size (give or take).
Once the VM is running, it should load a boot screen and proceed to inform you there is no OS installed. Click the 'Connect to CD/DVD' button and select 'Connect to ISO image'. Navigate to the Ubuntu image downloaded and click open. The VM should now boot from the image and the Ubuntu install will begin.

There are plenty of guides to installing Ubuntu/other Linux distros on the web, so i won't waste too much time by going through the whole process. Instead, Ihave highlighted a few key areas. The advantage of using the Desktop version is a graphical installer, but it's very easy to set up and get running. I suggest using the guided partitioner if you are completely new to Linux. This will set up the SWAP file and home directories for you.

Once installed, you will need to reboot the VM, and we can begin to set up the folding client. It is not necessary to update Ubuntu (which mostly updates the software), but the choice is yours. Full details of the client can be found on the Stanford page, but the necessary steps are presented here. Open a terminal Window by clicking on 'Applications - Accessories -Terminal' on the panel at the top of the screen. A command prompt window will open and we can begin to set up the client. Type:
Code:
sudo apt-get install ia32-libs
Once completed, type:
Code:
mkdir -p ~/folding
cd ~/folding
wget [url]http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz[/url]
tar xzf FAH6.02-Linux.tgz
Then type:
Code:
./fah6 -configonly
To setup the client in the usual fashion.
To start the client, ensure you are in the right directory by typing, cd ~/folding, followed by:
Code:
./fah6 -smp
(Add any other flags, -oneunit, -verbosity 9 etc at this stage). The client should then start, and (hopefully!) download a work unit and begin crunching!
Monitoring the Client
It is possible to monitor your client within the VM by checking the terminal window, by installing FahMon within the VM (follow the installation guide on the FahMon site), but it is also possible to monitor the progress of the client within Windows using shared folders. To share the folding directory on the virtual machine, click 'Places' on the Gnome Panel at the top of the screen, and select the 'Home' folder. You should see the directory 'folding' within this Window. Right click the folder and select 'Sharing Options'. You will then be given the choice of sharing the folder. Clicking 'Share this folder' will prompt the installation of the Samba service, proceed with this installation, and restart the session when prompted. Navigate to the folder again and repeat the steps above. Now that Samba is installed, the folder can be configured for sharing. Once the options have been set, the folder should now appear on the 'Network' section in Windows Explorer.

Simply point FahMon to the 'folding' directory to monitor the client from within Windows. Easy!
That's it for now! Long post. If anyone spots any mistakes or has something to add, please say and I'll change as needed. I plan on adding some extra stuff for Hyper-V and Virtualbox, plus some configuration advice. Trust SUN to release a new SMP capable Virtualbox just as I do this guide! Thanks for reading, hope it provides some useful advice.
Last edited: