User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

proxmox:updating_openvz_container [2015/06/29 12:10]
proxmox:updating_openvz_container [2015/06/29 12:10] (current)
Line 1: Line 1:
 +This article describes how you can update an existing precreated Debian or Ubuntu template.
 +===== Creating/​configuring a temporary container =====
 +  - Create a container based on the template you want to update. for this you can use the GUI.
 +  - Then enter the asked values and start your container.
 +===== Updating =====
 +  - Login in the Proxmox node where the VPS was created.
 +  - Check your container'​s ID (check CTID column) with the following command: <​code>#​ vzlist</​code>​
 +  - Enter the container: <​code>#​ vzctl enter [CTID]</​code>​
 +  - Configure the repositories.
 +  - Update metadata and install updates: <​code>#​ apt-get update && apt-get upgrade</​code>​
 +  - Cleanup: <​code>#​ apt-get clean && apt-get autoclean</​code>​
 +  - Clean unused log files, .bash_history etc, then exit from a container: <​code>#​ exit</​code>​
 +  - Stop a container.
 +===== Packing a new template cache =====
 +To complete this task you can create a new tarball:
 +# cd /​var/​lib/​vz/​private/​[CTID]
 +# tar --numeric-owner -czf /​var/​lib/​vz/​template/​cache/​debian-7.8-mininal-i386.tar.gz .
 +Where [CTID] is the container'​s ID.
 +Another way is backup your container using the GUI and move the backup file to /​var/​lib/​vz/​template/​cache/​. Remember select the compression method: //GZIP (good)// and Mode: //stop//.
proxmox/updating_openvz_container.txt ยท Last modified: 2015/06/29 12:10 (external edit)