Actualiser template/template.sh
This commit is contained in:
parent
f829afd2df
commit
91abe71afe
@ -9,14 +9,23 @@ ENDCOLOR="\e[0m"
|
|||||||
template_id=$1
|
template_id=$1
|
||||||
template_name=$2
|
template_name=$2
|
||||||
cloudinit_img=$3
|
cloudinit_img=$3
|
||||||
|
|
||||||
storage="Datastore" # De base local-lvm | local-btrs | local-zfs | local
|
storage="Datastore" # De base local-lvm | local-btrs | local-zfs | local
|
||||||
|
|
||||||
# Personnalisation Cloud-init
|
# Personnalisation Cloud-init | Intéractif
|
||||||
ci_username="cloudinit"
|
echo -e "${BOLDGREEN}Veuillez saisir le nom d'utilisateur pour Cloud-init:${ENDCOLOR}"
|
||||||
ci_password="changeme"
|
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"
|
ci_network="dhcp"
|
||||||
|
|
||||||
|
# Personnalisation Cloud-init
|
||||||
|
# ci_username="cloudinit"
|
||||||
|
# ci_password="changeme"
|
||||||
|
# ci_network="dhcp"
|
||||||
|
|
||||||
# Création de la VM
|
# Création de la VM
|
||||||
echo -e "\n${BOLDGREEN}Création de la MV${ENDCOLOR}" && sleep 2
|
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
|
qm create $template_id --memory 2048 --core 2 --name $template_name --net0 virtio,bridge=vmbr0 --agent 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user