Re: [Qemu-devel] Can qemu reopen image files?

2016-12-29 Thread Eric Blake
On 12/29/2016 07:52 AM, Eric Blake wrote: > On 12/29/2016 07:42 AM, Eric Blake wrote: >> On 12/28/2016 12:51 PM, Christopher Pereira wrote: >>> Hi Eric, >>> >>> There is something I don't understand. >>> >>> We are doing: "virsh save", "qemu-img convert", "qemu-img rebase" and >>> "virsh restore".

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-29 Thread Eric Blake
On 12/29/2016 07:42 AM, Eric Blake wrote: > On 12/28/2016 12:51 PM, Christopher Pereira wrote: >> Hi Eric, >> >> There is something I don't understand. >> >> We are doing: "virsh save", "qemu-img convert", "qemu-img rebase" and >> "virsh restore". >> We only touch the backing chain by doing the

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-29 Thread Eric Blake
On 12/28/2016 12:51 PM, Christopher Pereira wrote: > Hi Eric, > > There is something I don't understand. > > We are doing: "virsh save", "qemu-img convert", "qemu-img rebase" and > "virsh restore". > We only touch the backing chain by doing the rebase while the VM is down. > Is there any chance

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-29 Thread Eric Blake
On 12/19/2016 10:24 AM, Christopher Pereira wrote: > Hi Eric, > > Thanks for your great answer. > > On 19-Dec-16 12:48, Eric Blake wrote: > >> >>> Then we do the rebase while the VM is suspended to make sure the image >>> files are reopened. >> That part is where you are liable to break things.

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-28 Thread Christopher Pereira
Hi Eric, There is something I don't understand. We are doing: "virsh save", "qemu-img convert", "qemu-img rebase" and "virsh restore". We only touch the backing chain by doing the rebase while the VM is down. Is there any chance this procedure can destroy data? If so, is there any difference

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Christopher Pereira
Hi Eric, Thanks for your great answer. On 19-Dec-16 12:48, Eric Blake wrote: Then we do the rebase while the VM is suspended to make sure the image files are reopened. That part is where you are liable to break things. Qemu does NOT have a graceful way to reopen the backing chain, so

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Eric Blake
On 12/19/2016 09:03 AM, Christopher Pereira wrote: > Hi Fam, Stefan, > > Thanks for answering. > > We use "qemu-img convert" to convert a image in the middle of the chain, > not the active one. > Those images (and the previous ones in the chain) are read-only and > there should be no risk in

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Christopher Pereira
Hi Fam, Stefan, Thanks for answering. We use "qemu-img convert" to convert a image in the middle of the chain, not the active one. Those images (and the previous ones in the chain) are read-only and there should be no risk in converting them: E.g.: for the following chain: base -->

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Stefan Hajnoczi
On Mon, Dec 19, 2016 at 09:07:43AM +0800, Fam Zheng wrote: > On Sun, 12/18 20:52, Christopher Pereira wrote: > > Hi, > > > > We are doing a "qemu-img convert" operation (qcow2, with compression) to > > shorten the backing-chain (in the middle of the backing-chain). > > In order to force qemu to

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-18 Thread Fam Zheng
On Sun, 12/18 20:52, Christopher Pereira wrote: > Hi, > > We are doing a "qemu-img convert" operation (qcow2, with compression) to > shorten the backing-chain (in the middle of the backing-chain). > In order to force qemu to reopen files, we do a save and restore operation. > Is there a faster

[Qemu-devel] Can qemu reopen image files?

2016-12-18 Thread Christopher Pereira
Hi, We are doing a "qemu-img convert" operation (qcow2, with compression) to shorten the backing-chain (in the middle of the backing-chain). In order to force qemu to reopen files, we do a save and restore operation. Is there a faster way to reopen image files using virsh or qemu? Best