Installing Chef Server in an OpenVZ Container

I love OpenVZ, but I was unfortunately never able to successfully install Chef Server in a container; I’ve always had to try it out on KVM or Xen instead. The culprit was the procps package, which refused to install as a dependency.

After looking into it, it turns out that a sysctl setting conflicted with procps, causing that error. OpenVZ doesn’t even use sysctl (or any other kernel-level settings) since it’s effectively a chroot, and inherits all settings from the host.

The solution, found here, was to delete the following (Ubuntu 12.04 here):

This corresponds to the setting  kernel.kptr_restrict = 1 .  On other distros, simply grep out that setting in sysctl.conf or sysctl.d, and remove it.

Once that’s done, you should be good to go with the install.

On Ubuntu 12.04, using the traditional OpenVZ templates, I do:

That’s all, folks!

Leave a Reply

Your email address will not be published. Required fields are marked *