[CentOS-virt] kickstart + domU for static IP

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

From: "john maclean", Tuesday, April 06, 2010 4:11 AM

> 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 ----#
> ...
> # sudo cat /etc/xen/dns1.cfg
> ...
> -- 
> John Maclean
> 07739 171 531
> MSc (DIC)
> Enterprise Linux Systems Engineer

  It's not quite clear to me what your process for creating the DomU is, but 
I think you're creating the xen config file by hand then running xm create 

  I'm not sure when you are having the IP issue.  If during the installation 
process, anaconda has to initialize eth0 before it can get access to the 
kickstart file, so it must use DHCP.

  After some discussion with Russ some time ago, he convinced me that in 
most cases, virt-install is your friend.  I use virt-install (specifying a 
mac address) to create my virtual machines, which sets up a boot partition, 
just like a physical machine, so my extra parameters go into the VM's 
/boot/grub/grub.conf file.  I assign static IP addresses with DHCP during 
the install process and also set the IP address in the kickstart file (if it 
is a server).  I like that the VM's config is mostly internal to the virtual 
disk image.

  I don't have a problem controlling my IP addresses.