Index: trunk/shell/create-start-front-end
===================================================================
--- trunk/shell/create-start-front-end	(revision 22)
+++ trunk/shell/create-start-front-end	(revision 23)
@@ -23,11 +23,11 @@
     exit 1
 fi
 
-# Create the VM system disk.
+# Create the front-end system disk.
 lvcreate -L$FRONT_END_SYSTEM_DISK_SIZE \
          -n  $FRONT_END_SYSTEM_DISK \
          $FRONT_END_SYSTEM_VOLUME_GROUP
-# Create a File System on the VM system disk.
+# Create a File System on the front-end system disk.
 mkfs -t $FRONT_END_SYSTEM_DISK_FILE_SYSTEM \
         $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK
 # If necessary, create the swap volume for the front end.
@@ -37,6 +37,13 @@
            $FRONT_END_SWAP_VOLUME_GROUP
   mkswap $FRONT_END_SWAP_VOLUME_GROUP_DEVICE/$FRONT_END_SWAP_DISK
 fi
+# Create the VM home disk.
+lvcreate -L$FRONT_END_HOME_DISK_SIZE \
+         -n  $FRONT_END_HOME_DISK \
+         $FRONT_END_HOME_VOLUME_GROUP
+# Create a File System on the front-end system disk.
+mkfs -t $FRONT_END_HOME_DISK_FILE_SYSTEM \
+        $FRONT_END_HOME_VOLUME_GROUP_DEVICE/$FRONT_END_HOME_DISK
 # 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
@@ -53,17 +60,17 @@
 # Create the Xen configuration file from a template
 #
 CURRENT_PATH=/etc/xen
-cp templates$CURRENT_PATH/front-end.cfg \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl Template Configuration $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+cp templates$CURRENT_PATH/$CONST_FRONT_END_TEMPLATE_NAME \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+rpl Template Configuration $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 rpl __FRONT_END_KERNEL__ $COMPUTE_NODE_KERNEL \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_RAMDISK__ $COMPUTE_NODE_RAMDISK \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_MEMORY__ $COMPUTE_NODE_MEMORY \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_VCPUS_NUM__ $COMPUTE_NODE_VCPUS_NUM \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+rpl __FRONT_END_RAMDISK__ $FRONT_END_RAMDISK \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+rpl __FRONT_END_MEMORY__ $FRONT_END_MEMORY \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+rpl __FRONT_END_VCPUS_NUM__ $FRONT_END_VCPUS_NUM \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 CPUS_LIST=$FRONT_END_CPUS_LIST
 CPUS=""
 for i in $CPUS_LIST
@@ -76,42 +83,51 @@
     fi
 done
 rpl __FRONT_END_CPUS__ $CPUS \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 rpl __FRONT_END_SYSTEM_DISK__ $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_HOME_DISK__ $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+rpl __FRONT_END_HOME_DISK__ $FRONT_END_HOME_VOLUME_GROUP_DEVICE/$FRONT_END_HOME_DISK \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 if [ "x$FRONT_END_SWAP_DISK_SIZE" != "x$CONST_NULL_DISK_SIZE" ] ; then
   FRONT_END_SWAP_DISK_STANZA="'phy:$FRONT_END_SWAP_VOLUME_GROUP_DEVICE/${FRONT_END_SWAP_DISK},xvda3,w',"
   rpl __FRONT_END_SWAP_DISK__ $FRONT_END_SWAP_DISK_STANZA \
-     $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-  rpl __FRONT_END_NOSWAP__ "" \
-     $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+  # Comment out the noswap stanza.
+  rpl __FRONT_END_NOSWAP__ "#$CLUSTER_NOSWAP" \
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 else
+  echo y | rpl -f __FRONT_END_SWAP_DISK__ "" \
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
   rpl __FRONT_END_NOSWAP__ $CLUSTER_NOSWAP \
-     $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 fi
 rpl __FRONT_END_HOST_NAME__ $CURRENT_HOST_NAME \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 
+VIF_STANZA=$CONST_XEN_VIF_STANZA_PREFIX
+EXTERNAL_MAC="${CONST_XEN_MAC_PREFIX}${FRONT_END_EXTERNAL_MAC_ADDRESS}"
+INTERNAL_MAC="${CONST_XEN_MAC_PREFIX}${FRONT_END_CLUSTER_MAC_ADDRESS}"
+INTERNAL_BRIDGE="{$CONST_XEN_BRIDGE_PREFIX}${CLUSTER_BRIDGE_NAME}"
+INTERNAL_IP=$FRONT_END_CLUSTER_STATIC_IP
 if [ $CLUSTER_EXTERNAL_ADDRESSES_BY_DHCP -eq 1 ] ;then
+  rpl __XEN_DHCP_STANZA__ "$CONST_XEN_DHCP_STANZA" \
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+  VIF_STANZA="${VIF_STANZA}${EXTERNAL_MAC}','${INTERNAL_IP},${INTERNAL_MAC},${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}"
 else
