OVZ: prevent change hostname from container
OpenVZ could change the container hostname on reboot. To change container hostname permanently in easy way you can create the support request.
or you can simply change the hostname like described here:
and after simply set attributes on the /etc/resolve.conf to prevent it being modified on boot:
chattr +i /etc/resolv.conf
Or/and:
chattr +i /etc/hosts
Use
chattr -i
should you ever need to change it again