Difference between revisions of "Making template tools to work on x86 64"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(better explanation)
Line 1: Line 1:
There isn't much of a reason to run a 64bit container; however, there a memory management benefits to be had from running a 64bit hardware node.  The problem is that the OpenVZ tools are all compiled for 32bits and rely on the hardware node having 32 bit python. The setx86_64 breaks distributions based on rpm 4.3.x which includes CentOS4/RHEL4.  The steps I took to make this work with a RHEL5.1-x86_64 hardware node and the standard 32bit templates are as follows:
+
This article describes an (unofficial) hack to make OpenVZ template tools work on an x86_64 box.
 +
 
 +
There isn't much of a reason to run a 64bit container; however, there a memory management benefits to be had from running a 64bit hardware node.  The problem is that the OpenVZ template tools only work on x86. The setx86_64 breaks distributions based on rpm 4.3.x which includes CentOS4/RHEL4.  The steps I took to make this work with a RHEL5.1-x86_64 hardware node and the standard 32bit templates are as follows:
  
 
*  Get and build Python 2.4.5 having exported CFLAGS="-m32" and LD_FLAGS="-m32" into /usr/local/python-2.4.5-32 by using --prefix=/usr/local/python-2.4.5-32 as an argument to configure
 
*  Get and build Python 2.4.5 having exported CFLAGS="-m32" and LD_FLAGS="-m32" into /usr/local/python-2.4.5-32 by using --prefix=/usr/local/python-2.4.5-32 as an argument to configure
Line 8: Line 10:
 
*  /usr/local/python-2.4.5-32/bin/easy_install pysqlite, make sure you have sqlite-devel installed
 
*  /usr/local/python-2.4.5-32/bin/easy_install pysqlite, make sure you have sqlite-devel installed
 
*  replace /usr/bin/python with /usr/local/python-2.4.5-32/bin/python in /usr/share/vzyum/yum-cli/yummain.py, /usr/share/vzyum/yum-cli/cli.py, /usr/share/vzyum/bin/yum
 
*  replace /usr/bin/python with /usr/local/python-2.4.5-32/bin/python in /usr/share/vzyum/yum-cli/yummain.py, /usr/share/vzyum/yum-cli/cli.py, /usr/share/vzyum/bin/yum
 
 
Please excuse the roughness of this document, I wanted to capture what I did while it was fresh and I will clean it up.
 
  
 
[[Category: Templates]]
 
[[Category: Templates]]
 
[[Category: HOWTO]]
 
[[Category: HOWTO]]
 
[[Category: Troubleshooting]]
 
[[Category: Troubleshooting]]

Revision as of 09:40, 18 April 2008

This article describes an (unofficial) hack to make OpenVZ template tools work on an x86_64 box.

There isn't much of a reason to run a 64bit container; however, there a memory management benefits to be had from running a 64bit hardware node. The problem is that the OpenVZ template tools only work on x86. The setx86_64 breaks distributions based on rpm 4.3.x which includes CentOS4/RHEL4. The steps I took to make this work with a RHEL5.1-x86_64 hardware node and the standard 32bit templates are as follows:

  • Get and build Python 2.4.5 having exported CFLAGS="-m32" and LD_FLAGS="-m32" into /usr/local/python-2.4.5-32 by using --prefix=/usr/local/python-2.4.5-32 as an argument to configure
  • Download ez_setup from http://peak.telecommunity.com/DevCenter/EasyInstall and run /usr/local/python-2.4.5-32/bin/python ez_setup.py (this will make some things easier)
  • download and install cElementTree-1.2.6
  • download and install libxml2-python-2.6.9, you will need to have libxml-devel.i386 and libxslt-devel.i386 already installed
  • download and install urlgrabber-3.1.0
  • /usr/local/python-2.4.5-32/bin/easy_install pysqlite, make sure you have sqlite-devel installed
  • replace /usr/bin/python with /usr/local/python-2.4.5-32/bin/python in /usr/share/vzyum/yum-cli/yummain.py, /usr/share/vzyum/yum-cli/cli.py, /usr/share/vzyum/bin/yum