Actualiser template/template.sh

This commit is contained in:
guillaume 2024-04-26 17:16:35 +02:00
parent f829afd2df
commit 91abe71afe

View File

@ -9,14 +9,23 @@ ENDCOLOR="\e[0m"
template_id=$1
template_name=$2
cloudinit_img=$3
storage="Datastore" # De base local-lvm | local-btrs | local-zfs | local
# Personnalisation Cloud-init
ci_username="cloudinit"
ci_password="changeme"
# Personnalisation Cloud-init | Intéractif
echo -e "${BOLDGREEN}Veuillez saisir le nom d'utilisateur pour Cloud-init:${ENDCOLOR}"
read -p "> " ci_username
echo -e "${BOLDGREEN}Veuillez saisir le mot de passe pour Cloud-init:${ENDCOLOR}"
read -s -p "> " ci_password
echo
ci_network="dhcp"
# Personnalisation Cloud-init
# ci_username="cloudinit"
# ci_password="changeme"
# ci_network="dhcp"
# Création de la VM
echo -e "\n${BOLDGREEN}Création de la MV${ENDCOLOR}" && sleep 2
qm create $template_id --memory 2048 --core 2 --name $template_name --net0 virtio,bridge=vmbr0 --agent 1