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

Re: [Libguestfs] How to use libguestfs access LVM as non-root user?

On 06/01/2013 02:27 PM, Richard W.M. Jones wrote:
> On Sat, Jun 01, 2013 at 01:28:20PM +0800, Qiu Yu wrote:
>> For others who might interests, if you use qcow2 image with OpenStack and
>> choose LVM as image backend, nova libvirt driver will convert it raw when
>> creating a new instance.

IIUC, that's the reason, why it converts to raw --

"This uses 'qemu-img' to convert images that are not 'raw' to be 'raw'.
By doing so, it
 a.) refuses to run uploaded images that have a backing image reference
     (LP: #853330, CVE-2011-3147)
 b.) ensures that when FLAGS.use_cow_images is False, and the libvirt
     xml written specifies 'driver_type="raw"' that the disk referenced
     is also raw format. (LP: #837102)
 c.) removes compression that might be present to avoid cpu bottlenecks
     (LP: #837100)

It does have the negative side affect of using more space in the case where
the user uploaded a qcow2 (or other advanced image format) that could have
been used directly by the hypervisor.  That could, later, be remedied by
another 'qemu-img convert' being done to the "preferred" format of the

It also does it during nova-image-create. A small write-up on how/why --

 However, data injection using libguestfs will
>> still assuming the it is qcow2 format, hence hit the above issue. Not sure
>> it is a bug or not, probably one should specify "use_cow_images = False" to
>> avoid the problem in this case.
> Yes, this sounds like a Nova bug.
> Rich.


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