Ubuntu and OpenVZ

From FOG Project
Jump to: navigation, search

This article is showing one way on how to add NFS support to an OpenVZ container. But there also is a proper way of adding it. For instructions see here Virtualization (see subsection OpenVZ)

FOG will run fine in OpenVZ, when a few tricks are applied during installation.

NFS-server wants to load a kernel module, which is not possible in OpenVZ. Therefore we replace nfs-server with unfs3. Here are the steps:

untar the installation files as described in the manual. A few changes need to be made.

in lib/ubuntu/config.php in the lines that start with






save the file.

In the file lib/ubuntu/functions.php find the configureNFS function. First of all, unfs3 does not like the * in the /etc/exports file. Change them to your subnet, like

 echo "/images                        x.x.x.x/,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
 /images/dev                    x.x.x.x/,sync,no_wdelay,no_root_squash,insecure)" > "${nfsconfig}";

(More on the exports file format on the unfs3 page.)

and restart the correct service

 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;

Now, run the install as described in the manual.

(this is all taken from this forum post on the proxmox website.)