Create OpenVZ OS Template
- Login to OpenVZ(Hardware Node).
Start the VM for the template creation.(replace 105 with your container ID)
1
vzctl start 105
Remove the IP from the VM.
1
sudo vzctl set 105 --ipdel all --save
Stop the container.
1
vzctl stop 105
Create template
1
cd /vz/private/105/
1
tar -czf /vz/template/cache/<OS>-<ARCH>.tar.gz ./
Create the configuration file.
1
cp /etc/vz/dists/centos.conf /etc/vz/dists/template-name.conf
This post is licensed under CC BY 4.0 by the author.