Zhi Hui Li <zhihu...@linux.vnet.ibm.com> writes: > when I trace the code of qemu-img.c, I found in the image file, the > backing_file use the relative path, I think Maybe it has some > problems. > > for example: > > 1: qemu-img create -o backing_file=../xxxx aa.img 5G > > 2: qemu-system-x86_64 aa.img > > if you change aa.img's the path, the exec is wrong,it can't find the > backing_file path, because the backing_file use the relative path, > Could we change the relative path to the absolute path?
qemu-img stores exactly the path the user asks it to store. That's a feature. It lets the user can pick what kinds of moves break his COW: 1. COW refers to its backing image with a relative path. Moving both together works. Moving just one of them breaks. 2. COW refers to its backing image with an absolute path. Moving just the COW works. Anything else breaks.