[CentOS-virt] kickstart + domU for static IP

Wed Apr 7 15:51:08 UTC 2010
Ed Heron <Ed at Heron-ent.com>

From: "Ed Heron", Wednesday, April 07, 2010 9:11 AM

> ... and also set the IP address in the kickstart file (if it
> is a server).  ...

  I should add that I set the static IP address from %post using:
# Configure eth0
file="/etc/sysconfig/network-scripts/ifcfg-eth0"
sed --in-place "s/^\(BOOTPROTO=.*\)$/#\1/" $file
sed --in-place "s/^\(DHCPCLASS=.*\)$/#\1/" $file
cat <<EOF >>$file

BOOTPROTO=none
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
EOF

I do it this way, because I really don't care what the IP address is during 
install.  I want the IP address to be set during the next boot.