Skip to content

Commit 836955f

Browse files
Renuka Aptesleepsonthefloor
authored andcommitted
XenServer: change install script for new install process
Change-Id: Iee64e19fb21c1c633b5a2df7c4c154702f2a4526
1 parent a3170fb commit 836955f

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tools/xen/scripts/install-os-vpx.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ usage()
3838
cat << EOF
3939
4040
Usage: $0 [-f FILE_PATH] [-d DISK_SIZE] [-v BRIDGE_NAME] [-m BRIDGE_NAME] [-p BRIDGE_NAME]
41-
[-k PARAMS] [-r RAM] [-i|-c] [-w] [-b] [-l NAME_LABEL]
41+
[-k PARAMS] [-r RAM] [-i|-c] [-w] [-b] [-l NAME_LABEL] [-t TEMPLATE_NW_INSTALL]
4242
4343
Installs XenServer OpenStack VPX.
4444
@@ -61,6 +61,7 @@ cat << EOF
6161
-r MiB Specifies RAM used by the VPX, in MiB.
6262
By default it will take the value from the XVA.
6363
-l name Specifies the name label for the VM.
64+
-t template Network install an openstack domU from this template
6465
6566
EXAMPLES:
6667
@@ -88,7 +89,7 @@ EOF
8889

8990
get_params()
9091
{
91-
while getopts "hicwbf:d:v:m:p:k:r:l:" OPTION;
92+
while getopts "hicwbf:d:v:m:p:k:r:l:t:" OPTION;
9293
do
9394
case $OPTION in
9495
h) usage
@@ -127,9 +128,12 @@ get_params()
127128
v)
128129
BRIDGE_V=$OPTARG
129130
;;
130-
l)
131+
l)
131132
NAME_LABEL=$OPTARG
132133
;;
134+
t)
135+
TEMPLATE_NAME=$OPTARG
136+
;;
133137
?)
134138
usage
135139
exit
@@ -422,6 +426,16 @@ then
422426

423427
destroy_vifs "$vm_uuid"
424428
set_all "$vm_uuid"
429+
elif [ "$TEMPLATE_NAME" ]
430+
then
431+
echo $TEMPLATE_NAME
432+
vm_uuid=$(xe_min vm-install template="$TEMPLATE_NAME" new-name-label="DevstackOSDomu")
433+
destroy_vifs "$vm_uuid"
434+
set_auto_start "$vm_uuid"
435+
create_gi_vif "$vm_uuid"
436+
create_vm_vif "$vm_uuid"
437+
create_management_vif "$vm_uuid"
438+
create_public_vif "$vm_uuid"
425439
else
426440
if [ ! -f "$VPX_FILE" ]
427441
then

0 commit comments

Comments
 (0)