The reason of this issue is that QEMU seeking the backing file by following the path of the current snapshot. If they sit in different directory, while creating a new snapshot, QEMU would show like:
{"error": {"class": "GenericError", "desc": "Could not open '/home/xuhan/sn/space0-snap2.qcow2': Could not open file: No such file or directory: No such file or directory"}}
CLI:
/usr/libexec/qemu-kvm ... \
-drive file=disk0,if=none,id=drive-ide0-0-0,cache=none,aio=threads,rerror=stop,werror=stop ...
# ls /home/xuhan/ | grep disk0
disk0
# pidof qemu-kvm
12121
# ll /proc/12121/cwd
lrwxrwxrwx. 1 root root 0 Apr 4 13:51 /proc/12121/cwd -> /home/xuhan
---------------------------
Creating snapshotA succeed:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-ide0-0-0", "snapshot-file": "/home/xuhan/sn/space0-snap2.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{"return": {}}
(qemu) info block
...
drive-ide0-0-0: removable=0 io-status=ok file=/home/xuhan/sn/space0-snap2.qcow2 backing_file=disk0 backing_file_depth=1 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
...
--------------------------
Creating snapshotB failed:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-ide0-0-0", "snapshot-file": "/home/xuhan/sn/space0-snap3.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{"error": {"class": "GenericError", "desc": "Could not open '/home/xuhan/sn/space0-snap2.qcow2': Could not open file: No such file or directory: No such file or directory"}}
---------------------------------------------------------------------------
If copy the backing file to the path of the current snapshot, then creating snapshotB would succeed:
# cp /home/xuhan/disk0 /home/xuhan/sn/disk0
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-ide0-0-0", "snapshot-file": "/home/xuhan/sn/space0-snap3.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{"return": {}}
(qemu) info block
...
drive-ide0-0-0: removable=0 io-status=ok file=/home/xuhan/sn/space0-snap3.qcow2 backing_file=/home/xuhan/sn/space0-snap2.qcow2 backing_file_depth=2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
...
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-60.el7ev.x86_64
Also hit this issue with:
qemu-kvm-rhev-1.5.3-43.el7.x86_64
So, this might not be a regression.