Changes

Jump to: navigation, search

Centos Upgrade 4.x to 5.x

9 bytes added, 12:23, 2 June 2011
make CTID a variable
==Create a container using centos-4-i386-minimal and set a valid nameserver==
<pre>
vzctl create $CTID --ostemplate centos-4-i386-minimal --config CONFIG_TEMPLATE --ipadd container_IP --hostname tempvzctl set $CTID --nameserver NAMESERVER_IP --save
</pre>
==Enter in container==
<pre>
vzctl enter $CTID
</pre>
==Upgrade container packages using vzyum (32bit only)==
<pre>
vzyum $CTID upgrade
</pre>
Note: If yum db-version complains do "rm /vz/root/VZNUM/var/lib/rpm/__*" to delete conflicting db.
==Stop your VE==
<pre>
vzctl stop $CTID
</pre>
==Replace the new /dev/ with the old one==
<pre>
cd /vz/private/$CTID
rm -rf dev
tar -xvf dev.tar
==Start the container==
<pre>
vzctl start $CTID
</pre>
==Stop container==
<pre>
vzctl stop $CTID
</pre>
==Create the template==
<pre>
cd /vz/private/$CTID
tar --numeric-owner -zcf /vz/template/cache/centos-5.5-i386-minimal.tar.gz .
</pre>
27
edits

Navigation menu