Index: trunk/shell/create-start-front-end
===================================================================
--- trunk/shell/create-start-front-end	(revision 16)
+++ trunk/shell/create-start-front-end	(revision 17)
@@ -1,5 +1,7 @@
-#! /bin/bash
+#! /bin/bash -x
 #
+# ST - 2012-03-09
+#
 # Create and start the front end.
 #
 # Get the directory of the script.
@@ -22,56 +24,57 @@
 fi
 
 # Create the VM system disk.
-COMPUTE_NODE_SYSTEM_DISK="${SYSTEM_DISK_CLONE_PREFIX}${NODE_NUMBER_STRING}${SYSTEM_DISK_CLONE_POSTFIX}"
-lvcreate -L$FRONT_END_SYSTEM_DISK_SIZE -s \
+lvcreate -L$FRONT_END_SYSTEM_DISK_SIZE \
          -n  $FRONT_END_SYSTEM_DISK \
-         $FRONT_END_SYSTEM_LOGICAL_VOLUME
+         $FRONT_END_SYSTEM_VOLUME_GROUP
 # Create a File System on the VM system disk.
 mkfs -t $FRONT_END_SYSTEM_DISK_FILE_SYSTEM \
-        $FRONT_END_SYSTEM_LOGICAL_VOLUME/$FRONT_END_SYSTEM_DISK
+        $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK
 # If necessary, create the swap volume for the front end.
 if [ $FRONT_END_SWAP_DISK_SIZE != $CONST_NULL_DISK_SIZE ]; then
   lvcreate -L $FRONT_END_SWAP_DISK_SIZE \
            -n $FRONT_END_SWAP_DISK \
-           $FRONT_END_SYSTEM_LOGICAL_VOLUME
-  mkswap $FRONT_END_SYSTEM_LOGICAL_VOLUME/$FRONT_END_SWAP_DISK
+           $FRONT_END_SWAP_VOLUME_GROUP
+  mkswap $FRONT_END_SWAP_VOLUME_GROUP_DEVICE/$FRONT_END_SWAP_DISK
 fi
 # Mount the system disk to copy all the specific files.
 if [ ! -d $FRONT_END_SYSTEM_DISK_MOUNT_POINT ]; then
   mkdir $FRONT_END_SYSTEM_DISK_MOUNT_POINT
 fi
-mount $FRONT_END_SYSTEM_LOGICAL_VOLUME/$FRONT_END_SYSTEM_DISK \
+mount $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK \
       $FRONT_END_SYSTEM_DISK_MOUNT_POINT
 #
 # Configure the specific files from templates
 #
 # /etc/network/interfaces
+# The first interface is DHCP configured.
 CURRENT_PATH=/etc/network
 cp templates$CURRENT_PATH/$FRONT_END_INTERFACES_TEMPLATE \
    $FRONT_END_SYSTEM_DISK_MOUNT_POINT/$CURRENT_PATH
 ADDRESS="$COMPUTE_NODE_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
 rpl __STATIC_ADDRESS__ $ADDRESS  \
-    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT/$CURRENT_PATH/interfaces
+    $FRONT_END_SYSTEM_DISK_MOUNT_POINT/$CURRENT_PATH/interfaces
 # /etc/hostname
 CURRENT_PATH=/etc
 echo $CURRENT_HOST_NAME > "${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/hostname"
 # /etc/hosts
 CURRENT_PATH=/etc
-CURRENT_HOST_IP="${COMPUTE_NODE_STATIC_NETWORK_PREFIX}.${NODE_NUMBER}"
+CURRENT_HOST_IP="${COMPUTE_NODE_STATIC_NETWORK_PREFIX}.${FRONT_END_STATIC_NETWORK_POSTFIX}"
 cp templates$CURRENT_PATH/hosts \
-   $COMPUTE_NODE_DISK_MOUNT_POINT/$CURRENT_PATH
+   $FRONT_END_SYSTEM_DISK_MOUNT_POINT/$CURRENT_PATH
 rpl __COMPUTE_NODE_IP__ $CURRENT_HOST_IP \
