Hello there. I guess I'm writing this as yet another alternative to all the ways of getting linux clients to fold for you under windows. The more the merrier, right? This method allows you to take advantage of the new features in virtualbox that can allow you to fold with more than 2 cores on a single virtual machine. The other reason I'm writing this is because there's a lot more versatility involved (in my opinion) with setting up your own virtual machine folding, as well as the increased ease in troubleshooting something that you set up yourself as opposed to something you downloaded. In addition, I'm sure there are people out there that would want to get more from their virtual machine than just a folding client. I, for one, like to use certain linux-only programs on my virtual machine that's folding as well. Anyhow, the goal of this guide here is to get a base install of Arch Linux set up with the latest folding client, and samba set up to make a shared folder, such that Fahmon can recognize it easily. The reason that I chose Arch is because it boots up fast; it comes with no desktop environment, so users can install whatever they want on there; and it has really good package management that simplifies things for the purpose of this guide.
Also, to give credit where it's due, this guide is basically a combination of the samba and pacman guides on the arch wiki, with the folding@home linux SMP guide from stanford's website, just implemented in the context of a virtual machine.
1. Get Virtualbox, fahmon, and Arch Linux
The first thing that you want to do is get yourself a copy of a 64-bit distribution of Arch Linux here.
You're then going to want to install the latest version of virtualbox, which you can get from here.
To monitor your folding clients, get Fahmon from here.
2. Set up a new virtual machine so you can install Arch Linux
Once you have virtualbox up and running, click the "New" button on the top left and follow the guide to setting up a new virtual machine. Under the "VM Name and OS Type" prompt, you can call the VM whatever you want, but select make sure to select Linux as your OS, and Arch Linux x64 as your version.
When asked how much memory to assign to the VM, I assigned it about 600M, although I'm not really sure if there's a "sweet spot" as far as folding is concerned. I have run into weird booting issues when assigning over 2 gigs of memory to the machine though....so I guess you really can't go to far.
When asked how big of a hard drive you want to assign to the machine, the standard 8 gigs is just fine. I picked the "dynamically expanding storage" option so it wouldn't take up too much space on my HD. Go ahead and make a hard drive. After you make it, the machine should be ready for its initial boot up so you can install the OS.
3. Initial OS install
The easiest way to install the OS is to leave everything at its defaults. I chose a network install from a mirror that was close to me so the packages could download as fast as possible. As far as partitioning is concerned, I used the guided partitioner and just left boot and swap at their default size and split "/" and "/home" 50/50 with the remaining space. When asked which packages to install, I just chose "base" and left it at that. I'm sure some more linux savy people here know how to trim the fat on a folding machine, but I sure don't, hahaha. The bootloader install should be the last step before it asks you to reboot into your new system. What you're going to do here is power off the machine when the install is finished, because we are going to change a few settings with the virtual machine.
4. Change VM settings
If you've powered off the VM, you should be back at the virtualbox main menu, with your new VM shown on the top left. Above the VM is a button called "settings" that's no longer grayed out now that the VM is powered off. Click on the settings button. Here, you can set the amount of processors you want to fold on under the "system" menu. Once you finish that, you're going to want to head over to the "network" menu and set the adapter to "bridged" mode from "NAT". When this happens, you should see the name of your ethernet adapter in the drop down menu underneath. Save these settings and fire up your VM again. Login as root (no password needed)
5. Samba setup
The first thing you're going to want to do is set up a folder that you're folding files are going to go into, and make it a shared public folder such that you can access it on the host machine. To do this we're going to need the program Samba. Before getting samba, you're going to want to have Pacman synchronize and update the system by typing the following:
pacman -Syu
Now lets make a shared directory for the F@H client:
mkdir /home/shared
You can then go ahead and get both samba and the 32bit libraries required for the SMP client by typing the following:
pacman -S samba lib32-glibc
Once that's done installing, you're going to want to rename the smb.conf template:
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
In this folder you're going to want to make some modifications, so open up smb.conf with your text editor:
nano /etc/samba/smb.conf
-Under "Global Settings", change the workgroup to your network's workgroup (which you can find on windows by clicking start->right click my computer->properties). You'll also want to change the "security = user" line to "security = share"
-Under "share definitions", the first share definition should be one called "[homes]". For simplicity's sake, I just edited this definition to the definition below:
[Folding]
comment = Home Directories (you can change this if you want)
path = /home/shared (the folder that you made for F@H)
browseable = yes
writeable = yes (this is probably not needed, but I left it there)
public = yes
That should do it for smb.conf editing. If you're using the nano text editor, just hit Ctrl+X to exit and hit Y to save your changes. Don't rename the folder because you did that already.
Now lets make sure samba starts up with the machine every time you power it on. Edit the rc.conf folder by typing:
nano /etc/rc.conf
At the bottom of the file, there should be a section entitled "DAEMONS" with some commands in parenthesis. Go ahead and stick the word "samba" into the list of words in parenthesis and exit by hitting Ctrl+X again and then Y to save the changes.
Now lets go ahead and refresh samba:
/etc/rc.d/samba restart
You can now test to see if your shared folder is, in fact, shared, by going to the "network" folder in windows (my network places in XP). You should see a list of users on the network. The user with the samba shared folder is called "Myhost". Double click on that and see if your shared folder is in there. If it is, we're ready to finally get the folding client.
6. Getting the folding client
Now that we have the file sharing between the client and host up and running, we can finally get the folding client as per the instructions on stanford's website. Navigate to the shared folder that you set up in samba:
cd /home/shared
Once in here, you can nab the new beta SMP linux folding client with the "wget" command:
wget http://www.stanford.edu/group/pandeg...beta-Linux.tgz
This will download the client directly to your shared folder. Now all that's left is to extract it with the "tar" command:
tar xzf FAH6.24beta-Linux.tgz
You're now basically in the same situation as the windows folding client....all that's left is to configure your username/team number and other favorite parameters by executing the client with the -configonly flag:
./fah6 -configonly
This should bring up those menus that you may or may not be familiar with (depending if you've used the console client before), but are pretty self explanatory (if not, there are tons of guides on here on what do do with them). After you configure the client, you can start up the SMP folding client by using the "-smp" flag:
./fah6 -smp -verbosity 9
You don't have to type in "-verbosity 9" unless you want to see more information on what the client is doing as it's running.
Congrats, you should now have an SMP folding client running in virtualbox, netting you that awesome PPD that linux SMP clients are known for. Now all that's left is to get fahmon to see it and monitor its progress.
7. Fahmon Detection
Go ahead and run the fahmon installer in windows. Fire up the program and get the latest projects by going to "tools"->"download new projects". Now we're going to add the SMP client in the virtual machine. In the "clients" menu, select "add a new client". You should now have this box in front of you with "name" and "location", as well as a check box that says "Client is on a virtual machine". Go ahead and check that "Client is on a virtual machine" box. Under "name", type in whatever you wish to call the client. Under "location", click that button with the "..." to the left of the text field. A new "browse for folder" window should show up, with your directory structure in windows. All you have to do now is navigate to the "network" folder and wait a little. Your "MYHOST" virtual machine should appear in a little bit. Click on the "MYHOST" virtual machine and you'll find the contents of your shared folder from your VM. Click on the folder entitled "Folding" and click OK. Now click OK again to get out of the "add new client" window. Your VM's folding client should now appear on fahmon's monitoring window, showing your current WU, PPD, progress, etc.
Enjoy!
If it helps any, I got this to work using windows 7, build 7600. Virtualbox 3.08 r53138, and the archlinux-2009.02-core-x86_64.iso disc image, using the network install to install the operating system.
Also, to give credit where it's due, this guide is basically a combination of the samba and pacman guides on the arch wiki, with the folding@home linux SMP guide from stanford's website, just implemented in the context of a virtual machine.
1. Get Virtualbox, fahmon, and Arch Linux
The first thing that you want to do is get yourself a copy of a 64-bit distribution of Arch Linux here.
You're then going to want to install the latest version of virtualbox, which you can get from here.
To monitor your folding clients, get Fahmon from here.
2. Set up a new virtual machine so you can install Arch Linux
Once you have virtualbox up and running, click the "New" button on the top left and follow the guide to setting up a new virtual machine. Under the "VM Name and OS Type" prompt, you can call the VM whatever you want, but select make sure to select Linux as your OS, and Arch Linux x64 as your version.
When asked how much memory to assign to the VM, I assigned it about 600M, although I'm not really sure if there's a "sweet spot" as far as folding is concerned. I have run into weird booting issues when assigning over 2 gigs of memory to the machine though....so I guess you really can't go to far.
When asked how big of a hard drive you want to assign to the machine, the standard 8 gigs is just fine. I picked the "dynamically expanding storage" option so it wouldn't take up too much space on my HD. Go ahead and make a hard drive. After you make it, the machine should be ready for its initial boot up so you can install the OS.
3. Initial OS install
The easiest way to install the OS is to leave everything at its defaults. I chose a network install from a mirror that was close to me so the packages could download as fast as possible. As far as partitioning is concerned, I used the guided partitioner and just left boot and swap at their default size and split "/" and "/home" 50/50 with the remaining space. When asked which packages to install, I just chose "base" and left it at that. I'm sure some more linux savy people here know how to trim the fat on a folding machine, but I sure don't, hahaha. The bootloader install should be the last step before it asks you to reboot into your new system. What you're going to do here is power off the machine when the install is finished, because we are going to change a few settings with the virtual machine.
4. Change VM settings
If you've powered off the VM, you should be back at the virtualbox main menu, with your new VM shown on the top left. Above the VM is a button called "settings" that's no longer grayed out now that the VM is powered off. Click on the settings button. Here, you can set the amount of processors you want to fold on under the "system" menu. Once you finish that, you're going to want to head over to the "network" menu and set the adapter to "bridged" mode from "NAT". When this happens, you should see the name of your ethernet adapter in the drop down menu underneath. Save these settings and fire up your VM again. Login as root (no password needed)
5. Samba setup
The first thing you're going to want to do is set up a folder that you're folding files are going to go into, and make it a shared public folder such that you can access it on the host machine. To do this we're going to need the program Samba. Before getting samba, you're going to want to have Pacman synchronize and update the system by typing the following:
pacman -Syu
Now lets make a shared directory for the F@H client:
mkdir /home/shared
You can then go ahead and get both samba and the 32bit libraries required for the SMP client by typing the following:
pacman -S samba lib32-glibc
Once that's done installing, you're going to want to rename the smb.conf template:
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
In this folder you're going to want to make some modifications, so open up smb.conf with your text editor:
nano /etc/samba/smb.conf
-Under "Global Settings", change the workgroup to your network's workgroup (which you can find on windows by clicking start->right click my computer->properties). You'll also want to change the "security = user" line to "security = share"
-Under "share definitions", the first share definition should be one called "[homes]". For simplicity's sake, I just edited this definition to the definition below:
[Folding]
comment = Home Directories (you can change this if you want)
path = /home/shared (the folder that you made for F@H)
browseable = yes
writeable = yes (this is probably not needed, but I left it there)
public = yes
That should do it for smb.conf editing. If you're using the nano text editor, just hit Ctrl+X to exit and hit Y to save your changes. Don't rename the folder because you did that already.
Now lets make sure samba starts up with the machine every time you power it on. Edit the rc.conf folder by typing:
nano /etc/rc.conf
At the bottom of the file, there should be a section entitled "DAEMONS" with some commands in parenthesis. Go ahead and stick the word "samba" into the list of words in parenthesis and exit by hitting Ctrl+X again and then Y to save the changes.
Now lets go ahead and refresh samba:
/etc/rc.d/samba restart
You can now test to see if your shared folder is, in fact, shared, by going to the "network" folder in windows (my network places in XP). You should see a list of users on the network. The user with the samba shared folder is called "Myhost". Double click on that and see if your shared folder is in there. If it is, we're ready to finally get the folding client.
6. Getting the folding client
Now that we have the file sharing between the client and host up and running, we can finally get the folding client as per the instructions on stanford's website. Navigate to the shared folder that you set up in samba:
cd /home/shared
Once in here, you can nab the new beta SMP linux folding client with the "wget" command:
wget http://www.stanford.edu/group/pandeg...beta-Linux.tgz
This will download the client directly to your shared folder. Now all that's left is to extract it with the "tar" command:
tar xzf FAH6.24beta-Linux.tgz
You're now basically in the same situation as the windows folding client....all that's left is to configure your username/team number and other favorite parameters by executing the client with the -configonly flag:
./fah6 -configonly
This should bring up those menus that you may or may not be familiar with (depending if you've used the console client before), but are pretty self explanatory (if not, there are tons of guides on here on what do do with them). After you configure the client, you can start up the SMP folding client by using the "-smp" flag:
./fah6 -smp -verbosity 9
You don't have to type in "-verbosity 9" unless you want to see more information on what the client is doing as it's running.
Congrats, you should now have an SMP folding client running in virtualbox, netting you that awesome PPD that linux SMP clients are known for. Now all that's left is to get fahmon to see it and monitor its progress.
7. Fahmon Detection
Go ahead and run the fahmon installer in windows. Fire up the program and get the latest projects by going to "tools"->"download new projects". Now we're going to add the SMP client in the virtual machine. In the "clients" menu, select "add a new client". You should now have this box in front of you with "name" and "location", as well as a check box that says "Client is on a virtual machine". Go ahead and check that "Client is on a virtual machine" box. Under "name", type in whatever you wish to call the client. Under "location", click that button with the "..." to the left of the text field. A new "browse for folder" window should show up, with your directory structure in windows. All you have to do now is navigate to the "network" folder and wait a little. Your "MYHOST" virtual machine should appear in a little bit. Click on the "MYHOST" virtual machine and you'll find the contents of your shared folder from your VM. Click on the folder entitled "Folding" and click OK. Now click OK again to get out of the "add new client" window. Your VM's folding client should now appear on fahmon's monitoring window, showing your current WU, PPD, progress, etc.
Enjoy!
If it helps any, I got this to work using windows 7, build 7600. Virtualbox 3.08 r53138, and the archlinux-2009.02-core-x86_64.iso disc image, using the network install to install the operating system.