LVM thin provisioning and virt-manager
Chris Murphy
lists at colorremedies.com
Tue Oct 15 22:04:28 UTC 2013
On Oct 15, 2013, at 3:46 PM, Richard W.M. Jones <rjones at redhat.com> wrote:
> On Tue, Oct 15, 2013 at 03:29:38PM -0600, Chris Murphy wrote:
>> The better snapshots sound ideal for VM testing. Snapshot a
>> successful install and then try to break the snapshot. Etc.
>>
>> Presently virt-manager ignores thinp pools and only creates
>> conventional LV's. I haven't tried using virsh to force it to use an
>> already created virtualsize LV as backing, but I'm wondering if it
>> should work. If not, is there a rough time frame on such support?
>
> Is using LVs for this over-thinking things?
Could be.
> Creating a snapshot of a regular file which efficiently shares the
> backing disk is easy, and doesn't require root or special support:
>
> qemu-img create -f qcow2 -b original snapshot.qcow2
Yes but unallocated qcow2 is slower than either kind of LV. And it's noticeable when doing something like guest using XFS in a qcow2 file on btrfs host, or guest using btrfs in a qcow2 file on btrfs host. It's double the file system activity. On an LV there's pretty close to no hit.
I'm happy to hear it argued I should instead use the LV space for a regular partition formatted ext2 and drop the qcow2 file there. There's still overhead of two file systems there, but may compare to LV performance.
>
> Then you can import this as a new guest in libvirt, again *without*
> needing root:
>
> virt-install --import --name snapshot \
> --ram 1024 --disk path=snapshot.qcow2,format=qcow2
>
> And in Fedora 20 we'll have virt-builder, which makes creating the
> original images quick too. (Not to mention virt-sysprep and all the
> other tools to manipulate disk images easily, without root)
Hmm good to know.
Chris Murphy
More information about the devel
mailing list