Stop Container:
New page
This article shows how to update a Minimal Debian Squeeze Template. Debian Squeeze v6.0.6 was released on 29th Sep 2012 whilst the first release of Debian Squeeze was in Feb 2011.
==Get the Source Template==
On the Proxmox VE host download the source template and name it according to Proxmox VE convention:
==Create Container==
Create an OpenVZ container (assumed VEID '''114''' here) using the source template and study the existing version info:
We will see that only the first command above will show a change in the version when using the updated template.
==Update Container==
The above will update package list and upgrade container to latest version of Debian Squeeze (since only Squeeze repos are in the '''/etc/apt/sources.list'''). As Debian Squeeze uses dependency based startup, we use '''insserv'''. SSH keys must be generated at irst boot of the container and hence the insertion of the '''ssh_gen_host_keys''' script which removes itself after completing random key generation.
==Stop Container==
* Stop the container in the PVE GUI.
* Remove the IP from the container and save the config [[Media:Debian-del-ip.png|from the GUI]].
* and / or remove IP from container from the CLI:
==Remove unwanted files / folders==
This will match the files present in the source template and remove others.
==Build Updated Template==
Uncomment the first command above if such a file already exists which would be the case if a build was done previously, possibly erroneously.
Listing the source and updated templates would show a marginal increase in file size which is to be expected:
-rw-r--r-- 1 root root 77907288 Feb 18 2011 debian-6.0-minimal_6.0-0_i386.tar.gz
-rw-r--r-- 1 root root 78846692 Nov 9 22:05 debian-6.0-minimal_6.0-6_i386.tar.gz
==Destroy Container==
Remove the container from the PVE GUI.
==Test Updated Template==
Create a container using the updated template and start it. The first boot log would be like:
Check the updated version with:
# cat /etc/debian_version
6.0.6
==Update the apl-available==
To make the template available with a proper name in the PVE 1.9 GUI, append the collowing to /var/lib/pve-manager/apl-available (it will get overwritten on next startup of PVE Host or next day when HQ updates the file):
Note that each stanza must have a blank line separating them. Adjust the md5sum to suit your updated template file if you are placing yours in some other Location.
==References==
* [http://wiki.openvz.org/Updating_Debian_template Updating Debian Template]
* [http://wiki.openvz.org/Debian_template_creation Debian Template Creation]
[[Category: HOWTO]]