OVZ: prevent change hostname from container

From vpsget wiki
Revision as of 23:24, 26 June 2014 by Ndi (talk | contribs) (Created page with "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 ho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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