-fi  
-rpl __FRONT_END_IP_EXTERNAL__ $ADDRESS \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_IP_CLUSTER__ $ADDRESS \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_CLUSTER_MAC_ADDRESS__ $__FRONT_END_CLUSTER_MAC_ADDRESS__ \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __FRONT_END_CLUSTER_MAC_ADDRESS__ $__FRONT_END_CLUSTER_MAC_ADDRESS__ \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-rpl __CLUSTER_BRIDGE_NAME__ $CLUSTER_BRIDGE_NAME \
-   $SCRIPT_PATH/$CURRENT_HOST_NAME.cfg
-
+  # Comment out the DHCP_STANZA.
+  rpl __XEN_DHCP_STANZA__ "#$CONST_XEN_DHCP_STANZA" \
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+  VIF_STANZA="${VIF_STANZA}${EXTERNAL_IP},${EXTERNAL_MAC},'${INTERNAL_IP},${INTERNAL_MAC},${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}"
+fi
+# In any case, write the VIF_STANZA
+rpl __VIF_STANZA__ $VIF_STANZA \
+   $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 #
+exit 0
+#
 # Umount the compute node system disk
 #
-umount $COMPUTE_NODE_DISK_MOUNT_POINT
+umount $FRONT_END_SYSTEM_DISK_MOUNT_POINT
 #
 # Start the virtual machine
 #
Index: trunk/shell/c-i-a-b.common
===================================================================
--- trunk/shell/c-i-a-b.common	(revision 22)
+++ trunk/shell/c-i-a-b.common	(revision 23)
@@ -2,13 +2,20 @@
 # Constants that no one should not change.
 CONST_NULL_DISK_SIZE=0G # For several configuration files.
 CONST_NO_DHCP="NO_DHCP"
+CONST_FRONT_END_TEMPLATE_NAME="front-end.cfg"
 #
 # Constant that may change with another Xen version.
-CONST_XEN_DHCP_STANZA="dhcp=          ='dhcp'"
+CONST_XEN_BRIDGE_PREFIX="bridge="
+CONST_XEN_DHCP_STANZA="dhcp        ='dhcp'"
+CONST_XEN_CONFIG_DIR="/etc/xen"
 CONST_XEN_DOM0_CPUS_ALL="(dom0-cpus 0)"
 CONST_XEN_DOM0_NAME=Domain-0
+CONST_XEN_IP_PREFIX="ip="
+CONST_XEN_MAC_PREFIX="mac="
 CONST_XEN_NOSWAP="noswap = 1" # For /etc/xen-tools/xen-tools.conf.
 CONST_XEN_NETWORK_SCRIPT_KEYWORD=network-script # For /etc/xen/xend-config.sxp.
+CONST_XEN_VIF_STANZA_POSTFIX="' ]"
+CONST_XEN_VIF_STANZA_PREFIX="vif         = [ '"
 #
 # Common user defined configuration variables
 #
@@ -17,60 +24,67 @@
 CLUSTER_BRIDGE_SCRIPT=network-bridge-internal
 CLUSTER_BRIDGE_STANZA="($CONST_NETWORK_SCRIPT_KEYWORD $CLUSTER_BRIDGE_SCRIPT)"
 CLUSTER_EXTERNAL_ADDRESSES_BY_DHCP=1
+CLUSTER_EXTERNAL_MAC_PREFIX="00:16:3E:33:A6:"
 CLUSTER_IMAGE=full
 CLUSTER_DOMAIN_NAME=ciab.lip.ens-lyon.fr
 CLUSTER_NOSWAP="$CONST_XEN_NOSWAP"
+CLUSTER_STATIC_EXTERNAL_PREFIX="140.77.15"
 CLUSTER_STATIC_NETWORK_PREFIX="192.168.1"
 CLUSTER_SWAP_SIZE=$CONST_NULL_DISK_SIZE
+#
 COMPUTE_NODE_BRIDGE=$CLUSTER_BRIDGE_NAME
 COMPUTE_NODE_CPUS_FILE=compute-nodes-cpus
 COMPUTE_NODE_DISK_MOUNT_POINT=/mnt/compute-node-system-disk
 COMPUTE_NODE_INTERFACES_TEMPLATE=interfaces.compute-node
 COMPUTE_NODE_KERNEL=/boot/vmlinuz-`uname -r`
-COMPUTE_NODE_RAMDISK=/boot/initrd.img-`uname -r`
 COMPUTE_NODE_MAC_ADDRESS_PREFIX="00:16:3E:0F:6A"
 COMPUTE_NODE_MAX_NUM=250
 COMPUTE_NODE_MEMORY=3072
-COMPUTE_NODE_MODEL_EXTERNAL_MAC_ADDRESS="00:16:3E:33:A6:01"
+COMPUTE_NODE_MODEL_EXTERNAL_MAC_ADDRESS="${CLUSTER_EXTERNAL_MAC_PREFIX}01"
 COMPUTE_NODE_MODEL_STATIC_NETWORK_POSTFIX=252
 COMPUTE_NODE_MODEL_STATIC_IP_EXTERNAL=
