]> scripts.mit.edu Git - xen.git/commitdiff
Merge back Quentin's network kickstart changes.
authorEdward Z. Yang <ezyang@mit.edu>
Mon, 20 Sep 2010 15:55:35 +0000 (11:55 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Mon, 20 Sep 2010 16:41:55 +0000 (12:41 -0400)
scripts-server

index 6c7a9be0f56443186690c56211c7d1dac2e20be7..09ec116c16621bb93fa327483824c157a65c61c2 100644 (file)
@@ -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