Thanks to Kir, Dev and the entire OpenVZ team for this wonderful software and the fantastic support. Here is how I managed to run Zimbra on OpenVZ on CentOS. In a compendium; first the results and then the config files: [root@vz ~]# uname -srvmp Linux 2.6.8-022stab070.1-smp #1 SMP Mon Feb 20 19:24:29 MSK 2006 i686 i686 [root@vz ~]# vzpkgls 101 centos-4-i386-default [root@vz ~]# vzmemcheck -Av Output values in Mbytes veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc util commit util util commit util commit limit 101 5.11 8192.13 396.68 396.68 8396800.12 2250.78 9692.13 8396800.12 ------------------------------------------------------------------------- Summary: 5.11 8192.13 396.68 396.68 8396800.12 2250.78 9692.13 8396800.12 323.00 323.00 2023.00 4007.00 4007.00 4007.00 4007.00 4007.00 [root@vz ~]# vzctl exec 101 cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit failcnt 101: kmemsize 5004726 6356460 2147483647 2147483647 0 lockedpages 0 0 32 32 0 privvmpages 474538 851314 2147483647 2147483647 0 shmpages 655 2590 8192 8192 0 dummy 0 0 0 0 0 numproc 258 304 1000 1000 0 physpages 97960 107107 0 2147483647 0 vmguarpages 0 0 384000 2147483647 0 oomguarpages 97960 107107 2147483647 2147483647 0 numtcpsock 26 46 200 200 0 numflock 29 35 100 110 0 numpty 1 5 16 16 0 numsiginfo 0 11 256 256 0 tcpsndbuf 12648 70936 319488 2147483647 0 tcprcvbuf 692 27192 319488 2147483647 0 othersockbuf 155960 204976 132096 2147483647 0 dgramrcvbuf 0 17104 132096 132096 0 numothersock 116 146 250 250 0 dcachesize 377260 459342 1048576 1097728 0 numfile 1008 1489 2048 2048 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 10 10 128 128 0 [root@vz ~]# cat /etc/sysconfig/vz ## Global parameters VIRTUOZZO=yes LOCKDIR=/vz/lock VE0CPUUNITS=10000 ## Logging parameters LOGGING=yes LOGFILE=/var/log/vzctl.log LOG_LEVEL=0 ## Disk quota parameters DISK_QUOTA=no VZFASTBOOT=no # The name of the device whose ip address will be used as source ip for VE. # By default automatically assigned. #VE_ROUTE_SRC_DEV="eth0" ## Template parameters TEMPLATE=/vz/template ## Defaults for VEs VE_ROOT=/vz/root/$VEID VE_PRIVATE=/vz/private/$VEID CONFIGFILE="vps.basic" DEF_OSTEMPLATE="centos-4-i386-default" ## Load vzwdog module VZWDOG="no" IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length" [root@vz ~]# cat /etc/sysconfig/vz-scripts/101.conf # This is an example configuration file for so-called "vps.basic" VPS. # Copyright (C) 2000-2005 SWsoft. All rights reserved. # # This file may be distributed under the terms of the Q Public License # as defined by Trolltech AS of Norway and appearing in the file # LICENSE.QPL included in the packaging of this file. # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ONBOOT="yes" # UBC parameters (in form of barrier:limit) # Primary parameters AVNUMPROC="400:400" NUMPROC="1000:1000" NUMTCPSOCK="200:200" NUMOTHERSOCK="250:250" VMGUARPAGES="384000:2147483647" # Secondary parameters KMEMSIZE="2147483647:2147483647" TCPSNDBUF="319488:2147483647" TCPRCVBUF="319488:2147483647" OTHERSOCKBUF="132096:2147483647" DGRAMRCVBUF="132096:132096" OOMGUARPAGES="2147483647:2147483647" # Auxiliary parameters LOCKEDPAGES="32:32" SHMPAGES="8192:8192" #PRIVVMPAGES="384000:385000" PRIVVMPAGES="2147483647:2147483647" NUMFILE="2048:2048" NUMFLOCK="100:110" NUMPTY="16:16" NUMSIGINFO="256:256" DCACHESIZE="1048576:1097728" PHYSPAGES="0:2147483647" NUMIPTENT="128:128" # Disk quota parameters (in form of softlimit:hardlimit) DISKSPACE="" DISKINODES="" QUOTATIME="" DISK_QUOTA=no # CPU fair sheduler parameter CPUUNITS="100000" VE_ROOT="/vz/root/$VEID" VE_PRIVATE="/vz/private/$VEID" OSTEMPLATE="centos-4-i386-default" ORIGIN_SAMPLE="vps.basic" HOSTNAME="zimbra.mydomain.net" IP_ADDRESS="192.168.1.10" NAMESERVER="192.168.1.20" CPULIMIT="75" [root@vz ~]# If the above configuration files don't work for you. Here is the How-to. (describes what I did) Installed CentOS 4.2 on the computer Installed OpenVZ Created a VPS with ID 101 Installed Zimbra in this VPS Zimbra didn't work! A few services failed and I checked the logs, which looked something like this: Could not reserve enough space for object heap Could not create the Java virtual machine. Could not create the Java virtual machine. /opt/zimbra/bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export Could not create the Java virtual machine. /opt/zimbra/bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export Could not create the Java virtual machine. /opt/zimbra/bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export Could not create the Java virtual machine. /opt/zimbra/bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Could not create the Java virtual machine. Host Could not create the Java virtual machine. /opt/zimbra/bin/../bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export Could not create the Java virtual machine. /opt/zimbra/bin/../bin/zmshutil: line 50: Error: command not found Error: executing: /opt/zimbra/bin/zmlocalconfig -q -m export So, now I checked UBC or user_beancounters using the following command: vzctl exec 101 cat /proc/user_beancounters The last column in the results is called failcnt. All the values in this column should be "0" (zero). If there exists a non-zero value in any row corresponding to failcnt column then there is a problem with resource allocation. So, starting with the resource that has maximum failcnt, I started increasing values for the corresponding variable in /etc/sysconfig/vz-scripts/101.conf configuration file. I increased a little everytime and checked if the result will be Ok (not the solution, but valid configuration). This can be checked by issuing the command: vzcfgvalidate /etc/sysconfig/vz-scripts/101.conf First, I increased the limit (the value after the colon":") and after validating the file, I restarted the VPS. If it didn't work, then I increased the barrier (the value before the colon ":") and after validating the file again restarted the VPS. Slowly the values in failcnt started decreasing and finally became "0" (zero). Also, it is possible to allocate much more than you have. So, you need not worry if the values that you assign to various resource variables in the config files are very high. --- That's it! Kir, please correct where I am wrong. Thank-you very much!
Can you please create this howto on http://wiki.openvz.org as well?