OpenVZ Forum


Home » General » Support » *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine
*CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11007] Sun, 11 March 2007 16:30 Go to next message
mcarreira is currently offline  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 #11008 is a reply to message #11007] Sun, 11 March 2007 18:05 Go to previous messageGo to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
One correction.
What I mean was:

vzyum, vzpkg and vztmpl-* can be installed with a trick:
# rpm --nodeps -ivh vzyum

But vzyum and vzpkgcache don't work as expected!
They are broken.

M.Carreira
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 Go to previous messageGo to next message
logart is currently offline  logart
Messages: 6
Registered: March 2007
Junior Member

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.


Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11066 is a reply to message #11011] Tue, 13 March 2007 00:06 Go to previous messageGo to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
Yeap!
The module "_rpmmodule.so" seems to be 32 bits and not 64.
It seems that's better forget vzyum and vzpkg by now and try alternatives.
The only one I know until now is to use yum inside VE, but as you said, it consumes a lot of memory and breaks with default configuration file.
I had to change some variables in /etc/vz/conf/<VEID>.conf to have a yum update inside a VE without errors.
AVNUMPROC="200:200"
NUMPROC="400:400"
NUMTCPSOCK="500:500"
NUMOTHERSOCK="500:500"

then run "vzcfgvalidate" to check configuration file.

M.Carreira
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11068 is a reply to message #11007] Tue, 13 March 2007 03:40 Go to previous messageGo to next message
mperkel is currently offline  mperkel
Messages: 253
Registered: December 2006
Senior Member
So - why doesn't someone fix this? Not to be too simplistic. Smile

Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11069 is a reply to message #11068] Tue, 13 March 2007 07:43 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

The fix is not so simple, as it may seem. There are some unresolvable problems. I don't remember they exactly. Rolling Eyes

AFAIK, probably, there will be a full rework OpenVZ template management, where this problem will be fixed. But no any ETA at the moment! Rolling Eyes At the moment I see the only good way to work with packet management on rpm-based VEs on x86_64. It is the way described by mcarreira in his initial post.

Vasily.
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11099 is a reply to message #11007] Tue, 13 March 2007 13:55 Go to previous messageGo to next message
mperkel is currently offline  mperkel
Messages: 253
Registered: December 2006
Senior Member
What I find confusing is what makes it so hard to get the package management stuff running on 64 bit because all that you are doing is assembling files. In theory package management should be the easiest to make compatible.

What am I missing that makes it so impossible?


[Updated on: Tue, 13 March 2007 13:55]

Report message to a moderator

Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11112 is a reply to message #11069] Wed, 14 March 2007 05:03 Go to previous messageGo to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
I think I found a way to use vzpkgcache in x86_64!!
The idea is not using vzyum but the real yum instead and also change a few things.
I changed the scripts (a few lines), and it worked!! Cleanly!
Tomorrow I will write the results, because is too late now.

Good night!

M.Carreira

Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11115 is a reply to message #11112] Wed, 14 March 2007 07:26 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Waiting for your results, it'll be perfect to get some workaround Wink
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 Go to previous messageGo to next message
mcarreira is currently offline  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: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11699 is a reply to message #11158] Tue, 03 April 2007 00:00 Go to previous messageGo to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
I tested successfully the former solution during 2 weeks, making openvz to work on a 64 bit x86_64 CPU.
This allows my system to use vzpkgcache, vzyum and vzrpm without any issue.
The "side effects" I feared to found were not very harmful. I only have to report those two:

1 - We can not use the prebuild cache template tarballs downloaded from openvz website. Only the cache templates created with vzpkgcache works correctly with vzyum and vzrpm.
2 - yum-cache directory is not a common directory for all VE's. Each VE has their own yum-cache directory.

Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11700 is a reply to message #11699] Tue, 03 April 2007 05:41 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Can you, please, create a wiki page at wiki.openvz.org about your solution?

Thank you!
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11723 is a reply to message #11700] Tue, 03 April 2007 17:41 Go to previous messageGo to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
Of course.
I'll do it as soon as I can.
Where do you think is the better category to place it:
Howto? Installation? Troubleshooting?
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine [message #11740 is a reply to message #11723] Wed, 04 April 2007 12:14 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
I think in 3 categories:
1. Templates
2. HOWTO
3. Toubleshooting

Thank you!
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 Go to previous messageGo to next message
stevier5000 is currently offline  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 Go to previous message
mcarreira is currently offline  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.

Previous Topic: *SOLVED* Different versions of MySQL
Next Topic: kernel ovzkernel-2.6.18_028stab023.1+31 for debian sarge doesn't boot
Goto Forum:
  


Current Time: Mon Nov 18 00:57:41 GMT 2024

Total time taken to generate the page: 0.02991 seconds