| [1612] | 1 | Installing a Scripts guest on a Xen host | 
|---|
|  | 2 | ---------------------------------------- | 
|---|
|  | 3 |  | 
|---|
| [1698] | 4 | You need to create the volumes to use: | 
|---|
|  | 5 |  | 
|---|
|  | 6 | lvcreate -n $MACHINE-root --size 50.00G $HOST | 
|---|
|  | 7 | lvcreate -n $MACHINE-swap --size 10.00G $HOST | 
|---|
| [2066] | 8 | lvcreate -n $MACHINE-cache --size 11.00G $HOST | 
|---|
| [1698] | 9 |  | 
|---|
| [2066] | 10 | /-------------------------------------------------------------------\ | 
|---|
|  | 11 | Note: If you need to manually format the the swap and cache | 
|---|
|  | 12 | partitions (for example, you are migrating a host from 'migrate'), | 
|---|
|  | 13 | these commands should work.  If in doubt, consult the kickstart. | 
|---|
|  | 14 |  | 
|---|
|  | 15 | # Use fdisk to generate a DOS partition table, and a single | 
|---|
|  | 16 | # partition extending the entire volume. | 
|---|
|  | 17 | fdisk /dev/$HOST/$MACHINE-swap | 
|---|
|  | 18 | fdisk /dev/$HOST/$MACHINE-cache | 
|---|
|  | 19 | # Figure out what kpartx is going to make the devices as | 
|---|
|  | 20 | # (e.g. $SWAP_DEV and $CACHE_DEV) | 
|---|
|  | 21 | kpartx -l /dev/$HOST/$MACHINE-swap | 
|---|
|  | 22 | kpartx -l /dev/$HOST/$MACHINE-cache | 
|---|
|  | 23 | # Read out the partition tables | 
|---|
|  | 24 | kpartx -a /dev/$HOST/$MACHINE-swap | 
|---|
|  | 25 | kpartx -a /dev/$HOST/$MACHINE-cache | 
|---|
|  | 26 |  | 
|---|
|  | 27 | # FORMAT! | 
|---|
|  | 28 | mkswap $SWAP_DEV | 
|---|
|  | 29 | mkfs.ext4 -O ^has_journal -m 0 -N 1000000 $CACHE_DEV | 
|---|
|  | 30 |  | 
|---|
|  | 31 | # Remove the devices | 
|---|
|  | 32 | kpartx -d /dev/$HOST/$MACHINE-swap | 
|---|
|  | 33 | kpartx -d /dev/$HOST/$MACHINE-cache | 
|---|
|  | 34 | \-------------------------------------------------------------------/ | 
|---|
|  | 35 |  | 
|---|
|  | 36 | Make sure that the console has an entry for this host: | 
|---|
|  | 37 |  | 
|---|
|  | 38 | vim /etc/conserver/conserver.cf | 
|---|
|  | 39 |  | 
|---|
|  | 40 | If it doesn't, add: | 
|---|
|  | 41 |  | 
|---|
|  | 42 | console $MACHINE { | 
|---|
|  | 43 | master $HOST; | 
|---|
|  | 44 | include xen; | 
|---|
|  | 45 | } | 
|---|
|  | 46 |  | 
|---|
| [1693] | 47 | We use Kickstart to to initial Fedora configuration.  Installing a new | 
|---|
|  | 48 | vanilla machine is as easy as: | 
|---|
| [1612] | 49 |  | 
|---|
| [1693] | 50 | xm create scripts-server machine_name=$MACHINE install=fXX && console $MACHINE | 
|---|
| [1612] | 51 |  | 
|---|
| [1693] | 52 | The only prompt (near the beginning of the install process) should be | 
|---|
|  | 53 | for the root password, and at the end, when it asks you to reboot. | 
|---|
|  | 54 | Say yes, and the machine will power down, and then restart without | 
|---|
|  | 55 | the install parameter: | 
|---|
| [1612] | 56 |  | 
|---|
| [1693] | 57 | xm create scripts-server machine_name=$MACHINE && console $MACHINE | 
|---|