shwstppr commented on a change in pull request #4068:
URL: https://github.com/apache/cloudstack/pull/4068#discussion_r438683406



##########
File path: scripts/storage/qcow2/managesnapshot.sh
##########
@@ -187,6 +187,7 @@ backup_snapshot() {
   local snapshotname="$2"
   local destPath=$3
   local destName=$4
+  local forceShareFlag="-U"

Review comment:
       @rhtyd  `qemu-img` with QEMU 2.1 is not able to read QCOW2 file when it 
is already have a read lock by another process (libvirt). Due to this, both 
Ubuntu and CentOS8 fail to snapshot a running VM.
   For a running VM and volume snapshot, as per code (and my understanding), we 
create an external snapshot for VM using libvirt, then this script is used to 
read, convert (to a new file) and backup that snapshot to secondary storage 
using qemu-img. Since we are not making any change as such in original QCOW2 
disk file, we can open it shared open (`-U`) flag which will prevent regression 
from CentOS7 or distros with older QEMU.
   I've added checks in code avoid any failures if `-U` is not supported




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to