To install OpenVZ using a kickstart file, you first need to make the kickstart file accessible over the network. To do this:
-
Copy the kickstart file to the same directory on the HTTP server where the OpenVZ installation files are stored (e.g., to
/var/www/html/vz). -
Add the following string to the
/tftpboot/pxelinux.cfg/defaultfile on the PXE server:ks=<HTTP_server_address>/<path_to_kickstart_file>
Note
Note: For EFI-based systems, the file you need to edit has the name of
/tftpboot/pxelinux.cfg/efidefaultor/tftpboot/pxelinux.cfg/<PXE_server_IP_address>.
Assuming that the HTTP server has the IP address of 198.123.123.198, the DocumentRoot directory is set to /var/www/html and the full path to your kickstart file on this server is /var/www/html/vz/ks.cfg, your default file may look like the following:
default menu.c32
prompt 0
timeout 100
ontimeout VZ
menu title OpenVZ Boot Menu
label VZ
menu label Install OpenVZ
kernel vmlinuz
append initrd=initrd.img ks=http://198.123.123.198/vz/ks.cfg
method=http://198.123.123.198/vz ksdevice=eth0