Update vmcreate1.sh

This commit is contained in:
2025-10-28 08:31:31 +00:00
parent 7f44fd6c50
commit f0286cfe32

View File

@@ -298,14 +298,15 @@ do
cat /etc/pve/qemu-server/${vmid}.conf cat /etc/pve/qemu-server/${vmid}.conf
exit 102 exit 102
### ###
echo -n "Migrating VM $vmid to pve${node}....." # # Migrate VM to target node
qm migrate $vmid pve${node} && # echo -n "Migrating VM $vmid to pve${node}....."
if [ $? -eq 0 ]; then # qm migrate $vmid pve${node} &&
echo "OK" # if [ $? -eq 0 ]; then
else # echo "OK"
echo "ERROR" # else
exit 9 # echo "ERROR"
fi # exit 9
# fi
# qm start $vmid ВРЕМЕННО ОТКЛЮЧЕНО # qm start $vmid ВРЕМЕННО ОТКЛЮЧЕНО
if [ $harule ]; then if [ $harule ]; then
ha-manager add vm:$vmid --state started --max_relocate 2 ha-manager add vm:$vmid --state started --max_relocate 2