1 # Xen domain configuration file for scripts.mit.edu virtualized web servers
4 # xm create scripts-server machine_name=bees-knees
5 # xm create scripts-server machine_name=cats-whiskers
6 # name is the name of the server (as used in the LV volumes)
7 # mac5 is the fifth octet of the MAC address: ac:de:48:00:xx:01
8 # set install=fcX if you want to run a Fedora install, where X
9 # is the version of Fedora to install
15 machines = { 'bees-knees' : ['david-letterman', 2, 6144, 10],
16 'cats-whiskers' : ['david-letterman', 2, 6144, 20],
17 'not-backward' : ['david-letterman', 2, 2560, 30],
18 'busy-beaver' : ['conan-obrien', 2, 4096, 40],
19 'pancake-bunny' : ['conan-obrien', 2, 4096, 50],
20 'whole-enchilada': ['jay-leno', 1, 2048, 60],
21 'real-mccoy' : ['jay-leno', 2, 4096, 70],
22 'not-forward' : ['jay-leno', 2, 512, 80],
23 'old-faithful' : ['jay-leno', 2, 1024, 90],
25 vm = machines[machine_name]
29 if 'install' in locals():
30 # Get these files from a Fedora mirror, from a path like
31 # pub/fedora/linux/releases/test/11-Preview/Fedora/x86_64/os/isolinux/
32 kernel = "/root/%s-install/vmlinuz" % install
33 ramdisk = "/root/%s-install/initrd.img" % install
35 elif 'type' in locals() and type == 'hvm':
36 kernel = "/usr/lib/xen/boot/hvmloader"
39 vncpassword = "foobar"
41 # Fedora installs GRUB.
42 bootloader = "/usr/bin/pygrub"
45 if 'memory' not in locals(): memory = vm[vm_mem]
49 disk = [i % (vg, name) for i in ['phy:/dev/%s/%s-root,hda,w',
50 'phy:/dev/%s/%s-swap,hdb,w']]
51 vif = [i % mac5 for i in ['bridge=eth0, mac=ac:de:48:00:%s:01',
52 'bridge=eth1, mac=ac:de:48:00:%s:02']]
54 if 'builder' not in locals() or builder != "hvm":
55 # https://bugzilla.redhat.com/show_bug.cgi?id=466681
56 # pygrub uses cached and eventually outdated grub.conf, kernel and initrd
57 file('/proc/sys/vm/drop_caches', 'w').write('1')