h1

Updating OS EZ Template Caches

August 24, 2009

#####################################

[root@vps ~]# ls /vz/template/cache
centos-5-x86.tar.gz fedora-core-9-x86.tar.gz ubuntu-8.04-x86.tar.gz
[root@vps ~]#

[root@vps ~]# vzpkg update cache centos-5-x86
Update OS template cache for centos-5-x86 template

Loading “rpm2vzrpm” plugin
Cleaning up xml metadata
16 metadata files removed

Loading “rpm2vzrpm” plugin
Making cache files for all metadata files.
This may take a while depending on the speed of this computer
Setting up repositories
base0 100% |=========================| 1.1 kB 00:00
base1 100% |=========================| 951 B 00:00
base2 100% |=========================| 951 B 00:00
base3 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 878 kB 00:00
primary.xml.gz 100% |=========================| 306 kB 00:00
base1 : ################################################## 465/465
Added 296 new packages, deleted 0 old in 4.80 seconds
primary.xml.gz 100% |=========================| 1.7 kB 00:00
primary.xml.gz 100% |=========================| 1.0 kB 00:00
filelists.xml.gz 100% |=========================| 2.8 MB 00:00
filelists.xml.gz 100% |=========================| 2.2 MB 00:00
base1 : 2/465
=== == == == ==
=== == == == ==
=== == == == ==
=== == == == ==
ev.i386 0:095-14.20.el5_3 usermode.i386 0:1.88-3.el5.2 util-linux.i386 0:2.13-0.50.el5 vim-common.i386 2:7.0.109-4.el5_2.4z zlib.i386 0:1.2.3-3
Complete!
grep: /tmp/pam/*: No such file or directory
OS template centos-5-x86 cache was updated
[root@vps ~]#

[root@vps ~]# ls /vz/template/cache
centos-5-x86.tar.gz centos-5-x86.tar.gz-old fedora-core-9-x86.tar.gz fedora-core-9-x86.tar.gz-old ubuntu-8.04-x86.tar.gz
[root@vps ~]#

[root@vps ~]# vzup2date

2 comments

  1. Eeek! I tried to follow your tutorial on CentOS 5.3, but vzpkgcache fails with following error:

    sed: can’t read /etc/init.d/syslog: No such file or directory
    ERROR: Script install-post failed
    Updating cache for centos-5-i386-default OS template
    rpmdb: unable to initialize mutex: Invalid argument
    rpmdb: PANIC: Invalid argument
    rpmdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
    error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db3 – (-30977)
    error: cannot open Packages database in /vz/root/100001/var/lib/rpm
    Traceback (most recent call last):
    File “/usr/share/vzyum/bin/yum”, line 28, in ?
    yummain.main(sys.argv[1:])
    File “/usr/share/vzyum/yum-cli/yummain.py”, line 75, in main
    base.getOptionsConfig(args)
    File “/usr/share/vzyum/yum-cli/cli.py”, line 172, in getOptionsConfig
    self.doConfigSetup(fn=opts.conffile, root=root, vps=opts.vps)
    File “/usr/share/vzyum/lib/yum/__init__.py”, line 82, in doConfigSetup
    self.conf = config.yumconf(configfile=fn, root=root, vps=vps)
    File “/usr/share/vzyum/lib/yum/config.py”, line 271, in __init__
    self.yumvar[‘releasever’] = self._getsysver()
    File “/usr/share/vzyum/lib/yum/config.py”, line 384, in _getsysver
    idx = ts.dbMatch(‘provides’, self.getConfigOption(‘distroverpkg’))
    TypeError: rpmdb open failed
    ERROR: Command yum check-update failed with 1 exit code


  2. Hi,

    Try to Rebuild an rpm database using following commands as it seems your rpm database is corrupt.

    1) cd /var/lib
    2) tar czvf /tmp/rpmdb.tar.gz rpm

    ( if you do not have much space in /tmp, you can change the path to /root/rpmdb.tar.gz, which is just to keep a backup of current db as a precaution, if the rebuild completes succesfully, you can delete /tmp/rpmdb.tar.gz )

    3) cd /var/lib/rpm
    4) rm -f __db*
    5) rpm –rebuilddb -vv

    You might also be tempted to run the following in 6th step ( if the file /etc/init.d/syslog does not exist)

    yum install sysklogd

    ( or yum install rsyslog , if sysklogd is not available )

    since it was showing missing /etc/init.d/syslog in the error

    Then try to run vzpkgcache again.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: