Named for OpenVZ Containers

To have the containers use the named on the host, we first install the bind package on the host. For CentOS, we just need to do

# yum install bind-chroot

Then follow a post like this one http://www.wains.be/index.php/2007/12/13/centos-5-chroot-dns-with-bind/, and configure the local named.

After that, just set the nameservers for each container:

# vzctl set 101 --nameserver 192.168.1.10 --save

(Assume the local host's IP is 192.168.1.10).