Following the instruction over at OpenVZ Wiki, I've had no problems with the installation and creation of templates prior to CentOS-5.2 on x86_64 systems. However, with the latest set of updates to CentOS-5.2, the vzpkgcache seems to have been broken as sysklogd is no longer being installed by default. Below is how I got it to work:
Note: edit /vz/template/centos/5/x86_64/config/minimal.list and append .x86_64 to all except for the addons packages. Then run:
# vzpkgcache -f centos-5-x86_64-minimal
which gives the below error at the end:
sed: can't read /etc/init.d/syslog: No such file or directory
ERROR: Script install-post failed
The solution was to edit "/vz/template/centos/5/x86_64/config/install-post" and set syslog and syslog.conf sed replacements with exit status of "0".
# Disable klogd
$VZCTL exec2 $VEID \
"sed -i -e 's/daemon\\ klogd/passed\\ klogd\\ skipped/' \
-e 's/killproc\\ klogd/passed\\ klogd\\ skipped/' \
/etc/init.d/syslog; exit 0"
...
# Disable fsync() in syslog
$VZCTL exec2 $VEID \
"sed -i -e 's@\\\([[:space:]]\\\)\\\(/var/log/\\\)@\\\1-\\\2@' \
/etc/syslog.conf; exit 0"