Changes

Jump to: navigation, search

Fedora template update

155 bytes added, 11:12, 26 February 2008
m
VE->container
This article describes the procedure of manual template update, using Fedora template as an example.
This is useful in the case you have some precreated template which is a bit old, and you want to create many VEs [[container]]s based on it. To escape the updating of all those new VEs [[container]]s right after their creation, it makes sense to update the template itself.
The idea is simple: you create a temporary VE[[container]], start it, run the update cycle and then pack the results into a tarball. Some caution must be taken in order for this tarball to be clean though.
The below instructions are for updating Fedora 7 template for PPC architecture, using VE IDs VEIDs 111 and 222 as temporary VEs[[container]]s. Please substitute your own VE IDs VEIDs and template names.
== Creating/starting a temporary VE container ==
You should create a temporary VE [[container]] first.
# vzctl create 111 --ostemplate fedora-7-ppc-minimal
# vzctl set 111 --ipadd 10.0.0.111 --save
Finally, start your new VE[[container]]:
# vzctl start 111
== Updating a VE container ==
First, enter a VE[[container]]:
# vzctl enter 111
== Clean up ==
Сlean the yum repository inside a VE [[container]] to minimize:
# yum clean all
Еxit from a VE [[container]] and stop it:
# logout
# vzctl stop 111
Remove the IP from the VE[[container]]:
# vzctl set 111 --ipdel all --save
The sizes should not differ much.
Try to create and start VE [[container]] made from your new template:
# vzctl create 222 --ostemplate fedora-7-ppc-minimal
# vzctl set 222 --ipadd 10.0.0.222 --save
# vzctl enter 222
Now execute a few basic commands to check VE [[container]] is fine. Examples are: ps ax, rpm -qa, etc.
Finally, clean up the testing VE[[container]]:
# vzctl stop 222
# vzctl destroy 222
13
edits

Navigation menu