Set default VM names in case there is no user input
This commit is contained in:
parent
f866da5de3
commit
025886f92b
21
setup
21
setup
|
@ -50,6 +50,7 @@ TMPDIR=${SCRIPT_DIR}/tmp
|
||||||
ISODIR=/var/lib/vz/template/iso/
|
ISODIR=/var/lib/vz/template/iso/
|
||||||
HACKPXVERSION="3.2.0"
|
HACKPXVERSION="3.2.0"
|
||||||
OCVERSION="0.7.7"
|
OCVERSION="0.7.7"
|
||||||
|
DEFAULT_VM_PREFIX="HACK-"
|
||||||
|
|
||||||
if [ `lscpu | grep "Vendor ID" | grep -i amd | wc -l` -eq 1 ]; then OSX_PLATFORM="AMD"; else OSX_PLATFORM="INTEL"; fi
|
if [ `lscpu | grep "Vendor ID" | grep -i amd | wc -l` -eq 1 ]; then OSX_PLATFORM="AMD"; else OSX_PLATFORM="INTEL"; fi
|
||||||
|
|
||||||
|
@ -206,6 +207,8 @@ do
|
||||||
echo "Enter VM Name: "
|
echo "Enter VM Name: "
|
||||||
read VM_NAME
|
read VM_NAME
|
||||||
|
|
||||||
|
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}HIGHSIERRA"; fi;
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
||||||
read SIZEDISK
|
read SIZEDISK
|
||||||
|
@ -366,7 +369,7 @@ do
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Virtual machine created successfully."
|
echo "Virtual machine (${VM_NAME}) created successfully."
|
||||||
echo " "
|
echo " "
|
||||||
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
||||||
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
||||||
|
@ -395,6 +398,8 @@ do
|
||||||
echo "Enter VM Name: "
|
echo "Enter VM Name: "
|
||||||
read VM_NAME
|
read VM_NAME
|
||||||
|
|
||||||
|
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}MOJAVE"; fi;
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
||||||
read SIZEDISK
|
read SIZEDISK
|
||||||
|
@ -555,7 +560,7 @@ do
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Virtual machine created successfully."
|
echo "Virtual machine (${VM_NAME}) created successfully."
|
||||||
echo " "
|
echo " "
|
||||||
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
||||||
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
||||||
|
@ -584,6 +589,8 @@ do
|
||||||
echo "Enter VM Name: "
|
echo "Enter VM Name: "
|
||||||
read VM_NAME
|
read VM_NAME
|
||||||
|
|
||||||
|
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}CATALINA"; fi;
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
||||||
read SIZEDISK
|
read SIZEDISK
|
||||||
|
@ -744,7 +751,7 @@ do
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Virtual machine created successfully."
|
echo "Virtual machine (${VM_NAME}) created successfully."
|
||||||
echo " "
|
echo " "
|
||||||
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
||||||
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
||||||
|
@ -773,6 +780,8 @@ do
|
||||||
echo "Enter VM Name: "
|
echo "Enter VM Name: "
|
||||||
read VM_NAME
|
read VM_NAME
|
||||||
|
|
||||||
|
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}BIG-SUR"; fi;
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
||||||
read SIZEDISK
|
read SIZEDISK
|
||||||
|
@ -933,7 +942,7 @@ do
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Virtual machine created successfully."
|
echo "Virtual machine (${VM_NAME}) created successfully."
|
||||||
echo " "
|
echo " "
|
||||||
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
||||||
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
||||||
|
@ -962,6 +971,8 @@ do
|
||||||
echo "Enter VM Name: "
|
echo "Enter VM Name: "
|
||||||
read VM_NAME
|
read VM_NAME
|
||||||
|
|
||||||
|
if [ -z $VM_NAME ]; then VM_NAME="${DEFAULT_VM_PREFIX}MONTEREY"; fi;
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
echo -n "Enter a disk size [INTEGER] [Default: 64 Gb]: "
|
||||||
read SIZEDISK
|
read SIZEDISK
|
||||||
|
@ -1122,7 +1133,7 @@ do
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Virtual machine created successfully."
|
echo "Virtual machine (${VM_NAME}) created successfully."
|
||||||
echo " "
|
echo " "
|
||||||
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
echo "Access the Proxmox Web Panel to continue with the installation ..."
|
||||||
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
echo "https://`ip address show vmbr0 | grep -w "inet" | awk -F " " '{ print $2 }' | awk -F "/" '{ print $1 }'`:8006"
|
||||||
|
|
Loading…
Reference in New Issue