Difference between revisions of "Fedora Core 5 Tips"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(Initial version)
 
(Creating your own templates: use --numeric-owner option for tar)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Fedora Core 5 Tips ==
 
== Fedora Core 5 Tips ==
  
OpenVZ is a neat piece of software, but sometimes there are confusing things that make it frustrating to use.
+
This is a collection of guidelines/tips for installing openvz on Fedora Core 5, with some gotchas covered.
 
 
This is a collection of guidelines/tips for installing openvz on Fedora Core 5, with a lot of the common gotchas covered.  
 
  
 
== Use development branch ==
 
== Use development branch ==
  
You should be using the OpenVZ development branch of kernels with FC5. The kernels have test in their name. Go to your yum repo configuration and make sure that the development repo is enabled or do the following.
+
You should be using the OpenVZ development branch of kernels with FC5. The kernels have <code>test</code> in their name. Go to your [[yum]] repo configuration and make sure that the development repo is enabled, or do the following:
  
  <pre>
 
 
   echo '
 
   echo '
 
   [openvz-kernel-devel]
 
   [openvz-kernel-devel]
Line 18: Line 15:
 
   gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ
 
   gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ
 
   ' > /etc/yum.repos.d/openvz-devel.repo
 
   ' > /etc/yum.repos.d/openvz-devel.repo
  </pre>
 
  
Note: Do not install the FC5 openvz kernel on the website, it is outdated if you have an up to date FC5 install
+
Note: Do not install the FC5 openvz kernel on the website, it is outdated if you have an up to date FC5 install.
 +
 
 +
== Creating your own templates ==
  
== Fix metadata ==
+
If you are trying to tar up a vps to use as a template, make sure you tar up the INSIDE of the vps, and do not include the vpsid at the beginning (ie /101/).
 +
 
 +
<pre>
 +
  tar --numeric-owner -zcf /vz/template/cache/fedora-core-5-i386-minimal-mine.tar.gz -C /vz/private/101/ .
 +
</pre>
  
After installing the metadata, run the following
+
If you create a ve from one of your own templates, you should edit veid.conf in /etc/vz/conf to set the OSTEMPLATE variable back to fedora-core-5. This will insure that vzyum etc continue to work. Otherwise openvz may not find the metadata for your machine.
  
  <pre>
+
== Yum differences ==
  INFILE=/vz/template/fedora-core/5/i386/config/default.list
 
  if [ ! -e $INFILE.orig ]
 
  then
 
    cp $INFILE $INFILE.orig
 
  fi
 
  sed 's/caching-nameserver/bind-config/' $INFILE.orig > $INFILE
 
  </pre>
 
  
 +
OpenVZ creates an entirely new yum.conf as part of the meta-data for a distribution. For FC5 this is in '/vz/template/fedora-core/5/i386/config/yum.conf'. If you have a local repository mirror of FC5 this means openvz will seem very slow unless you update this new openvz yum.conf to match your normal system yum.conf.
  
== Creating your own templates ==
+
Additionally vzyum doesn't seem to pick up $releasever in yum files. I haven't figured that one out yet, and havn't rechecked.
  
If you are trying to tar up a vps to use as a template, make sure you tar up the INSIDE of the vps, and do not include the vpsid at the beginning (ie /101/).
+
[[category:HOWTO]]
 
 
  <pre>
 
  tar -zcf /vz/template/cache/fedora-core-5-i386-minimal-mine.tar.gz -C /vz/private/101/ .
 
  </pre>
 

Latest revision as of 10:47, 19 October 2009

Fedora Core 5 Tips[edit]

This is a collection of guidelines/tips for installing openvz on Fedora Core 5, with some gotchas covered.

Use development branch[edit]

You should be using the OpenVZ development branch of kernels with FC5. The kernels have test in their name. Go to your yum repo configuration and make sure that the development repo is enabled, or do the following:

 echo '
 [openvz-kernel-devel]
 name=OpenVZ development kernel
 mirrorlist=http://download.openvz.org/kernel/mirrors-devel
 enabled=1
 gpgcheck=1
 gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ
 ' > /etc/yum.repos.d/openvz-devel.repo

Note: Do not install the FC5 openvz kernel on the website, it is outdated if you have an up to date FC5 install.

Creating your own templates[edit]

If you are trying to tar up a vps to use as a template, make sure you tar up the INSIDE of the vps, and do not include the vpsid at the beginning (ie /101/).

  tar --numeric-owner -zcf /vz/template/cache/fedora-core-5-i386-minimal-mine.tar.gz -C /vz/private/101/ .

If you create a ve from one of your own templates, you should edit veid.conf in /etc/vz/conf to set the OSTEMPLATE variable back to fedora-core-5. This will insure that vzyum etc continue to work. Otherwise openvz may not find the metadata for your machine.

Yum differences[edit]

OpenVZ creates an entirely new yum.conf as part of the meta-data for a distribution. For FC5 this is in '/vz/template/fedora-core/5/i386/config/yum.conf'. If you have a local repository mirror of FC5 this means openvz will seem very slow unless you update this new openvz yum.conf to match your normal system yum.conf.

Additionally vzyum doesn't seem to pick up $releasever in yum files. I haven't figured that one out yet, and havn't rechecked.