-    ${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
+    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
 rpl __COMPUTE_NODE_NAME__ $CURRENT_HOST_NAME \
-    ${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
+    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
 # /etc/resolv.conf
 CURRENT_PATH=/etc
 cp $TEMPLATES_DIR$CURRENT_PATH/resolv.conf \
-   ${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
 rpl __CLUSTER_DOMAIN_NAME__ "${CLUSTER_DOMAIN_NAME}." \
-   ${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
 rpl __FRONT_END_STATIC_ADDRESS__ "${CLUSTER_STATIC_NETWORK_PREFIX}.$FRONT_END_STATIC_NETWORK_POSTFIX" \
-   ${COMPUTE_NODE_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+exit 0
 #
 # Get the MAC address
 #
@@ -146,4 +149,4 @@
   do
     xm vcpu-pin $CURRENT_HOST_NAME $VCPU_NUM $i
     VCPU_NUM=$((VCPU_NUM + 1))
-done
\ No newline at end of file
+done
Index: trunk/shell/c-i-a-b.common
===================================================================
--- trunk/shell/c-i-a-b.common	(revision 16)
+++ trunk/shell/c-i-a-b.common	(revision 17)
@@ -1,3 +1,4 @@
+# ST - 2012-03-09
 # Constants that no one should not change.
 CONST_NULL_DISK_SIZE=0G
 #
@@ -21,16 +22,21 @@
 DHCP_HOSTSFILE_BASENAME=dhcp-hostsfile
 FRONT_END_HOME_DISK_SIZE=512G
 FRONT_END_INTERFACES_TEMPLATE=interfaces.front-end
-FRONT_END_HOME_LOGICAL_VOLUME=/dev/vg_slow
+FRONT_END_HOME_VOLUME_GROUP=vg_slow
+FRONT_END_HOME_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_HOME_VOLUME_GROUP"
 FRONT_END_NAME="frontend"
 FRONT_END_STATIC_NETWORK_POSTFIX=251
 FRONT_END_SWAP_DISK="frontend-swap"
-FRONT_END_SWAP_DISK_SIZE=$CONST_NULL_DISK_SIZE # 0G means no swap disk.
+#FRONT_END_SWAP_DISK_SIZE=$CONST_NULL_DISK_SIZE # 0G means no swap disk.
+FRONT_END_SWAP_DISK_SIZE=1G # 0G means no swap disk.
 FRONT_END_SYSTEM_DISK="frontend-system-disk"
 FRONT_END_SYSTEM_DISK_SIZE=46G
 FRONT_END_SYSTEM_DISK_FILE_SYSTEM=ext3
 FRONT_END_SYSTEM_DISK_MOUNT_POINT=/mnt/frontend-system-disk
-FRONT_END_SYSTEM_LOGICAL_VOLUME=/dev/vg_fast
+FRONT_END_SYSTEM_VOLUME_GROUP=vg_fast
+FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_SYSTEM_VOLUME_GROUP"
+FRONT_END_SWAP_VOLUME_GROUP=vg_fast
+FRONT_END_SWAP_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_SWAP_VOLUME_GROUP"
 FRONT_END_VCPUS=3
 HOSTS_FILE_BASENAME=hosts
 SWAP_DISK_LOGICAL_VOLUME=/dev/vg_fast
Index: trunk/shell/templates/etc/xen/front-end.cfg
===================================================================
--- trunk/shell/templates/etc/xen/front-end.cfg	(revision 0)
+++ trunk/shell/templates/etc/xen/front-end.cfg	(revision 17)
@@ -0,0 +1,51 @@
+#
+# Template file for the Xen instance compute-node.
+#
+
+#
+#  Kernel + memory size
+#
+kernel      = '__COMPUTE_NODE_KERNEL__'
+ramdisk     = '__COMPUTE_NODE_RAMDISK__'
+
+memory      = '__COMPUTE_NODE_MEMORY__'
+
+# (V)CPU management
+
+vcpus       = '__COMPUTE_NODE_VCPUS__'
+cpus        = '__COMPUTE_NODE_CPUS__'
+
+#
+#  Disk device(s).
+#
+root        = '/dev/xvda2 ro'
+disk        = [
+                  'phy:__COMPUTE_NODE_SYSTEM_DISK__,xvda2,w',
+                  'phy:__COMPUTE_NODE_SWAP_DISK__,xvda1,w',
+              ]
+
+
+#
+#  Physical volumes
+#
+
+
+#
+#  Hostname
+#
+name        = '__COMPUTE_NODE_HOST_NAME__'
+
+#
+#  Networking
+#
+vif         = [ 'ip=__COMPUTE_NODE_IP__,mac=__COMPUTE_NODE_MAC__,bridge=__COMPUTE_NODE_BRIDGE__', ]
+
+#
+#  Behaviour
+#
+on_poweroff = 'destroy'
+on_reboot   = 'restart'
+on_crash    = 'restart'
+
+
+
