OpenVZ Forum


Home » General » Support » [Solved]Can't install yum on container.
[Solved]Can't install yum on container. [message #32287] Wed, 30 July 2008 11:46 Go to previous message
JimL is currently offline  JimL
Messages: 116
Registered: February 2007
Senior Member
Running openvz on Ubuntu Hardy. Couldn't figure out how to make vzyum work on that platform so I went to a Centos 5 system to build a container and then migrate it.

First problem:

vzyum 733 install yum
ERROR: vzrpm43 path not found: /usr/share/vzpkgtools/vzrpm43
ERROR: RPM python path not found: /lib/python2.4/site-packages

OK so I noticed that rpm was 44 not 43, so I changed the /vz/template/centos/4/i386/config/rpm to 44 from 43. I have no idea who maintains that file since it isn't in any package according to rpm -qf.

Now I get :
vzyum 733 install yum
exec /usr/share/vzyum/bin/yum -c /vz/template/centos/4/i386/config/yum.conf --installroot /vz/root/733 --vps=733 install yum
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/733/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

I have no idea what to do about that but I do have another Centos 5 system running openvz so off to that system.

vzyum 733 install yum
...
Installed: yum.noarch 0:2.4.3-4.el4.centos
Dependency Installed: elfutils.i386 0:0.97.1-5 expat.i386 0:1.95.7-4 gmp.i386 0:4.1.4-3 libxml2.i386 0:2.6.16-10.1 libxml2-python.i386 0:2.6.16-10.1 python.i386 0:2.3.4-14.4.el4_6.1 python-elementtree.i386 0:1.2.6-5.el4.centos python-sqlite.i386 0:1.1.7-1.2.1 python-urlgrabber.noarch 0:2.9.8-2 readline.i386 0:4.3-13 rpm-python.i386 0:4.3.3-23_nonptl sqlite.i386 0:3.3.6-2 yum-metadata-parser.i386 0:1.0-8.el4.centos
Dependency Updated: elfutils-libelf.i386 0:0.97.1-5 rpm.i386 0:4.3.3-23_nonptl
Complete!

So that part worked, now to try to migrate it back to Hardy.

vzmigrate --online -r no 192.168.2.44 733
OPT:--online
OPT:-r
OPT:192.168.2.44
Starting online migration of VE 733 on 192.168.2.44
Preparing remote node
/usr/sbin/vzmigrate: line 382: [: missing `]'
Initializing remote quota
Syncing private
Live migrating VE
Syncing 2nd level quota
Error: Failed to undump VE
vzquota : (error) Quota is not running for id 733

OK that didn't work so let's checkpoint it and try to restore on the other system.

vzctl chkpnt 733 --dumpfile /tmp/733
Setting up checkpoint...
suspend...
dump...
kill...
VE is unmounted
Checkpointing completed succesfully
[root@server1 root]# lst /tmp/733
-rw------- 1 root root 517448 Jul 30 07:14 /tmp/733
[root@server1 root]# scp /tmp/733 192.168.2.44:
733 100% 505KB 505.3KB/s 00:00

We're half way there!

vzctl restore 733 --undump --dumpfile 733
VE config file does not exist

So whay isn't there a config file? Oh well, that's easy enough to fix.

scp 192.168.2.250:/etc/vz/conf/733.conf /etc/vz/conf

733.conf 100% 1632 1.6KB/s 00:00
root@chinaberry:/root# ls -l /etc/vz/conf/733.conf
-rw-r--r-- 1 root root 1632 2008-07-30 07:43 /etc/vz/conf/733.conf
root@chinaberry:/root# vzctl restore 733 --undump --dumpfile 733
Restoring VE ...
Starting VE ...
VE private area /vz/private/733 does not exist
root@chinaberry:/root# mkdir /vz/private/733
root@chinaberry:/root# vzctl restore 733 --undump --dumpfile 733
Restoring VE ...
Starting VE ...
Initializing quota ...
VE is mounted
undump...
Error: undump failed: Invalid argument
Restoring failed:
Error: HZ mismatch: 1000 != 100
VE start failed
VE is unmounted

I'm tired of trying things that don't work. Can someone help me get yum installed on a centos 4 minimal template running on a Hardy VE0 platform?

Thanks,
Jim.

"I'm not paranoid, and this proves it, the world is against me!!"

[Updated on: Tue, 05 August 2008 23:00]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: OpenVZ & RAID
Next Topic: Redirect traffic from a specific hostame to a specific VE ?
Goto Forum:
  


Current Time: Sat Sep 07 14:20:12 GMT 2024

Total time taken to generate the page: 0.05972 seconds