[CentOS-virt] kickstart + domU for static IP

Tue Apr 6 10:11:53 UTC 2010
john maclean <jayeola at gmail.com>

I've set up a local webserver to store kickstart files for domUs. All
parameters are respected apart from the network settings. DomU always
gets DHCP. Can any one help to unwrap this one? Does one add hostname,
ip, netmask and gateway values to the /etc/xen/blah.cfg file?


# ---- domU kickstart file ----#
url --url http://192.168.1.120/centos/5/os/i386
lang en_US.UTF-8
keyboard uk
network --device=eth0 --bootproto=static --netmask=255.255.255.0
--ip=192.168.1.115 --gateway=192.168.1.1 --nameserver=192.168.1.1
--hostname=dns1 --onboot=yes
rootpw blahblahblah
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc Europe/London
bootloader --location=mbr --driveorder=xvda --append="console=xvc0"

clearpart --all --initlabel --drives=xvda
part /boot --fstype ext3 --size=100 --ondisk=xvda --asprimary
part / --fstype ext3 --size=10240 --grow --ondisk=xvda --asprimary
part swap --size=1024 --ondisk=xvda --asprimary

%packages
@base
@core


# sudo cat /etc/xen/dns1.cfg

ramdisk = "/home/jayeola/virt/images/centos_domU/initrd.img"
kernel = "/home/jayeola/virt/images/centos_domU/vmlinuz"name = "dns1"
maxmem = 1024
memory = 1024
vcpus = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
disk = [ "tap:aio:/home/jayeola/virt/images/centos_domU/dns1.img,xvda,w" ]
vif = [ "bridge=xenbr0,script=vif-bridge" ]
extra = "text ks=http://192.168.1.120/dns1-ks.cfg"


-- 
John Maclean
07739 171 531
MSc (DIC)

Enterprise Linux Systems Engineer