1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

M #-: Skip recovery snap for not running VMs (#889)

This commit is contained in:
Jan Orel 2021-02-26 15:35:07 +01:00 committed by GitHub
parent b6f868fda1
commit 0c90f7879e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,12 @@ if [ ! -L $DISK_PATH ]; then
exit 1
fi
# skip if VM is not running
if [ "$(virsh -c ${LIBVIRT_URI} domstate one-${VMID} >/dev/null)" != "running" ]; then
echo "VM ${VMID} is not running"
exit 1
fi
# Enumerate disks for which we don't create snapshot (all except $DISK_PATH)
DISKS=$(virsh -c ${LIBVIRT_URI} domblklist one-${VMID} | grep disk | awk '{print $2}')
OTHER_DISK_STR=""