Home » General » Support » *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine
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
|
|
|
|
|
*CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
By: logart on Mon, 12 March 2007 00:49
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
By: mperkel on Tue, 13 March 2007 03:40
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: Problems with vzyum, vzpkg and templates in a x86_64 machine
By: mperkel on Tue, 13 March 2007 13:55
|
|
|
Re: *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine
|
|
|
Re: *CLOSED* Problems with vzyum, vzpkg and templates in a x86_64 machine
|
Goto Forum:
Current Time: Sat Nov 09 08:38:36 GMT 2024
Total time taken to generate the page: 0.03124 seconds
|