Can you Chroot a program from an OpenVZ environment

bindchrootvirtual machine

I just recently purchased a Virtual Private Server, and it is OpenVZ virtualization.

I am setting up my LAMP stack, and in the past I have always just set up my BIND dns set up in a chrooted environment, with the bind-chroot RPM.

I am running CentOS as well.

Now I am just curious as to whether this is even possibly on OpenVZ, because OpenVZ is essentially chrooted itself already. So I have never ran into a situation where I had I came across a chroot in a chroot type situation.

Is this possible?

My main worry is I don't want to do this, and have it corrupt something, and end up getting kicked from the server for something as simple as this you know?

Can I chroot BIND, or should I just go with the regular set up?

Best Answer

OpenVZ is a kernel-level virtualization feature. It's different from a chroot. As far as I know, there's no direct interaction between OpenVZ and chroot, you can use chroot in an OpenVZ VM.

chroot only acts on the process it starts. There's zero risk in trying it out on the command line. Just remember not to change your boot scripts or login scripts if you aren't sure the new ones will work.

Related Question