1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

fixup! F OpenNebula/one#6265: Fix recovery_snap_create_live (#2659) (#2687)

This commit is contained in:
Jan Orel 2023-07-25 13:35:08 +02:00 committed by GitHub
parent 1fa2c5c8fe
commit e18d1b6d4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,11 @@ SNAP_PATH="${DISK_PATH}.snap/rs_tmp"
DISK_NAME="$(basename $DISK_PATH)"
REAL_DISK="$(dirname $DISK_PATH)/$(readlink $DISK_PATH)"
if ! virsh -c ${LIBVIRT_URI} domblkinfo one-${VMID} "$REAL_DISK" &>/dev/null; then
# not a real disk in domain blockdevice -> upgrade to 6.6.3 or higher detected
REAL_DISK="$DISK_PATH"
fi
if [ -f $SNAP_PATH ]; then
SNAP_OLD=$(stat -c "%Y" $SNAP_PATH)