File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 2
2
set -e
3
3
4
4
if [ $# -lt 3 ]; then
5
- echo " Usage: $0 <esxi_user> <esxi_host> <template> [<scripts_datastore>] [<resource_pool_name >] [<datastore>] [<vm_name>] [<ram>] [<network>]"
5
+ echo " Usage: $0 <esxi_user> <esxi_host> <template> [<scripts_datastore>] [<template_datastore >] [<datastore>] [<resource_pool_name >] [<vm_name>] [<ram>] [<network>]"
6
6
exit 1
7
7
fi
8
8
9
9
ESXI_USER=$1
10
10
ESXI_HOST=$2
11
11
TEMPLATE_NAME=$3
12
12
SCRIPTS_DATASTORE=${4:- ssd1}
13
- POOL_NAME =${5:- $ESXI_USER }
13
+ TEMPLATE_DATASTORE =${5:- ssd1 }
14
14
DATASTORE=${6:- ssd1}
15
- VM_NAME=${7:- $TEMPLATE_NAME -$RANDOM }
16
- RAM=${8:- 1024}
17
- NETWORK=${9:- " VM Network" }
18
-
19
- TEMPLATE_DATASTORE=ssd1
15
+ POOL_NAME=${7:- $ESXI_USER }
16
+ VM_NAME=${8:- $TEMPLATE_NAME -$RANDOM }
17
+ RAM=${9:- 1024}
18
+ NETWORK=${10:- " VM Network" }
20
19
21
20
NET_ADAPTER_TYPE=vmxnet3
22
21
23
- ESXI_BASEDIR=/vmfs/volumes/ssd1 /unattended-scripts
22
+ ESXI_BASEDIR=/vmfs/volumes/$SCRIPTS_DATASTORE /unattended-scripts
24
23
TEMPLATE_BASEDIR=/vmfs/volumes/$TEMPLATE_DATASTORE /$TEMPLATE_NAME
25
24
26
25
TEMPLATE_VMX_FILE=$TEMPLATE_BASEDIR /$TEMPLATE_NAME .vmx
You can’t perform that action at this time.
0 commit comments