Today, I’ve installed cPanel 11.52 on LXC. LXC knowns as Linux Containers certainly are a lightweight virtualization technology. They are more quite like an enhanced chroot instead of full virtualization like Qemu or VMware, they do not emulate hardware and share the same operating system kernel on a host. Linux-vserver and OpenVZ are two pre-existing, independently developed implementations of containers-like functionality for Linux.
Vastspace has no plan to launch LXC any time soon in spite of the benefits and performance gain over OpenVZ. In case you want to try it out yourself, this is the recommendation from cPanel.
To run cPanel & WHM inside an LXC container, cPanel strongly recommend that you use the following settings:
We strongly recommend that you use Red Hat® Enterprise Linux (RHEL) 7, CloudLinux™ 7, or CentOS 7 as your LXC host. This ensures the best compatibility with cPanel & WHM. While other Linux distributions may work, they require that the system administrator performs additional steps, which we do not support.
We strongly recommend that your LXC containers use CentOS, RHEL, or CloudLinux 6 as the guest. A CentOS, RHEL, or CloudLinux 7 installation requires additional steps to use it as the guest.
Privileged vs unprivileged containers
cPanel & WHM functions in both privileged and unprivileged containers. We strongly recommend that you run cPanel & WHM in a privileged container, because it expects unrestricted access to the system.
The following limitations are inherent to an unprivileged container:
- The host operating system treats the
rootuser as a non-
- You cannot raise the hard limit of a process if you previously lowered it. This action could cause EasyApache 3 to fail.
- Subtle behavior differences may occur.
Required changes for CentOS 7, RHEL 7, or CloudLinux 7
You must make the following configuration changes to run cPanel & WHM inside an LXC container:
- After you create the LXC container, change the
lxc.includeline in the
lxc.conffile to the following line:
- Edit the
lxc.conffile to drop
setpcapcapabilities. To do this, comment the following lines:12
# lxc.cap.drop = setpcap
# lxc.cap.drop = setfcap
- If your system uses AppArmor, you must uncomment the following line in the
lxc.aa_profile = unconfined