From: Edward Z. Yang Date: Mon, 20 Sep 2010 15:55:35 +0000 (-0400) Subject: Merge back Quentin's network kickstart changes. X-Git-Url: https://scripts.mit.edu/gitweb/xen.git/commitdiff_plain/5245bbdbdca888b0c85eb52e145bd175eea91af2 Merge back Quentin's network kickstart changes. --- diff --git a/scripts-server b/scripts-server index 6c7a9be..09ec116 100644 --- a/scripts-server +++ b/scripts-server @@ -7,9 +7,6 @@ # mac5 is the fifth octet of the MAC address: ac:de:48:00:xx:01 # set install=fcX if you want to run a Fedora install, where X # is the version of Fedora to install -# -# Notice to potential Python hackers: this is /not/ a module! So things like -# imports will not work globally. vm_host = 0 vm_cpus = 1 @@ -97,9 +94,16 @@ def make_ramdisk(base_image, machine_name, install): if 'install' in locals(): kernel = "/root/%s-install/vmlinuz" % install - extra = "selinux=0 ks=file:/root/scripts.ks" + ramdisk = "/root/%s-install/initrd.img" % install + + # some calculations + hostname = machine_name + ".mit.edu" + ip = socket.gethostbyname(hostname) + + extra = "selinux=0 ks=http://whole-enchilada.mit.edu/old-faithful.txt ip="+ip+" netmask=255.255.0.0 gateway=18.181.0.1 dns=18.70.0.160,18.71.0.151,18.72.0.3 syslog=18.181.0.51:514 debug=1 loglevel=debug telnet" maybe_download_isolinux(install) - ramdisk = make_ramdisk("/root/%s-install/initrd.img" % install, machine_name, install) + #ramdisk = make_ramdisk("/root/%s-install/initrd.img" % install, machine_name, install) + elif 'type' in locals() and type == 'hvm': kernel = "/usr/lib/xen/boot/hvmloader" builder = "hvm" @@ -119,6 +123,9 @@ disk = [i % (vg, name) for i in ['phy:/dev/%s/%s-root,xvda,w', vif = [i % mac5 for i in ['bridge=eth0, mac=ac:de:48:00:%s:01', 'bridge=eth1, mac=ac:de:48:00:%s:02']] +if 'install' in locals(): + del vif[1] + if 'builder' not in locals() or builder != "hvm": # https://bugzilla.redhat.com/show_bug.cgi?id=466681 # pygrub uses cached and eventually outdated grub.conf, kernel and initrd