Install a CentOS 6.x Appliance Template in Proxmox

It’s quite easy to install a CentOS 6.0 appliance (template).

  1. Download the precreated template from the OpenVZ site (http://wiki.openvz.org/Download/template/precreated/ ) and store it in the folder /var/lib/vz/template/cache/ of your Proxmox hostnode
  2. Rename the template to <OS>-<OSVERSION>-<NAME>_<VERSION>_<ARCH>.tar.gz to suit Proxmox’ naming convention.
    E.g. centos-6-x86.tar.gz —> centos-6-standard_6.0_i386.tar.gz
    or centos-6-x86_64.tar.gz —> centos-6-standard_6.0_amd64.tar.gz
  3. In the Proxmox Virtual Environment web administrator goto "Virtual Machines -> Create" and use your new template there

Source: http://forum.proxmox.com/archive/index.php/t-6676.html


Как создать контейнер для proxmox

Делаю контейнер Debian 6 с предустановленным mc и настроенным на utf8 в Московской временной зоне.


Step 1) Create a virtual machine using whatever template you like.
Step 2) enter the virtual machine (vzctl enter CTID)
where CTID is the ID of the virtual machine
Step 3) Install/remove any software you want:

  1. Обновляем и настраиваем Utf8 и русскую локаль
    1. apt-get update
    2. apt-get upgrade
    3. apt-get install aptitude
    4. dpkg-reconfigure locales  (выбираем ru_UTF8)
    5. su (перезаходим, что бы изменения вступили в силу)
    6. apt-get install mc (устанавливаем mc)
  2. Устанавливаем временную зону Москвы, что бы показывал московское время
    1. # rm /etc/localtime
    2. # ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime

Step 4) Exit out of the virtual machine (but do not stop it)
Step 5) remove the ip address from the virtual machine
vzctl set CTID —ipdel all —save
or use the web interface to remove the ip address
Step 6) Stop the virtual machine
vzctl stop CTID
or use the web interface
Step 7) change directory to the virtual machines directory
cd /var/lib/vz/private/CTID
Step 8) tar the directory
tar –czvf /var/lib/vz/template/cache/debian-6.0-standard.ru.utf8_6.0-4_i386.tar.gz .
Note: the commands ends with a space followed by a period
Make sure you are in the directory for the virtual container


Подробее можно почитать тут: http://forum.proxmox.com/threads/452-Creating-custom-templates