add second vm snapshot try without quiesce

This commit is contained in:
Jochen Welzel 2021-01-06 10:50:06 +01:00
parent acef33b4d5
commit dfaeaac441

View File

@ -43,11 +43,17 @@ done
# create snapshot dataset
zfs create tank/snapshots/$VM
virsh snapshot-create-as --domain $VM --name $SNAPNAME --quiesce --atomic --disk-only $DISKSPEC > /dev/null
virsh snapshot-create-as --domain $VM --name $SNAPNAME --quiesce --atomic --disk-only $DISKSPEC >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "VM snapshot creation failed" >&2
exit 1
virsh snapshot-create-as --domain $VM --name $SNAPNAME --disk-only $DISKSPEC >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "VM snapshot creation failed" >&2
exit 1
else
echo "Snapshot created without --quiesce"
fi
fi
zfs snapshot "$SRCZFS"@"$SNAPNAME"