]> scripts.mit.edu Git - xen.git/blobdiff - scripts-server
Add some johnny-carson machines.
[xen.git] / scripts-server
index 30e864c365668e9f103a519931fe65b817d05313..9b3b4ea023bcc278c2934d8be186672365daea6d 100644 (file)
@@ -1,22 +1,42 @@
 # Xen domain configuration file for scripts.mit.edu virtualized web servers
 #
 # usage, e.g.:
-#   xm create scripts-server machine_name=bees-knees mac5=10
-#   xm create scripts-server machine_name=cats-whiskers mac5=20
+#   xm create scripts-server machine_name=bees-knees
+#   xm create scripts-server machine_name=cats-whiskers
 # name is the name of the server (as used in the LV volumes)
 # 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
+# set install=fcX if you want to run a Fedora install, where X
+# is the version of Fedora to install
 
-macs = { 'bees-knees'   : 10,
-         'cats-whiskers': 20
-       }
-mac5 = macs[machine_name]
+vm_host = 0
+vm_cpus = 1
+vm_mem  = 2
+vm_mac5 = 3
+machines = { 'bees-knees'     : ['david-letterman',  2, 6144, 10],
+             'cats-whiskers'  : ['david-letterman',  2, 6144, 20],
+             'not-backward'   : ['david-letterman',  2, 2560, 30],
+             'busy-beaver'    : ['conan-obrien',     2, 4096, 40],
+             'pancake-bunny'  : ['conan-obrien',     2, 4096, 50],
+             'whole-enchilada': ['jay-leno',         1, 2048, 60],
+             'real-mccoy'     : ['jay-leno',         2, 4096, 70],
+             'not-forward'    : ['jay-leno',         2,  512, 80],
+             'old-faithful'   : ['johnny-carson',    2, 4096, 90],
+             'better-mousetrap' : ['johnny-carson',  2, 4096,100],
+           }
+vm = machines[machine_name]
+
+mac5 = vm[vm_mac5]
 
 if 'install' in locals():
   # Get these files from a Fedora mirror, from a path like
   # pub/fedora/linux/releases/test/11-Preview/Fedora/x86_64/os/isolinux/
+  # You can use ftp://mirrors.mit.edu and wget -R to easily grab the
+  # entire contents of the directory.  To do the network install, use
+  # a URL like ftp://mirrors.mit.edu/fedora/linux/releases/13/Fedora/x86_64/os
+  # I'm not sure what you're supposed to do for IPv6
   kernel = "/root/%s-install/vmlinuz" % install
   ramdisk = "/root/%s-install/initrd.img" % install
+  extra = "selinux=0"
 elif 'type' in locals() and type == 'hvm':
   kernel = "/usr/lib/xen/boot/hvmloader"
   builder = "hvm"
@@ -26,12 +46,20 @@ else:
   # Fedora installs GRUB.
   bootloader = "/usr/bin/pygrub"
 
-vcpus = 2
-memory = 7168
+vcpus = vm[vm_cpus]
+if 'memory' not in locals(): memory = vm[vm_mem]
 maxmem = 16384
 name = machine_name
-vg = "not-forward"
-disk = [i % (vg, name) for i in ['phy:/dev/%s/%s-root,hda,w',
-                                 'phy:/dev/%s/%s-swap,hdb,w']]
+vg = vm[vm_host]
+disk = [i % (vg, name) for i in ['phy:/dev/%s/%s-root,xvda,w',
+                                 'phy:/dev/%s/%s-swap,xvde,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 '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
+  file('/proc/sys/vm/drop_caches', 'w').write('1')
+
+#if 'install' in locals():
+#  disk.append('file:/root/%s-install/cdimg.ext3.img,hdc1,r' % install)