59
edits
Changes
m
Compile your Kernel (as user root, or you need the --fakerootcmd!)
add kernel config option, minor changes
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/
<pre>
# wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test007028test010-i686.config.ovz -O .config
</pre>
You need following OpenVZ kernel config settings:
<pre>
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)
Filesystem
\_ [*] Second extended fs support (CONFIG_EXT2_FS)
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)
\_ [*] Quota Support (CONFIG_QUOTA)
\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)
\_ [*]Quota format v2 support (CONFIG_QFMT_V2)
\_ [*] VPS filesystem (CONFIG_SIM_FS)
\_ [*] Virtuozzo Disk Quota support (CONFIG_VZ_QUOTA)
\-> [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)
OpenVZ ... (what else :-)
\_[*] Virtual Environment support (CONFIG_VE)
\_ <M> VE calls interface (CONFIG_VE_CALLS)
\_ <M> VE networking (CONFIG_VE_NETDEV)
\_ <M> Virtual ethernet device (CONFIG_VE_ETHDEV)
\_ <M> VE device (CONFIG_VZ_DEV)
\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)
\_ <M> VE watchdog module (CONFIG_VZ_WDOG)
\_ <M> Checkpointing & restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)
User resources ... (User Beancounters)
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)
</pre>
<pre>
INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can built without whole kernel tree (e.g. drbd -> drbd0.7-module-source) See also : # make-kpkg --targets</pre> Compile your Kernel (as user root, or you need the --rootcmd!)<pre> # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch or all above with one step # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 kernel_image --initrd--config menuconfig binary-arch
</pre>
</pre>
<pre>
INFO: update-initramfs is done, when make-kpkg is use with --initrd option
INFO: update-grub can be configured by /etc/kernel-img.conf
</pre>
Update the bootloader (when not done above)
== modify needed settings ==
a Debian Way:
If you want network access for the virtual server then you need to enable IP forwarding. Set "ip_forward" to yes in /etc/network/option.
</pre>
or use the /etc/network/if-up/ and /etc/network/if-pre-down.d/ directories.
<pre>
INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)
INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf
</pre>
a (plain ) OpenVZ Linux Way:
Add settings to "/etc/sysctl.conf"