[libvirt-users] Cloning a volume via storage XML

2019-04-29 Thread Weller, Lennart
Hello everyone,

After the Bug with libvirt was found and fixed by Michal I am now
looking for a way to actually do the task I intended to do. I cannot
find any information if it is possible to clone a base-volume a la vol-
clone for ceph rbd.

As I posted in my addendum to the first post here I thought something
like this volume xml would do the job:


   coreos00.disk
   9116319744
   
   
   
   644
   
   
   
   vmdisks/coreos_2023
   
   


But even with the fix applied this simply creates an empty volume of
the given size. Granted this has no information about the snapshot so I
was sceptical that this would be enough in the first place.

If the vol-clone is not an option right now via volume xml it's not
that wild as I could just patch the terraform-libvirt-provider to do
the task beforehand but I wanted to know if it there exists an option
for libvirt to do it automatically when provided with an xml. I can't
find any options in the storage xml documentation so my guess would be
no.

Kind regards,
Lennart Weller

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] Libvirt pool cannot see or create rbd clones

2019-04-26 Thread Weller, Lennart
Some additional information that I have found since yesterday:

When I create a volume like this:


   coreos00.disk
   9116319744
   
   
   
   644
   
   
   
   vmdisks/coreos_2023
   
   


Which does not seem to work with the backing store either as it creates
an empty volume without the underlying parent. But when I now delete
the volume via rbd and create a new clone it shows up in libvirt and
can be used by the machine.

# rbd -p vmdisks rm coreos00.disk
# rbd clone vmdisks/coreos_2023@basis vmdisks/coreos00.disk

Sadly this is not a very efficient way to create the clones I would
say.

Anyone got any, like literally any, ideas what might be wrong in this
setup?

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


[libvirt-users] Libvirt pool cannot see or create rbd clones

2019-04-26 Thread Weller, Lennart
Hello everyone,

To increase my odds of finding an answer I also wanted to ask here.
This is my post from serverfault[1] in verbatim:

While trying to get a cloned disk running from my OS snapshot I run
into the problem that Libvirt cannot see existing images cloned from a
snapshot. Created via:

# rbd -p vmdisks clone vmdisks/coreos_2023@base vmdisks/coreos00.disk

The base image has the one snapshot 'base' and is protected. The cloned
disk is created just fine:

# rbd -p vmdisks info coreos00.disk
rbd image 'coreos00.disk':
size 8.49GiB in 2174 objects
order 22 (4MiB objects)
block_name_prefix: rbd_data.48a99c6b8b4567
format: 2
features: layering
flags: 
create_timestamp: Thu Apr 25 14:46:52 2019
parent: vmdisks/coreos_2023@base
overlap: 8.49GiB

I temporarily have Libvirt configured with a rbd pool that uses the
ceph admin user. But I cannot see the cloned disk. Just the parent:

virsh # vol-list --pool rbd_image_root
 Name Path
-
-
 coreos_2023 vmdisks/coreos_2023 

If I try to create the cloned image from within virsh I run into the
following issue:

virsh # vol-clone --pool rbd_image_root coreos_2023 coreos00.disk
error: Failed to clone vol from coreos_2023
error: failed to iterate RBD snapshot coreos_2023@base: Operation not
permitted

Note that this pool uses the Ceph admin user which makes the Operation
not permitted a tad odd.

Am I missing a configuration option here that would allow for the pool
to use clones? I can't find any information on this in the
documentation so far. And the source code of libvirt looks like it
should support both features.

Versions:

Libvirt Machine: Ubuntu 18.04
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Using API: QEMU 4.0.0
Running hypervisor: QEMU 2.11.1

Ceph Machine: openSUSE Leap 42.3
Ceph 12.2.5


[1] 
https://serverfault.com/questions/964586/libvirt-pool-cannot-see-or-create-rbd-clones

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users