As many of you may already know, VMware just released the VMware Appliance for Folding @ Home Fling last week and you can check out this blog post A Force for Good: VMware Appliance for Folding @ Home by Amanda Blevins for all the details. For those new to F@H and wish to participate, the VMware F@H Appliance is highly recommended as it is optimized and makes it very easy to setup and all configurations are driven through OVF properties. We certainly would appreciate it if you supported Team VMware (52737) which is the default team configuration but you can technical specify any valid F@H team ID during the deployment wizard.
Early next week, I expect to release another update to the appliance which will include support for vHW11, VMware Fusion and Workstation and several other enhancements and fixes. Having said that, there are a handful of folks who may not be able to use the appliance as-is or prefer to run this on another Hypervisor platform which does not support OVF properties but still wish to support Team VMware's effort with F@H. For these reasons, here are the instructions for using VMware Photon OS, a free and tiny Linux distribution for running the F@H home software.
Disclaimer: VMware does not officially support the Folding At Home application. For more details or questions, please refer to the official F@H documentation as well as their technical forums.
Step 1 - Download Photon OS 3.0 Revision 2 Minimal ISO and install that into a new 64-bit Linux VM with 1 or more vCPU, 1GB memory and 4GB storage. For those planning to use a GPU (details for setting up NVIDIA GRID with vGPU can be found in the download instructions here), you will need to configure the VM to have EFI Firmware.
Step 2 - Once Photon OS has been installed, enable root to login via SSH and then run the following commands to update the OS and install the following package dependencies:
tdnf -y update
tdnf -y install wget
Step 3 - Run the following commands to download and install the Folding @ Home packages:
ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.10
ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.10
wget https://download.foldingathome.org/releases/beta/release/fahclient/centos-6.7-64bit/v7.6/fahclient-7.6.13-1.x86_64.rpm
wget https://download.foldingathome.org/releases/beta/release/fahcontrol/centos-6.7-64bit/v7.6/fahcontrol-7.6.13-1.noarch.rpm
wget https://download.foldingathome.org/releases/beta/release/fahviewer/centos-6.7-64bit/v7.6/fahviewer-7.6.13-1.x86_64.rpm
rpm -i --nodeps fahclient-7.6.13-1.x86_64.rpm
rpm -i --nodeps fahcontrol-7.6.13-1.noarch.rpm
rpm -i --nodeps fahviewer-7.6.13-1.x86_64.rpm
rm -f fahclient-7.6.13-1.x86_64.rpm
rm -f fahcontrol-7.6.13-1.noarch.rpm
rm -f fahviewer-7.6.13-1.x86_64.rpm
Step 4 - Run the following commands to allow port 36330 (remote management of F@H Client using FAHControl) and port 7396 (local web management of F@H Client using FAH Web Control via http://[FAHCLIENT]:7396) and ensure the configurations are persisted:
iptables -A INPUT -p tcp --dport 36330 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --dport 36330 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 7396 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --dport 7396 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables-save > /etc/systemd/scripts/ip4save
systemctl restart iptables
Note: You will also need to ensure that either port 80 or 8080 is enabled on the network which is F@H Client is connected to and this must be bi-directional as this is how Work Units (WU) are assigned from the F@H Service. For those that wish to whitelist the specific source servers, you can refer to the F@H documentation found here.
Step 5 - Edit the F@H Configuration file at /etc/fahclient/config.xml with your respective configurations. Below is a working example (yes, I included my passkey in case you wish to fold as me ;)). If you have more than 16 vCPU configure, make sure to set client-type with value of "bigadv" (more details can be found here) for larger F@H Work Units.
<config> <!-- Folding Slot Configuration --> <gpu v="false"/> <!-- Slot Control --> <power v="light"/> <!-- User Information --> <passkey v="e6cf014f62ba0f60e6cf014f62ba0f60"/> <team v="52737"/> <user v="lamw"/> <!-- Network --> <proxy-enable v="false"/> <proxy v=""/> <proxy-user v=""/> <proxy-pass v=""/> <!-- Folding Slots --> <slot id='0' type='CPU'/> <client-type v=""/> <!-- Remote Command Server --> <command-allow v="127.0.0.1 0.0.0.0/0"/> <password v="VMware1!"/> <!-- Web Server --> <web-allow v="0.0.0.0/0"/> </config>
Note: For any issues with F@H software or configurations, please refer to F@H documentation as well as their technical forums.
Step 6 - Start the F@H Client by running the following command:
/etc/init.d/FAHClient start
Note: If you wish to automatically start the F@H Client upon startup, create the following file /etc/rc.d/rc.local with the following content and ensure it has executable permissions:
#!/bin/bash /etc/init.d/FAHClient start
If you plan to clone your configured F@H VM, make sure to run the following command below prior or you will have duplicate instances on your network.
echo -n > /etc/machine-id
This configuration is already handled for you within the VMware F@H Appliance and you simply run a quick PowerCLI script or clone using the vSphere UI (offline state) and you will not have this issue 🙂
Alexandru says
What is the default username and password to login into the VMware f@h image?
William Lam says
There’s no default password, you set it as part of deployment. Please carefully read the requirements on the Fling site
Marcelo Costa says
Hi William, why did you not used the newer versions of F@H packages on the following links?
https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.5/fahclient-7.5.1-1.x86_64.rpm
https://download.foldingathome.org/releases/public/release/fahcontrol/centos-6.7-64bit/v7.5/fahcontrol-7.5.1-1.noarch.rpm
https://download.foldingathome.org/releases/public/release/fahviewer/centos-6.7-64bit/v7.5/fahviewer-7.5.1-1.x86_64.rpm
William Lam says
Hi Marcelo,
I wasn't aware they had a newer version, I was simply following their official documentation on their site https://foldingathome.org/support/faq/installation-guides/linux/manual-installation-advanced/ and it looks like it points to 7.4 ... we can certainly look at 7.5 in a future update (v1.0.1 was just released a few minutes ago)
Marcelo Ferreira da Costa says
Hi William. That is a commom issue with Folding@Home project. They usually do not update documentation. Sometimes it takes three years or more to them do that.
DanCoco says
I tried a fresh VM using the 7.5.1 links provided but cannot get FAHClient to start.
root@SprNAS-FAH01 [ /etc/init.d ]# ./FAHClient restart -v
Starting fahclient ... /usr/bin/FAHClient: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
FAIL
Is there another package I need?
I tried the guide instructions as above and I couldn't get FAHControl to connect properly. It would show online, but then toggle to updating without ever loading. The Web control worked fine and it finished a work unit without issue. I'm giving up for tonight and will try again tomorrow after sleep.
William Lam says
If you look at my instructions, I'm using 7.4 and NOT 7.5. I've not tried the latest version but recommend using 7.4 and see if that works for you as that's what we're using in the official F@H Appliance
William Lam says
I figured out how to get latest 7.5.1 working, it looks like its expecting specific shared libraries which aren't available. The fix was simple and the instructions have now been updated to use 7.5.1.
FYI - I just published v1.0.2 which also includes 7.5.1 by default now
Doug Billings says
What are some recommended FW rules for a folding appliance on my home network?
William Lam says
Did you see the Note under Step 4?
Christopher Hoffman says
William, if you get the chance, please determine what is required to make an Nvidia GPU work in this scenario. Thanks.
William Lam says
Please see the documentation found on the Fling page, it has instructions for setting up NVIDIA GRID 🙂 This is outside of the scope of this article
DMX says
William thanks for this concise write up. Im a n00bie to linux so i have some easy questions for you. How do i edit the xml file? I tried at the CL of the virtual and tried SSH using putty. Actually i cant login via ssh it tells me access denied. I confirmed im using the correct pw. also when i try to start the fahclient i get a message the file or folder cant be found. TIA
Erik says
How to I view the status in a browser, it says I don't have access with I enter the IP:7396
Saqib-s says
Great write up, got it working, just can't get the client to autostart on reboot, I've created the "/etc/rc.local/local.sh" file and it's executable, running this files does start up the FaH Client, but it does not seem to run on reboot.
Any ideas?
William Lam says
My bad, I just realized the path to local.sh was incorrect :X
It should be /etc/rc.d/rc.local/local.sh
I've updated the blog post, this should auto-run now
Saqib-s says
done this and it does not seem to have made a difference
tux says
For me it is working using /etc/rc.d/rc.local as startup script (file, not directory) - instead of rc.local/local.sh
Saqib-s says
Thank you Tux this works!!! Author please correct to: /etc/rc.d/rc.local
Saqib Sabir says
Noticed today that my vm had an alert about pending updates referring me to tdnf, i ran "tdnf -y update" again and this seems to have installed the updates.
I'd like the VM to installs updates periodically, and think inserting this command into the startup script might be simplest, Is there way to have the VM regularly reboot in order to refresh and update? The FaH workload seems to be happy with reboots in middle of processing?
William Lam says
Security/Update patches for PhotonOS is released monthly IIRC, so you could create a simple cronjob that runs a script that'll check for updates and then reboot. I'm sure you can find many examples online on how to create basic cron script