Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

OpenSUSE template creation

690 bytes added, 13:58, 27 January 2011
m
Reverted edits by Boris (Talk) to last revision by Kir
</pre>
Replace === Fix console device redirect === Open <code>etc/init.d/halt</code> script and replace the following lines:<pre># Redirect our mesages to default consoletest -n "$REDIRECT" && exec 0<> $REDIRECT 1>&0 2>&0</pre>with regular file this one (otherwise note <code>vzctl stop|| true</code> at the end):<pre># Redirect our mesages to default consoletest -n "$REDIRECT" && exec 0<> $REDIRECT 1>&0 2>&0 || true</pre> The reason is that this redirect fails with timeout -- needs more investigationpermission denied in OpenVZ environment if <code>$REDIRECT</code> is console device (<code>/dev/console</code>). As a result, script terminates with error (because of <code>set +e</code> at the beginning)and the box is not stopped properly. As an option, you can replace console device with regular file
<pre>
rm lib/udev/devices/console ; touch lib/udev/devices/console
</pre>
 
=== Make df working ===
<pre>
rm -f etc/mtab
ln -s /proc/mounts etc/mtab
</pre>
== Disable boot.klog ==
For some reason, <code>klogd</code> hangs when tries to retrieve kernel log. You need to disable it. Simply delete <code>etc/rc.d/boot.d/S08bootS*boot.klog</code>
== Create OS template ==
 
Create OS template cache by invoking the following command:
<code> tar --numeric-owner -czf /vz/template/cache/opensuse-10.3-i386-default.tar.gz ./</code>
{{Note|For Debian-based host you should put the archive inside <code>/var/lib/vz/template/cache</code>}}
 
== startproc troubleshooting ==