Re: [CentOS-virt] kickstart + domU for static IP

2010-04-07 Thread Ed Heron
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 
vm?

  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.

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] kickstart + domU for static IP

2010-04-07 Thread Ed Heron
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.

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] kickstart + domU for static IP

2010-04-06 Thread Christopher G. Stach II
- john maclean jaye...@gmail.com wrote:

 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?

If you mean before kickstart is even run:

 extra = text ks=http://192.168.1.120/dns1-ks.cfg;

extra = ... ip=...

-- 
Christopher G. Stach II
http://ldsys.net/~cgs/
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt