qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eric Blake
Subject: Re: [Qemu-devel] Can qemu reopen image files?
Date: Thu, 29 Dec 2016 07:52:34 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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 rebase while the VM is down.
>> Is there any chance this procedure can destroy data?
> 
> Since there are never two active writers to the file (you have made sure
> that qemu-img and qemu are not both holding the same file open at once),
> there is no chance for corruption on that front.  There's still a
> possibility of corruption if you botch the instructions, and don't
> rebuild the chain in such a way that the guest would see the same data,
> but that's harder to say without seeing an actual transcript.

Oh, and since you mention virsh, that means you also have libvirt
involved - anything you do to the backing chain with qemu-img is now
behind libvirt's back, so you must also make sure that you are using
'virsh edit' if necessary to update the domain XML to match the changes
you made to the backing chain.  Again, it's hard to say whether that is
a factor in your case without an actual transcript (eventually, libvirt
plans to track full backing chains even for offline domains; at the
moment, however, it only tracks full backing chains for running domains
and only the top-most image of an offline domain, which means qemu-img
changes to intermediate parts of a backing chain don't affect offline
domain XML now, but might in some future libvirt version).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]