Kickstart file example

Below is an example of a kickstart file that you can use to install and configure Virtuozzo Hybrid Infrastructure in the unattended mode. You can use this file as the basis for creating your own kickstart files.

This kickstart file instructs the installer to erase and automatically partition every disk that it recognizes. Make sure to disconnect any disks with useful data prior to installation.

# Use the SHA-512 encryption for user passwords and enable shadow passwords.
auth --enableshadow --passalgo=sha512
# Use the US English keyboard.
keyboard --vckeymap=us --xlayouts='us'
# Use English as the installer language and the default system language.
lang en_US.UTF-8
# Specify the encrypted root password for the node.
rootpw --iscrypted xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Disable SELinux.
selinux --disabled
# Enable time synchronization via NTP.
services --enabled="chronyd"
# Set the system time zone.
timezone America/New_York
# Specify a hostname for the node.
# NOTE: The only way to change the host name later is via the technical support.
network --hostname=<hostname>
# Configure network interfaces via DHCP.
network --device=<iface1> --activate
network --device=<iface2> --activate
# Alternatively, assign static addresses to network interfaces.
#network --device=<iface1> --activate --bootproto=static --ip=<IP_addr> \
#--netmask=<mask> --gateway=<gw> --nameserver=<ns1>[,<ns2>,...]
#network --device=<iface2> --activate --bootproto=static --ip=<IP_addr> \
#--netmask=<mask> --gateway=<gw> --nameserver=<ns1>[,<ns2>,...]
# If needed, uncomment and specify network interfaces to create a bond.
#network --device=bond0 --bondslaves=<iface1>,<iface2> \
#--bondopts=mode=balance-xor,miimon=100,xmit_hash_policy=layer3+4
# Erase all partitions from all recognized disks.
# WARNING: Destroys data on all disks that the installer can reach!
clearpart --all --initlabel
zerombr
# Automatically partition the system disk, which is 'sda'.
autopart --type=lvm
# Install the required packages on the node.
%packages
@^hci
%end
# Uncomment to install the admin panel and storage components.
# Specify an internal interface for the management network and
# an external interface for the admin panel network.
#%addon com_vstorage --management --internal-iface=eth0 \
#--external-iface=eth1 --password=xxxxxxxxx
#%end
# Uncomment to install the storage component. To register the node,
# specify the token as well as the IP address of the admin panel.
#%addon com_vstorage --storage --token=xxxxxxxxx --mgmt-node-addr=10.37.130.1
#%end

Example for the system partition on software RAID1

It is recommended to create RAID1 from disks of the same size, as the volume equals the size of the smallest disk.

To create a system partition on a software RAID1 volume, do not use the autopart option in the kickstart file. Consider the following example for a BIOS-based server, which partitions the disks sda and sdb, assembles the software RAID1 array, and creates expandable swap and root LVM volumes:

# Create partitions on sda.
part biosboot --size=1 --ondisk=sda --fstype=biosboot
part raid.sda1 --size=1024 --ondisk=sda --fstype=ext4
part raid.sda2 --size=101376 --ondisk=sda --grow
# Create partitions on sdb.
part biosboot --size=1 --ondisk=sdb --fstype=biosboot
part raid.sdb1 --size=1024 --ondisk=sdb --fstype=ext4
part raid.sdb2 --size=101376 --ondisk=sdb --grow
# Create software RAID1 from sda and sdb.
raid /boot --level=RAID1 --device=md0 --fstype=ext4 raid.sda1 raid.sdb1
raid pv.01 --level=RAID1 --device=md1 --fstype=ext4 raid.sda2 raid.sdb2
# Make LVM volumes for swap and root partitions.
volgroup vgsys pv.01
logvol swap --fstype=swap --name=swap --vgname=vgsys --recommended
logvol / --fstype=ext4 --name=root --vgname=vgsys --size=10240 --grow
# Set the RAID device md0 as the first drive in the BIOS boot order.
bootloader --location=mbr --boot-drive=sda --driveorder=md0
bootloader --location=mbr --boot-drive=sdb --driveorder=md0

For installation on EFI-based servers, specify the /boot/efi partition instead of biosboot.

part /boot/efi --size=200 --ondisk={sda|sdb} --fstype=efi