On 19/10/16 14:43 +0200, Claudio Soprano wrote:
Hi Adam, we tried your solution.
This is our situation with the current VM that has 2 disks
base -> snap1 -> snap2 -> snap3 -> snap4 -> snap5 -> .. -> snap15 for
each disk
We tried to do
qemu-img rebase -u -b base snap1
results OK
qemu-img rebase -u -b snap1 snap2
results:
qemu-img: Could not open 'snap2': Backing file name too long
our qemu version is
qemu-img version 2.3.0 (qemu-kvm-ev-2.3.0-31.el7.16.1), Copyright (c)
2004-2008 Fabrice Bellard
How do you think can we resolve ?
I talked with the qemu developers about this issue and the best way to
fix this is by using a patched version of qemu-img that ignores
invalid backing_file values when doing an unsafe rebase. Here is what
you will need to do to fix your images.
1. Save the attached patch
2. Grab a copy of the latest qemu.git
3. Apply the patch to the source
4. Install qemu build dependencies
5. Build qemu
6. Run the built version of qemu-img when fixing your chain as I
suggested above:
./qemu-img rebase -u -b snap1 snap2
The patch disables other qemu-img functionality since you should not
be using this for anything but the rebase part. After the rebase you
can use the system qemu-img binary to check the image. Please try
this on one VM disk and make sure everything is okay.
--
Adam Litke