Ubuntu and OpenVZ

From FOG Project
Revision as of 20:25, 15 March 2016 by SebastianRoth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

 packages="
 storageNodePackages="

change

 nfs-kernel-server

to

 unfs3

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/255.255.255.0(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
 /images/dev                    x.x.x.x/255.255.255.0(rw,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.)