-COMPUTE_NODE_MODEL_NAME="compute-node-model"
+COMPUTE_NODE_MODEL_HOST_NAME="tamadi-1-cnm"
 COMPUTE_NODE_NAME_PREFIX="compute-node-"
+COMPUTE_NODE_RAMDISK=/boot/initrd.img-`uname -r`
 COMPUTE_NODE_STATIC_NETWORK_PREFIX=$CLUSTER_STATIC_NETWORK_PREFIX
+COMPUTE_NODE_SWAP_DISK_POSTFIX="-swap"
+COMPUTE_NODE_SWAP_DISK_PREFIX="compute-node-"
+COMPUTE_NODE_SWAP_DISK_SIZE=1G
+SWAP_DISK_VOLUME_GROUP=/dev/vg_fast
 DHCP_HOSTSFILE_BASENAME=dhcp-hostsfile
 DOM0_CPUS_LIST="0 4"
 DOM0_CPUS_NUM=2
 DOM0_CPUS_CLAUSE="(dom0-cpus $DOM0_CPUS_NUM)"
 FRONT_END_CPUS_LIST="8 12 16"
-FRONT_END_EXTERNAL_MAC_ADDRESS="00:16:3E:33:A6:02"
-FRONT_END_MEMORY=8G
-FRONT_END_HOME_DISK_SIZE=512G
+FRONT_END_EXTERNAL_MAC_ADDRESS="${CLUSTER_EXTERNAL_MAC_PREFIX}02"
+FRONT_END_HOME_DISK=front-end-home-disk
+FRONT_END_HOME_DISK_FILE_SYSTEM=ext3
+#FRONT_END_HOME_DISK_SIZE=512G
+FRONT_END_HOME_DISK_SIZE=10G
 FRONT_END_HOME_VOLUME_GROUP=vg_slow
 FRONT_END_HOME_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_HOME_VOLUME_GROUP"
-FRONT_END_HOST_NAME="front-end"
+FRONT_END_HOST_NAME="tamadi-1-fe"
 FRONT_END_INTERFACES_TEMPLATE=interfaces.front-end
 FRONT_END_KERNEL=/boot/vmlinuz-`uname -r`
+FRONT_END_MEMORY=8G
+FRONT_END_STATIC_NETWORK_POSTFIX=251
+FRONT_END_CLUSTER_STATIC_IP="$CLUSTER_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
+FRONT_END_EXTERNAL_STATIC_IP="$CLUSTER_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
 FRONT_END_RAMDISK=/boot/initrd.img-`uname -r`
-FRONT_END_STATIC_NETWORK_POSTFIX=251
-FRONT_END_STATIC_IP_CLUSTER="$CLUSTER_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
-FRONT_END_STATIC_IP_EXTERNAL="$CLUSTER_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
 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=1G # 0G means no swap disk.
 FRONT_END_SWAP_VOLUME_GROUP=vg_fast
 FRONT_END_SWAP_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_SWAP_VOLUME_GROUP"
 FRONT_END_SYSTEM_DISK="frontend-system-disk"
-FRONT_END_SYSTEM_DISK_SIZE=46G
+#FRONT_END_SYSTEM_DISK_SIZE=46G
+FRONT_END_SYSTEM_DISK_SIZE=10G
 FRONT_END_SYSTEM_DISK_FILE_SYSTEM=ext3
 FRONT_END_SYSTEM_DISK_MOUNT_POINT=/mnt/frontend-system-disk
 FRONT_END_SYSTEM_VOLUME_GROUP=vg_fast
 FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_SYSTEM_VOLUME_GROUP"
 FRONT_END_VCPUS_NUM=3
 HOSTS_FILE_BASENAME=hosts
-SWAP_DISK_LOGICAL_VOLUME=/dev/vg_fast
-SWAP_DISK_POSTFIX="-swap"
-SWAP_DISK_PREFIX="compute-node-"
-SWAP_DISK_SIZE=1G
 SYSTEM_DISK_CLONE_POSTFIX="-disk"
 SYSTEM_DISK_CLONE_PREFIX=$COMPUTE_NODE_NAME_PREFIX
 SYSTEM_DISK_CLONE_SIZE=20G # Half of the master size.
Index: trunk/shell/templates/etc/xen/front-end.cfg
===================================================================
--- trunk/shell/templates/etc/xen/front-end.cfg	(revision 22)
+++ trunk/shell/templates/etc/xen/front-end.cfg	(revision 23)
@@ -38,7 +38,7 @@
 #  Networking
 #
 __XEN_DHCP_STANZA__
-vif         = [ 'ip=__FRONT_END_IP_EXTERNAL__,mac=__FRONT_END_EXTERNAL_MAC_ADDRESS__', '__FRONT_END_IP_CLUSTER__,mac=__FRONT_END_CLUSTER_MAC_ADDRESS__,bridge=__CLUSTER_BRIDGE_NAME__' ] 
+
 __VIF_STANZA__
 #
 #  Behaviour
