[Solved]Can't install yum on container. [message #32287] |
Wed, 30 July 2008 11:46 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
![](http://new-forum.openvz.org/images/custom_avatars/1154.jpg) |
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
|
|
|
|
Re: Can't install yum on container. [message #32324 is a reply to message #32287] |
Thu, 31 July 2008 19:04 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
![](https://forum.openvz.org/images/custom_avatars/125.jpg) |
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
If you can't get vzyum to work (which is problematic on newer system, especially x86_64), you can manually install yum inside of your container using rpm.
If your container is new and you don't care about destroying it and starting over, you can use one of the contributed pre-created OS Templates I've created (that I'm trying to keep updated by uploading a new one once a month) that has yum already installed.
For manually installing yum into your container see the following wiki article:
http://wiki.openvz.org/Install_yum
That might be a little outdated if any of the packages have been updated... so find a CentOS repository and copy the links to the packages. Oh, and you don't have to do a separate rpm -ivh for each individual package... you can do them all at once. Just put a space between package names. If the package list is incomplete and it stills throws up some unresolved dependencies (rpm doesn't resolve deps), then you just need to keep tacking on all of the needed packages until you have everything. I have used that recipe from the wiki and it worked for me.
If you want my contributed pre-created OS Templates, see here:
http://download.openvz.org/template/precreated/contrib/
They are the CentOS (and Fedora) files with dates as part of the filenames... and are current as of the date given (last Friday when I wrote this).
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
|
|
|
|
Re: Can't install yum on container. [message #32389 is a reply to message #32388] |
Mon, 04 August 2008 23:40 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
![](https://forum.openvz.org/images/custom_avatars/125.jpg) |
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Well, part of the "Enterprise" distro concept is that the updates are totally compatible and pain free so I don't recommend hovering at an older version.
Of course that is outside the scope of OpenVZ and your mileage may vary.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|