Editing Fedora template update
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This article describes the procedure of manual template update, using Fedora template as an example. | 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 | + | This is useful in the case you have some precreated template which is a bit old, and you want to create many VEs based on it. To escape the updating of all those new VEs right after their creation, it makes sense to update the template itself. |
− | The idea is simple: you create a temporary | + | The idea is simple: you create a temporary VE, 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 | + | The below instructions are for updating Fedora 7 template for PPC architecture, using VE IDs 111 and 222 as temporary VEs. Please substitute your own VE IDs and template names. |
− | == Creating/starting a temporary | + | == Creating/starting a temporary VE == |
− | You should create a temporary | + | You should create a temporary VE first. |
# vzctl create 111 --ostemplate fedora-7-ppc-minimal | # vzctl create 111 --ostemplate fedora-7-ppc-minimal | ||
Line 16: | Line 16: | ||
# vzctl set 111 --ipadd 10.0.0.111 --save | # vzctl set 111 --ipadd 10.0.0.111 --save | ||
− | + | Finally, start your new VE: | |
− | |||
− | |||
− | Finally, start your new | ||
# vzctl start 111 | # vzctl start 111 | ||
− | == Updating a | + | == Updating a VE == |
− | First, enter a | + | First, enter a VE: |
# vzctl enter 111 | # vzctl enter 111 | ||
Line 45: | Line 42: | ||
== Clean up == | == Clean up == | ||
− | Сlean the yum repository inside a | + | Сlean the yum repository inside a VE to minimize: |
# yum clean all | # yum clean all | ||
− | Еxit from a | + | Еxit from a VE and stop it: |
# logout | # logout | ||
Line 54: | Line 51: | ||
# vzctl stop 111 | # vzctl stop 111 | ||
− | Remove the IP from the | + | Remove the IP from the VE: |
# vzctl set 111 --ipdel all --save | # vzctl set 111 --ipdel all --save | ||
Line 77: | Line 74: | ||
The sizes should not differ much. | The sizes should not differ much. | ||
− | Try to create and start | + | Try to create and start VE made from your new template: |
# vzctl create 222 --ostemplate fedora-7-ppc-minimal | # vzctl create 222 --ostemplate fedora-7-ppc-minimal | ||
# vzctl set 222 --ipadd 10.0.0.222 --save | # vzctl set 222 --ipadd 10.0.0.222 --save | ||
Line 83: | Line 80: | ||
# vzctl enter 222 | # vzctl enter 222 | ||
− | Now execute a few basic commands to check | + | Now execute a few basic commands to check VE is fine. Examples are: ps ax, rpm -qa, etc. |
− | Finally, clean up the testing | + | Finally, clean up the testing VE: |
# vzctl stop 222 | # vzctl stop 222 | ||
# vzctl destroy 222 | # vzctl destroy 222 |