On 27.09.18 16:23, Alberto Garcia wrote: > On Thu 27 Sep 2018 04:14:15 PM CEST, Max Reitz wrote: >> On 25.09.18 16:13, Alberto Garcia wrote: >>> On Thu 13 Sep 2018 08:37:05 PM CEST, Max Reitz wrote: >>>> First, split .003 into the part we want to commit and the part we >>>> don't want to commit. This is a bit tricky without qemu-img dd @seek >>>> (or a corresponding convert parameter), so we'll have to make do with >>>> backing=null so we don't copy anything into the output from img.003's >>>> backing chain. >>>> >>>> Or, we would have to use backing=null, but for some reason that >>>> doesn't work. I'll have to investigate. >>>> >>>> So rebase will need to do: >>>> >>>> $ qemu-img rebase -u -b '' img.003 >>>> >>>> $ qemu-img convert -O qcow2 \ >>>> "json:{'driver':'raw','offset':0,'size':1048576,\ >>>> 'file':{'driver':'qcow2',\ >>>> 'file':{'driver':'file','filename':'img.003'}}}" \ >>>> "json:{'driver':'null-co','size':2097152}" \ >>>> img.003.commit.000 >>> >>> If you only want to copy parts of a backing file I think it's much >>> simpler if you use copy-on-read: >> >> And you can do it at runtime! > > How would you do that? As far as I'm aware HMP's qemu-io doesn't allow > you to enable copy-on-read, and block-stream (which uses copy-on-read) > doesn't allow you to specify a range.
We have a copy-on-read filter driver now. Max
signature.asc
Description: OpenPGP digital signature