*CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11007] |
Sun, 11 March 2007 16:30 |
mcarreira
Messages: 30 Registered: February 2007
|
Member |
|
|
After testing successfully openvz in a pentium III computer, I'm now testing openvz in a x86_64 (AMD Athlon 64 dual core), and found some critical problems.
It is impossible to install vzyum, vzpkgcache and vztmpl-* in a x86_64 machine.
I found this problem described in this forum, about vzyum and vzpkg being broken in x86_64.
It seems to me that the problem remains unsolved(?)
I had to install a cache template precreated, then install yum inside a VE, and finally create a new cache template (without vzpkgcache) to allow me to have a full working openvz in my x86_64 computer.
Is this the right way to do it in the present date?
Are there some news about a new "vzyum" to x86_64 machines?
Thank's,
M.Carreira
[Updated on: Wed, 04 April 2007 12:16] by Moderator Report message to a moderator
|
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11011 is a reply to message #11007] |
Mon, 12 March 2007 00:49 |
|
I am having issues with vzyum on my x86_64 Dell SC430 server as well.
Getting this:
exec /usr/share/vzyum/bin/yum -c /vz/template/fedora-core/5/i386/config/yum.conf --installroot /vz/root/101 --vps=101 update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/share/vzpkgtools/vzrpm44/lib/python2.3/site-packages/rp m/_rpmmodule.so: cannot open shared object file: No such file or directory
It seems this is a known issue and there is no solution for it?
Running 'yum' from the VE is difficult because the 'update' process consumes a lot of disk/memory. I am getting diskspace and memory errors when try the yum update from the VE.
--
Stephen
Logical Arts - VPS Hosting
OpenDocMan Hosting
|
|
|
|
|
|
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11158 is a reply to message #11112] |
Wed, 14 March 2007 13:30 |
mcarreira
Messages: 30 Registered: February 2007
|
Member |
|
|
This is the way I found to use vzpkgcache and vzyum to work in a x86_64 system, with a centos-4.4-x86_64 distribution.
I think maybe it work in a fedora core. Someone could try it!
Now I don't need to download a cache package already made.
After creating the first "minimal" and "default" cache packages, I created the first VE and it work the way I expected.
But ATTENTION! I DON'T KNOW IF THERE ARE SOME SIDE EFFECTS for not using vzyum and vzpackage the right way.
This is a work around that seems to work cleanly, but you must test it first.
Until we have a knew vzyum version, this may be an alternative, I hope!
STEP 1:
If you didn't instal yet "vztmpl-centos-4", do it now:
# yum install vztmpl-centos-4
STEP 2:
Create the centos template for x86_64:
# cd /vz/template/centos/4/
# mkdir x86_64
# cp -a /vz/template/centos/4/i386/* /vz/template/centos/4/x86_64
# cd /vz/template/centos/4/x86_64/config
# sed -i.tmp 's/i386/x86_64/g' yum.conf
# rm -f yum.conf.tmp
STEP 3:
Edit the files "minimal.list" and "default.list" and change
MAKEDEV
to
MAKEDEV-3.3.13
(or the MAKEDEV version that you have in /vz/template/centos/4/x86_64/vz-addons)
STEP 4:
If you want your VE's to have other country locales
edit .rpmmacros and change the line "%_install_langs C"
to the language you want, for example:
%_install_langs C:pt_PT:pt_PT.UTF-8:en_US:en_US.UTF-8
STEP 5:
Verify you have rpm-python installed in your system, because it has 64 bit module needed:
# rpm -q rpm-python
Install it if you don't:
# yum install rpm-python
Substitute 32 bit module "rpmmodule.so" from vzpkgtools to 64 bit module that rpm-python provides:
# cd /usr/share/vzpkgtools/vzrpm43/lib/python2.3/site-packages/
# cp -f /usr/lib64/python2.3/site-packages/rpmmodule.so .
# cd /usr/share/vzpkgtools/vzrpm43/lib/python2.3/site-packages/rp mdb
# cp -f /usr/lib64/python2.3/site-packages/rpmdb/_rpmdb.so .
SETP 6:
Edit the file /usr/share/vzpkg/cache-os
Change the next lines:
LINE 136:
change: --vps=$VEID check-update
to: check-update
LINE 185:
change: YUM_CMD="--installroot=$VE_ROOT --vps=$VEID $YUM_CONF_FILE -y $YUM_CMD"
to: YUM_CMD="--installroot=$VE_ROOT $YUM_CONF_FILE -y $YUM_CMD"
STEP 7:
Edit the file /usr/share/vzpkg/functions
Change the next lines:
LINE 21:
change: YUM=/usr/share/vzyum/bin/yum
to: YUM=`which yum`
LINE 22:
change: ARCHES="x86 i386 x86_64 ia64"
to: ARCHES="i386 x86_64 ia64"
LINE 111:
change: export RPM=`get_rpm $tdir`
to: export RPM=`which rpm`
LINE 450:
change: rpm=`get_rpm $tdir`
to: rpm=`which rpm`
Edit the file /usr/bin/vzyum
Change the next lines:
LINE 51:
change: YUM_ARGS="$YUM_ARGS --installroot $VE_ROOT --vps=$VEID"
to: YUM_ARGS="$YUM_ARGS --installroot $VE_ROOT"
############################
# Now everything is ready
############################
Make my first cache:
# vzpkgcache -f centos-4-x86_64
It finishes with complaints about cron, but don't worry about.
Now minimal and default cache are created. List them:
# vzpkgls -c
If everything works then you can create the first VE:
# vzctl create 200 --ostemplate centos-4-x86_64-minimal
(setup ipaddress and so on...)
Copy /etc/sysconfig/i18n to /vz/root/200/etc/sysconfig to change the locales, if you wish.
# vzctl start 200
Now you can test it!
Then test also "vzyum" and see if it works. For instance:
# vzyum 200 install nano
Hope this help!
M.Carreira
|
|
|
|
|
|
|
Re: *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11881 is a reply to message #11007] |
Tue, 10 April 2007 19:46 |
stevier5000
Messages: 1 Registered: April 2007 Location: California
|
Junior Member |
|
|
A couple notes on my install. I have a centos 4.4 x86_64 base system, now running openVZ. After the regular openVZ install, and before the specific instructions here, I had to do the following:
wget http://openvz-mirror1.rapidvps.com/template/utils/vzrpm43/cu rrent/vzrpm43-4.3.3-7_nonptl.6.i386.rpm
wget http://openvz-mirror1.rapidvps.com/template/utils/vzrpm43/cu rrent/vzrpm43-python-4.3.3-7_nonptl.6.i386.rpm
wget http://openvz-mirror1.rapidvps.com/template/utils/vzpkg/curr ent/vzpkg-2.7.0-18.noarch.rpm
wget http://openvz-mirror1.rapidvps.com/template/utils/vzyum/curr ent/vzyum-2.4.0-11.noarch.rpm
wget http://openvz-mirror1.rapidvps.com/template/utils/vzrpm44/cu rrent/vzrpm44-python-4.4.1-22.5.i386.rpm
wget http://openvz-mirror1.rapidvps.com/template/utils/vzrpm44/cu rrent/vzrpm44-4.4.1-22.5.i386.rpm
wget http://openvz-mirror1.rapidvps.com/template/metadata/centos- 4/vztmpl-centos-4-2.0-2.i386.rpm
rpm --nodeps -ivh vzyum-2.4.0-11.noarch.rpm
rpm --nodeps -ivh vztmpl-centos-4-2.0-2.i386.rpm
rpm --nodeps -ivh vzpkg-2.7.0-18.noarch.rpm
rpm --nodeps -ivh vzrpm4*
I was also able to create a template with Fedora Core 5, but it took a bit more to get going. I used yum to install the base template (vztmpl-fedora-core-5.i386), and used the same steps in the tutorial above to change i386 to x86_64.
Other necessary steps:
mv /usr/share/vzpkgtools/vzrpm44 /usr/share/vzpkgtools/vzrpm44.orig
ln -s /usr/share/vzpkgtools/vzrpm43 /usr/share/vzpkgtools/vzrpm44
And when creating the new template, it had trouble creating a couple files, so I had to help it out (while running/after starting vzpkgcache):
vzpkgcache -f fedora-core-5-x86_64-minimal
(and in another terminal)
mkdir /vz/root/10001/etc
mkdir -p /vz/root/10001/var/lock/rpm
(Note: afterwards, I am not able to use vzyum to update the fedora VE's. But I added yum to my minimal.list, so I'm find just installing from within the vz.)
Hopefully this helps someone.
[Updated on: Tue, 10 April 2007 19:48] Report message to a moderator
|
|
|
Re: *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11888 is a reply to message #11881] |
Tue, 10 April 2007 22:45 |
mcarreira
Messages: 30 Registered: February 2007
|
Member |
|
|
stevier5000 wrote on Tue, 10 April 2007 20:46 |
(Note: afterwards, I am not able to use vzyum to update the fedora VE's. But I added yum to my minimal.list, so I'm find just installing from within the vz.)
|
Try the changes I wrote in the wiki (they are more complete then in the forum).
With that, you can use vzyum or the other vz utilities with all their features.
You even don't need to install yum inside VE.
|
|
|