Attila Sukosd's blog

ProxMox (OpenVZ) + Fog Project (v0.29)

Alright, so at one of my works in my university, I am in charge of around 40 workstations with some very good hardware (i7, 6/12GB ram, Nvidia Quadro FX5800), and all of it should of course run Windows 7 to take advantage of the DX11 support etc.  In the previous years, the sysadmins before me were using Symantec Ghost to image all the machines, by running around and popping in a CD to every machine (back then ghost didnt support pxe boot)

Anyway, since I’m not a big fan of Windows or Symantec, I’ve decided to look for an opensource solution, and the nicest one I’ve found was http://fogproject.org. It has a pretty good web interface, and supports many things..

So recently, I’ve setup a ProxMox cluster of 2 32bit P4 machines (more on that in another post), which of course have no Intel-VT to run kvm guests, and since I’m planning to run linux on the server side mostly, OpenVZ serves the purpose with much less overhead anyway. Then I just created a new VM for Fog, downloaded the latest sources/installer, but then I realised it tries to use the kernel NFS server, which obviously won’t work since OpenVZ shares kernels with the host, so after looking at the source for 5 minutes, it turns out you only need to change 4 lines to replace nfs-kernel-server with unfs3, which runs in the user space:

lib/ubuntu/functions.sh (lines 108-110):

sysv-rc-conf nfs-kernel-server on >/dev/null 2>&1;
/etc/init.d/nfs-kernel-server stop >/dev/null 2>&1;
/etc/init.d/nfs-kernel-server start >/dev/null 2>&1;

To:

sysv-rc-conf unfs3 on >/dev/null 2>&1;
/etc/init.d/unfs3 stop >/dev/null 2>&1;
/etc/init.d/unfs3 start >/dev/null 2>&1;

And in lib/ubuntu/config.sh (lines 24,25):

packages=”apache2 php5 php5-gd php5-cli php5-mysql php5-curl mysql-server mysql-client dhcp3-server tftpd-hpa tftp-hpa nfs-kernel-server vsftpd net-tools wget xinetd  sysv-rc-conf tar gzip build-essential cpp gcc g++ m4 htmldoc perl libcrypt-passwdmd5-perl lftp openssh-server php-gettext clamav-freshclam”;
storageNodePackages=”apache2 php5 php5-cli php5-mysql php5-curl mysql-client nfs-kernel-server vsftpd net-tools wget xinetd sysv-rc-conf tar gzip build-essential cpp gcc g++ m4 lftp php-gettext”;
langPackages=”language-pack-it language-pack-en language-pack-zh-hans”;
dhcpname=”dhcp3-server”;

To:

packages=”apache2 php5 php5-gd php5-cli php5-mysql php5-curl mysql-server mysql-client dhcp3-server tftpd-hpa tftp-hpa unfs3 vsftpd net-tools wget xinetd  sysv-rc-conf tar gzip build-essential cpp gcc g++ m4 htmldoc perl libcrypt-passwdmd5-perl lftp openssh-server php-gettext clamav-freshclam”;
storageNodePackages=”apache2 php5 php5-cli php5-mysql php5-curl mysql-client unfs3 vsftpd net-tools wget xinetd sysv-rc-conf tar gzip build-essential cpp gcc g++ m4 lftp php-gettext”;
langPackages=”language-pack-it language-pack-en language-pack-zh-hans”;
dhcpname=”dhcp3-server”;

Then just run the installfog.sh in the bin directory, and you should be good to go!

I haven’t tested performance extensively yet, but it seems decent so far.


Posted by admin on June 13th, 2010 :: Filed under Default