XenServer: change install script for new install process

Change-Id: Iee64e19fb21c1c633b5a2df7c4c154702f2a4526
This commit is contained in:
Renuka Apte 2012-04-02 15:22:55 -07:00 committed by Anthony Young
parent a3170fb13b
commit 836955f825

View File

@ -38,7 +38,7 @@ usage()
cat << EOF cat << EOF
Usage: $0 [-f FILE_PATH] [-d DISK_SIZE] [-v BRIDGE_NAME] [-m BRIDGE_NAME] [-p BRIDGE_NAME] Usage: $0 [-f FILE_PATH] [-d DISK_SIZE] [-v BRIDGE_NAME] [-m BRIDGE_NAME] [-p BRIDGE_NAME]
[-k PARAMS] [-r RAM] [-i|-c] [-w] [-b] [-l NAME_LABEL] [-k PARAMS] [-r RAM] [-i|-c] [-w] [-b] [-l NAME_LABEL] [-t TEMPLATE_NW_INSTALL]
Installs XenServer OpenStack VPX. Installs XenServer OpenStack VPX.
@ -61,6 +61,7 @@ cat << EOF
-r MiB Specifies RAM used by the VPX, in MiB. -r MiB Specifies RAM used by the VPX, in MiB.
By default it will take the value from the XVA. By default it will take the value from the XVA.
-l name Specifies the name label for the VM. -l name Specifies the name label for the VM.
-t template Network install an openstack domU from this template
EXAMPLES: EXAMPLES:
@ -88,7 +89,7 @@ EOF
get_params() get_params()
{ {
while getopts "hicwbf:d:v:m:p:k:r:l:" OPTION; while getopts "hicwbf:d:v:m:p:k:r:l:t:" OPTION;
do do
case $OPTION in case $OPTION in
h) usage h) usage
@ -127,9 +128,12 @@ get_params()
v) v)
BRIDGE_V=$OPTARG BRIDGE_V=$OPTARG
;; ;;
l) l)
NAME_LABEL=$OPTARG NAME_LABEL=$OPTARG
;; ;;
t)
TEMPLATE_NAME=$OPTARG
;;
?) ?)
usage usage
exit exit
@ -422,6 +426,16 @@ then
destroy_vifs "$vm_uuid" destroy_vifs "$vm_uuid"
set_all "$vm_uuid" set_all "$vm_uuid"
elif [ "$TEMPLATE_NAME" ]
then
echo $TEMPLATE_NAME
vm_uuid=$(xe_min vm-install template="$TEMPLATE_NAME" new-name-label="DevstackOSDomu")
destroy_vifs "$vm_uuid"
set_auto_start "$vm_uuid"
create_gi_vif "$vm_uuid"
create_vm_vif "$vm_uuid"
create_management_vif "$vm_uuid"
create_public_vif "$vm_uuid"
else else
if [ ! -f "$VPX_FILE" ] if [ ! -f "$VPX_FILE" ]
then then