Update vmcreate1.sh

This commit is contained in:
2025-10-22 19:00:08 +00:00
parent c68b52869e
commit 50e9e065d9

View File

@@ -16,6 +16,9 @@ ip_check ()
hostame_generate()
generate_keypair ()
#указать в конце функции переменную для вывода названия приватного ключа
privkey=
while getopts "a:f:h" opt; do
case $opt in
@@ -45,6 +48,11 @@ do
qm set $vmnum --ipconfig0 ip=$ip/24,gw=10.10.35.1
qm cloudinit update $vmnum
qm start $vmnum
# ДОБАВИТЬ правило HA если $haadd
done
echo "VMs from 'hosts' successfully created"
echo "VMs from 'hosts' successfully created"
if [ -e $privkey ]
then
echo "Generated private key $privkey"
echo "SAVE IT!"
fi