Note: There is also a document in the koan manual koan.readthedocs.io
Support for OpenVZ containers in Cobbler
THIS FUNCTION IS CONSIDERED ALPHA QUALITY USAGE IN PRODUCTION CAN BE DANGEROUS! YOU’VE BEEN WARNED!
NOTE: Node you intend deploy OpenVZ containers on (koan side), should be prepared for that - see how.
Because OpenVZ container is in nature chrooted environment we use cobbler+koan to create this on OpenVZ-enabled node. For cobbler and koan in case of OpenVZ all operations is similar - we should define distros, kickstarts, profiles, systems and so on with some additions.
Now we do all operations only for RHEL/CentOS6. It may be suitable for recent Fedoras, but we do nothing for other distributions.
All options keeps on cobbler side as for other VMs. Besides of common options you can use openvz-specific ones by defining them as vz_ prefixed, low-cased variables from this list:
(See ctid.conf(5) for meaning of this parameters).
Because cobbler does not have a place to keep CTID you MUST use it in ks_meta (as you can see in example below)! We use it on cobbler-side to be able allocate them from one place. We turn off pxe-menu creation for openvz containers to not pollute this menu.
For exapmle:
On koan side: koan --server=COBBLER_IP --virt --system=vz01
This will start installation process. ovz-install
script will install all packages and groups listed in $packages
section. As root for installation ovz-install
will use /vz/private/$VEID
(/vz/private/101
for example above), that
can be overriden with vz_ve_private
variable in ks_meta
(eg. vz_ve_private=/some/path
or
vz_ve_private=/other/path/$VEID
or vz_ve_private=/some/path/101
- $VEID
will be replaced with CTID).
After installation ovz-install will process “services” option from kickstart like it do anaconda and run
post-installation script, defined in kickstart (only in chroot), so you can tune the container for your needs. At the
end of process ovz-install process installed tree to be truly OpenVZ container - creates dev files, change init scripts
etc. Created container started after that, so you should be able to log in to it with root and password you defined for
root in kickstart file.
Options for creating OpenVZ containers. You should set virt-type to “openvz” in profile or system to create OpenVZ container.