qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Documentation: Warn against qemu-img on active


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] Documentation: Warn against qemu-img on active image
Date: Thu, 16 Aug 2012 06:56:09 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 08/16/2012 04:00 AM, Peter Maydell wrote:
> On 16 August 2012 10:00, Kevin Wolf <address@hidden> wrote:
>> People have repeatedly expected that you can do things like snapshotting
>> an image with qemu-img while a qemu instance is running. Maybe we need
>> to consider locking the files while they are in use,

Sounds like a nice feature bit to add to qcow2v3, where both qemu-img
and qemu check if the locking feature is enabled for an image, as well
as maintain a header bit that is set when the image is open read-write
and refuse to use the image if the lock bit is set.

> but having a
>> warning in the qemu-img manpage is doable for 1.2 and can't hurt anyway.
>>
>> Signed-off-by: Kevin Wolf <address@hidden>

> 
>> +
>> address@hidden:} Never use qemu-img to modify images in use by a running 
>> virtual
>> +machine or any other process, this may destroy the image.
> 
> ";" or ", because".

Is this strong enough?  Remember, with qcow2v3 and qed, the mere act of
opening an image will perform refcount checks that modify the image,
unless you explicitly request otherwise, which means even a query of the
file metadata may result in modifying the image as part of the default
open.  Maybe incorporate some ideas from this attempt:

Never use qemu-img to modify files in use by a running virtual machine
or any other process; this may destroy the image.  Be aware that some
image formats perform modifications even on query operations.  Also, be
aware that querying an image that is being modified by another process
may encounter inconsistent state.

-- 
Eric Blake   address@hidden    +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]