Xen VM installation via Kickstart

A sample /etc/xen/vmhost template file that can be used for installation via kickstart and then, after few changes, as configuration file for the newly installed Virtual Machine.

# Template XEN config for kickstarting servers
# Use this for first install ( change: name , disk location , extra (ks file))

# It is serviced from puppet, so work on a copy

# QUICK REFERENCE
# 1- COPY this file to a new one with the name of the server (es: syslog.xen )
# 2- EDIT syslog.xen: Change name , disk location , extra (ks file)
# 3- INSTALL: xm create -c syslog.xen
# 4- ADAPT configuration file:
#  - Comment Kickstart bootstrap parameters
#  - Uncomment bootloader parameter
#  - Change on_reboot option, from destroy to restart

# Kickstart bootstrap parameters
kernel = "/boot/vmlinuz-xen-install"
ramdisk = "/boot/initrd-xen-install"
extra = "text ks=http://10.100.1.51/ks/XXX.ks ksdevice=eth1"


# Activate bootloader option after first install
# bootloader="/usr/bin/pygrub"

# Xen machine configuration settings
name = "XXX"
memory = "2048"
disk = [ 'phy:/dev/san/XXX_xen,xvda,w' ]
vif = [ 'bridge=xenbr0', 'bridge=xenbr1' ]
vcpus=8


# on_reboot should be destroy on first install, and restart in normal use
on_reboot   = 'destroy'
on_crash    = 'destroy'

Privacy Policy