KVM SR: resilient export script: suspend vm before removing snapshot.

parent 3d722ab1
...@@ -133,7 +133,7 @@ mode = 0644 ...@@ -133,7 +133,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/kvm-export.sh.in url = ${:_profile_base_location_}/template/kvm-export.sh.in
filename = kvm-export.sh.in filename = kvm-export.sh.in
md5sum = bf03a90f6960b37cba812ee936a13342 md5sum = 844ffe5e01dedbf0a261edf52e067cbe
download-only = true download-only = true
mode = 0755 mode = 0755
......
...@@ -18,5 +18,8 @@ $QMP_CLIENT ${kvm-instance:socket-path} resume ...@@ -18,5 +18,8 @@ $QMP_CLIENT ${kvm-instance:socket-path} resume
if [ -f $BACKUP_PATH ]; then if [ -f $BACKUP_PATH ]; then
rm $BACKUP_PATH rm $BACKUP_PATH
fi fi
$QEMU_IMG convert -f qcow2 -O qcow2 -s $SNAPSHOT_NAME $DISK_PATH $BACKUP_PATH && \ $QEMU_IMG convert -f qcow2 -O qcow2 -s $SNAPSHOT_NAME $DISK_PATH $BACKUP_PATH
$QMP_CLIENT ${kvm-instance:socket-path} suspend && \
$QEMU_IMG snapshot -d $SNAPSHOT_NAME $DISK_PATH $QEMU_IMG snapshot -d $SNAPSHOT_NAME $DISK_PATH
$QMP_CLIENT ${kvm-instance:socket-path} resume
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment