mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-07 17:17:41 +03:00
F OpenNebula/one#6363: Handle system snapshots after poweroff (#2790)
This commit is contained in:
parent
c6d50954ef
commit
313391b651
@ -254,7 +254,7 @@ if [ $RC -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# redefine potential snapshots after live migration
|
# redefine potential snapshots after live migration
|
||||||
if [ "$SHARED" = "YES" ] && [ -n "$SNAP_CUR" ]; then
|
if [ "$SHARED" = "YES" ]; then
|
||||||
UUID=$(virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system dominfo $DEPLOY_ID | awk '/UUID:/ {print $2}')
|
UUID=$(virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system dominfo $DEPLOY_ID | awk '/UUID:/ {print $2}')
|
||||||
DISK_PATH=$(virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system domblklist $DEPLOY_ID | awk '/disk.0/ {print $2}')
|
DISK_PATH=$(virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system domblklist $DEPLOY_ID | awk '/disk.0/ {print $2}')
|
||||||
DISK_DIR=$(dirname $DISK_PATH)
|
DISK_DIR=$(dirname $DISK_PATH)
|
||||||
@ -270,7 +270,8 @@ if [ "$SHARED" = "YES" ] && [ -n "$SNAP_CUR" ]; then
|
|||||||
# redefine the snapshot using the xml metadata file
|
# redefine the snapshot using the xml metadata file
|
||||||
virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system snapshot-create $DEPLOY_ID $SNAPSHOT_MD_XML --redefine > /dev/null || true
|
virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system snapshot-create $DEPLOY_ID $SNAPSHOT_MD_XML --redefine > /dev/null || true
|
||||||
done
|
done
|
||||||
virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system snapshot-current $DEPLOY_ID $SNAP_CUR
|
|
||||||
|
[ -n "$SNAP_CUR" ] && virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system snapshot-current $DEPLOY_ID $SNAP_CUR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Synchronize VM time on background on remote host
|
# Synchronize VM time on background on remote host
|
||||||
|
Loading…
Reference in New Issue
Block a user