Message: 2 Date: Wed, 20 Feb 2008 18:04:47 +0800 From: John Morris Subject: Re: [Xen-users] Re: centos over debian To: TMC , xen-users@lists.xensource.com Message-ID: <47BBFB3F.4080801@ablesky.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I do this sort of thing pretty regularly with the files in the images/xen directory on the CentOS cd. I use a config file like the following, and just do a "xm create -c norman" or "xm create -c norman mode=install". John # Xen config file for norman, the mail guy # # use "xm create [-c] " to start; add "mode=install" to reinstall! # # modify the next block at a minimum name = "norman" memory = "128" # memory for normal operation ip = "192.168.7.8" disk = ['phy:domU/norman,xvda,w', 'phy:domU/mail,xvdb1,w', ] # change this if you want to add extra interfaces vif = [ 'mac=00:16:ee:' + ":".join(ip.split('.')[1:4]) + ', bridge=intbr', ] # # probably, for paravirt, we don't have to change anything below here # vcpus=1 nographic=1 ksfile = "http://summerlite.foobar.com/distro/bigu/kickstart/ks-" + name + ".cfg" uuid = "99806a2d-827e-da4d-4131-fc32" + ''.join(map(lambda x:"%02X"%int(x),ip.split('.'))) # test if mode variable is defined try: mode except NameError: mode = 'normal' if mode == 'normal': # this is for after install bootloader="/usr/bin/pygrub" on_reboot = 'restart' on_crash = 'restart' else: # these are for install # memory = "512" kernel = "/v/xen/images/vmlinuz-centos-5.1-x86_64" ramdisk = "/v/xen/images/initrd-centos-5.1-x86_64.img" extra = "text console=xvc0 ks=" + ksfile extra = extra + " dns=192.168.7.5" extra = extra + " gateway=192.168.7.1" extra = extra + " ip=" + ip extra = extra + " netmask=255.255.255.0" on_reboot = 'destroy' on_crash = 'destroy' ------------------------------