<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
On Thu, 2014-02-27 at 08:38 -0500, Rick Leir wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    I got the vzctl source (latest version) onto a PowerPC server with RedHat<BR>
    6. Configured it as recommended:<BR>
    &nbsp; ./configure --with-cgroup --without-ploop --enable-bashcomp<BR>
    --prefix=/usr <BR>
    <BR>
    The kernel version is in the dir names:<BR>
    &nbsp; /usr/src/debug/kernel-2.6.32-358.el6/linux-2.6.32-358.el6.ppc64/arch/powerpc/include/asm/unistd.h<BR>
    &nbsp; /usr/src/kernels/2.6.32-358.el6.ppc64/arch/powerpc/include/asm/unistd.h<BR>
    <BR>
    The compiler error was <BR>
    &nbsp; no declaration for __NR_setns<BR>
</BLOCKQUOTE>
<BR>
A simple patch for vzctl:
<PRE>
--- vzctl-4.6.1/src/lib/hooks_ct.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2014-02-27 09:00:56.885192592 -0600
+++ vzctl-4.6.1r/src/lib/hooks_ct.c&nbsp;&nbsp;&nbsp;&nbsp; 2014-02-27 09:00:22.405096553 -0600
@@ -30,6 +30,8 @@
 #define __NR_setns&nbsp;&nbsp;&nbsp;&nbsp; 346
 #elif defined __x86_64__
 #define __NR_setns&nbsp;&nbsp;&nbsp;&nbsp; 308
+#elif defined __powerpc__
+#define __NR_setns&nbsp;&nbsp;&nbsp;&nbsp; 350
 #else
 #error &quot;No setns syscall known for this arch&quot;
 #endif

</PRE>
This patch solves the compile error, and now vzctl can be installed on IBM RedHat 6, PowerPC 7. Would somone with commit privileges like to apply the patch? The patch seems harmless since the sys_setns() function does not seem to get called from anything.<BR>
src/lib/hooks_ct.c:static int sys_setns(int fd, int nstype)<BR>
<BR>
<BR>
Now, my question is:&nbsp; This page (2013) suggests that it is easy to create a new template:<BR>
<A HREF="http://openvz.org/Creating_a_CentOS_6_Template">http://openvz.org/Creating_a_CentOS_6_Template</A><BR>
and this (2008)<BR>
<A HREF="http://wiki.openvz.org/Creating_a_Red_Hat_Template_with_mach">http://wiki.openvz.org/Creating_a_Red_Hat_Template_with_mach</A><BR>
<BR>
But these pages (2011) say that you need to start with a precreated template:<BR>
<A HREF="https://openvz.org/OS_template_cache_preparation">https://openvz.org/OS_template_cache_preparation</A><BR>
<A HREF="http://wiki.openvz.org/OS_template_metadata">http://wiki.openvz.org/OS_template_metadata</A><BR>
<BR>
Can I create my template as described for Centos in the first link?<BR>
<BR>
Thanks<BR>
Rick <BR>
<BR>
</BODY>
</HTML>