Quantcast
Channel: Proxmox Support Forum
Viewing all articles
Browse latest Browse all 170790

Hostname not updating after re template

$
0
0
Hi all,

I have a question about Hostname/re templating a Openvz container.

Up until now I have been going into a container file system from the host
Code:

cd /var/lib/vz/private/101
and issuing a tar command to create a template after I have installed a few things.
Code:

tar -cvzpf /var/lib/vz/template/cache/test1_amd64.tar.gz .
This seems to work apart from the hostname is not updating. In partular im using the centos-6-x86_64.tar.gz from http://openvz.org/Download/template/precreated

So if I make a container from centos-6-x86_64.tar.gz called test1 the hostname will be test1 and there will be entries in the /etc/hosts file to reflect this. If I then create a new template from that machine by the method above and then use it to create a new container called test2 the hostname will still be test1 but the /etc/hosts file is updated to test2

Is there anyway that I can make the hostname update automatically? as the old hostname will not be reflected in the host file.

Viewing all articles
Browse latest Browse all 170790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>