I now we cannot use thin LVM volumes with libvirt. Is there any other alternative allowing use of LVM thin provisioning in KVM/QEMU virtual machines?
Asked
Active
Viewed 3,201 times
1 Answers
0
libvirt
does not directly support using thin volumes as storage pool: when selecting the volume group where creating each logical volumes (disk images), the thin pool is not shown on the list.
To use thin volumes with libvirt
, you have two possibility:
- manually create the required thin volume, attaching it to the virtual machine;
- otherwise, you can create a single big thin volume, formatting it with XFS, mounting it and using libvirt to create a directory-based storage pool (creating VM disk images as plain file on the XFS filesystem).

shodanshok
- 47,711
- 7
- 111
- 180
-
"attaching it to the virtual machine". Do you mean during create the VM with virt-install? Thank you for your answer. – user878965 Feb 26 '20 at 19:45
-
I mean by directly specifing the required thin volume in the xml file (or using a GUI as `virt-manager` to edit it) – shodanshok Feb 26 '20 at 19:47
-
When I edit xml and try to run the VM via Cockpit, I get an error. For virt-manager, I can't even see the volume. – user878965 Feb 26 '20 at 19:59
-
In `virt-manager` you should be able to select "browse local" and to manually select the right logical volume. Otherwise, you have to edit the domain xml file. – shodanshok Feb 26 '20 at 20:44
-
I can't see any "browse local" option. All I can do is choose "Select or create custom storage" then select the pool. In the LVM pool only fat LVM volumes are listed. – user878965 Feb 26 '20 at 20:53
-
You should have a "Browse local" button as per this [image](https://www.berrange.com/wp-content/uploads/2010/05/14-virt-manager-choose-lun.png) – shodanshok Feb 26 '20 at 22:17
-
I finally found it. In fact, I have a recent version of virt-manager installed on remote computer, and "browse local" is not in the same place as on the screenshot. The button is disabled because I am on a remote computer and I believe it will be enabled if I use virt-manager locally on the server side. @shodanshok: Thank you very much for you help. – user878965 Feb 27 '20 at 02:12