| [1612] | 1 | Installing a Scripts guest on a Xen host | 
|---|
|  | 2 | ---------------------------------------- | 
|---|
|  | 3 |  | 
|---|
| [1614] | 4 | 1. Create the LVM partitions that the Scripts guest will use. | 
|---|
| [1612] | 5 |  | 
|---|
|  | 6 | Our classic setup is 50GB for the main, root partition (/) and | 
|---|
|  | 7 | 10GB for our swap.  You can consult what things look like | 
|---|
|  | 8 | by using `lvdisplay`.  Our naming convention is server-name-root | 
|---|
|  | 9 | and server-name-swap. | 
|---|
|  | 10 |  | 
|---|
| [1614] | 11 | Creating new LVM partitions is done with `lvcreate`: | 
|---|
| [1612] | 12 |  | 
|---|
|  | 13 | # Example values: | 
|---|
|  | 14 | # SERVERNAME=whole-enchilada | 
|---|
|  | 15 | # HOSTNAME=jay-leno | 
|---|
|  | 16 | lvcreate -n $SERVERNAME-root $HOSTNAME --size 50.00G | 
|---|
|  | 17 | lvcreate -n $SERVERNAME-swap $HOSTNAME --size 10.00G | 
|---|
|  | 18 |  | 
|---|
|  | 19 | 2. Acquire the network installation media for Fedora. | 
|---|
|  | 20 |  | 
|---|
|  | 21 | Normally, you would download an ISO and kick off an installation | 
|---|
|  | 22 | by burning it to a CD and booting off of that.  Since we would like | 
|---|
|  | 23 | to make as minimal a Fedora install as possible, we use a different | 
|---|
|  | 24 | method. [XXX: Why do we actually do it this way?  It seems kind | 
|---|
|  | 25 | of convoluted] | 
|---|
|  | 26 |  | 
|---|
|  | 27 | First, we need to create an appropriate installation directory, | 
|---|
|  | 28 | which contains the necessary kernel images and bootstrapping code. | 
|---|
|  | 29 | Navigate to a Fedora mirrors website, and find the correct release | 
|---|
|  | 30 | from the linux/releases directory, then grab the contents of | 
|---|
|  | 31 | Fedora/x86_64/os/isolinux.  For example, getting the Fedora 13 installer | 
|---|
|  | 32 | from mirrors.mit.edu would be: | 
|---|
|  | 33 |  | 
|---|
|  | 34 | mkdir ~/f13-install | 
|---|
|  | 35 | cd ~/f13-install | 
|---|
|  | 36 | wget -r -nd ftp://mirrors.mit.edu/fedora/linux/releases/13/Fedora/x86_64/os/isolinux/ | 
|---|
|  | 37 |  | 
|---|
|  | 38 | You can then spin up a Xen image for installation with: | 
|---|
|  | 39 |  | 
|---|
|  | 40 | xm create scripts-server machine_name=$HOSTNAME install=f13 | 
|---|
|  | 41 |  | 
|---|
|  | 42 | Note that the -install suffix was dropped.  Get a console with `xm | 
|---|
|  | 43 | console`. | 
|---|
|  | 44 |  | 
|---|
|  | 45 | 3. Tell Fedora where to get the real installer. | 
|---|
|  | 46 |  | 
|---|
|  | 47 | You will now be in a curses installer interface.  Since you are doing | 
|---|
|  | 48 | a network install, you will need to configure your network and specify | 
|---|
|  | 49 | the URL to install.  Find the static hostname that you are planning | 
|---|
|  | 50 | to install to and get its information with: | 
|---|
|  | 51 |  | 
|---|
|  | 52 | stella $HOSTNAME | 
|---|
|  | 53 |  | 
|---|
| [1614] | 54 | Manually configure its IP, disabling IPv6 for now.  The network mask is | 
|---|
|  | 55 | 16, and you can check '/etc/resolv.conf' if you don't remember what | 
|---|
|  | 56 | MIT's DNS servers are. | 
|---|
| [1612] | 57 |  | 
|---|
|  | 58 | It will then ask you for an installation image.  Continuing with our | 
|---|
|  | 59 | F13 mirrors.mit.edu, the URL will look something like: | 
|---|
|  | 60 |  | 
|---|
|  | 61 | ftp://mirrors.mit.edu/fedora/linux/releases/13/Fedora/x86_64/os | 
|---|
|  | 62 |  | 
|---|
|  | 63 | 4. Use VNC | 
|---|
|  | 64 |  | 
|---|
|  | 65 | At this point, Fedora will ask you whether or not you want to use VNC | 
|---|
|  | 66 | to continue the installation.  Because Scripts has an unusual disk | 
|---|
|  | 67 | image setup, you will want to answer yes. [XXX: Unfortunately, this puts | 
|---|
|  | 68 | the VNC session on MITnet, so make sure you use a good password, and | 
|---|
|  | 69 | we should figure out to make it not do that].  Grab your favorite | 
|---|
| [1614] | 70 | VNC client and login to $HOSTNAME:1 over SSH from the internal SIPB | 
|---|
|  | 71 | network. | 
|---|
| [1612] | 72 |  | 
|---|
|  | 73 | 5. Installation in VNC | 
|---|
|  | 74 |  | 
|---|
|  | 75 | 5.1. Disks to use | 
|---|
|  | 76 |  | 
|---|
|  | 77 | We don't have any exotic devices (we did that at the host level, | 
|---|
|  | 78 | recall), so you can use normal configuration.  The scripts-server Xen | 
|---|
| [1614] | 79 | configuration will have automatically selected the LVM partitions you | 
|---|
| [1612] | 80 | created in Step 1, and you want both of them. | 
|---|
|  | 81 |  | 
|---|
|  | 82 | 5.2. Host | 
|---|
|  | 83 |  | 
|---|
|  | 84 | The default hostname is all caps: we use lower-case, so lower-case the | 
|---|
|  | 85 | name before proceeding. | 
|---|
|  | 86 |  | 
|---|
|  | 87 | 5.3. Timezone | 
|---|
|  | 88 |  | 
|---|
|  | 89 | Self explanatory | 
|---|
|  | 90 |  | 
|---|
|  | 91 | 5.4. Root password | 
|---|
|  | 92 |  | 
|---|
|  | 93 | Use Scripts root password for a real install, and fake password | 
|---|
| [1614] | 94 | otherwise. | 
|---|
| [1612] | 95 |  | 
|---|
|  | 96 | 5.5 Formatting the disks | 
|---|
|  | 97 |  | 
|---|
|  | 98 | You can find out what our existing setup looks like by consulting | 
|---|
|  | 99 | '/etc/fstab'. | 
|---|
|  | 100 |  | 
|---|
|  | 101 | Select Custom, and select both disks for formatting.  Setup the larger | 
|---|
|  | 102 | disk as the boot partition.  Configure the partitions as follows: | 
|---|
|  | 103 |  | 
|---|
|  | 104 | 50GB | 
|---|
|  | 105 | Standard Partition | 
|---|
|  | 106 | Mount Point: / | 
|---|
|  | 107 | File System Type: ext3 (the default as of F13 is ext4, which | 
|---|
|  | 108 | cannot be mounted by the hosts and thus should not be used!) | 
|---|
|  | 109 | Additional Size Options: Fill to maximum allowable size (the | 
|---|
|  | 110 | Size parameter will not do anything in that case) | 
|---|
|  | 111 | Force to be primary partition | 
|---|
|  | 112 | 10GB | 
|---|
|  | 113 | Standard Partition | 
|---|
|  | 114 | File System Type: swap | 
|---|
|  | 115 | Additional Size Options: Fill to maximum allowable size | 
|---|
|  | 116 |  | 
|---|
|  | 117 | 5.6 Bootloader | 
|---|
|  | 118 |  | 
|---|
|  | 119 | Defaults are fine. | 
|---|
|  | 120 |  | 
|---|
|  | 121 | 5.7 Installation | 
|---|
|  | 122 |  | 
|---|
|  | 123 | Do a minimal install (we will proceed to install the packages we care | 
|---|
|  | 124 | about), and add the normal F13 repository (testing and updates will be | 
|---|
|  | 125 | added when we bring in our /etc configuration).  Similarly, we will | 
|---|
|  | 126 | install the software we want later, so there is no need to do that now. | 
|---|
|  | 127 |  | 
|---|
|  | 128 | 5.8 Reboot | 
|---|
|  | 129 |  | 
|---|
|  | 130 | When the install finishes, it will ask you to reboot.  This is fine, but | 
|---|
|  | 131 | since we created the VM image with install, upon reboot it will ask us | 
|---|
|  | 132 | to install again.  Let it reboot, then destroy the virtual machine. | 
|---|
|  | 133 |  | 
|---|
|  | 134 | xm destroy $SERVERNAME | 
|---|
|  | 135 |  | 
|---|
|  | 136 | 6. New World Order | 
|---|
|  | 137 |  | 
|---|
|  | 138 | Start up the VM without the install flag: | 
|---|
|  | 139 |  | 
|---|
|  | 140 | xm create scripts-server machine_name=$SERVERNAME | 
|---|
|  | 141 |  | 
|---|
| [1614] | 142 | You should have password SSH logins now too: | 
|---|
| [1612] | 143 |  | 
|---|
| [1614] | 144 | ssh root@$SERVERNAME | 
|---|