[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback? |
Date: |
Mon, 4 Jan 2016 10:54:05 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 01/04/2016 10:45 AM, Max Reitz wrote:
> On 30.12.2015 12:31, Huan Zhang wrote:
>> Hi,
>> We are finding a way to do rollback for qcow2 in production environment,
>> But we can't ensure the below way will work well, and user data are safe.
>>
>> for example,
>> snap0.qcow2 -> snap1.qcow2 ->snap2.qcow2 -> active.qcow2
>>
>> rollback to snap1 using convert && rebase -u:
>> 1. qemu-img convert -O qcow2 snap1.qcow2 rollback.qcow2
>> 2. qemu-img rebase -u -b snap2.qcow2 rollback.qcow2
>
> What do you mean by "rollback"? Just getting back to the state presented
> in snap1, discarding all the changes done in snap2 and active?
>
> Then why don't you just throw snap2.qcow2 and active.qcow2 away and
> continue to work on snap1.qcow2? If you want to keep snap1 in its
> current state, just create a new image on top of it:
>
> $ qemu-img create -f qcow2 -b snap1.qcow2 active.qcow2
Don't forget to also set the backing format (either '-o
backing_fmt=qcow2' or the undocumented '-F qcow2'). Without an explicit
format, libvirt will default to refusing to honor your backing files
rather than risk an unsafe format probe.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature