
Hi, It's possible to change a thin-provision disk to a preallocated disk? Storages are ISCSI Thanks -- Jose Ferradeira http://www.logicworks.pt

On Thu, Nov 28, 2024 at 11:42 AM José Ferradeira via Users <users@ovirt.org> wrote:
Hi,
It's possible to change a thin-provision disk to a preallocated disk?
Storages are ISCSI
Thanks
there was an old thread about it at the time of 4.0/4.1. What it worked and I verified still works in 4.5 is: VM is powered on or off (with pros and cons for both scenarios in case of production machine) create a snapshot of the VM select the snapshot line under snapshots and select clone button in resource allocation section of the new vm screen change allocation policy for the desired disk/s from thin provision to preallocated Then you can decommission old VM and use the cloned one HIH, Gianluca

Thanks it worked on Version 4.5.6-1.el9, CentOS 9 De: "Gianluca Cecchi" <gianluca.cecchi@gmail.com> Para: "suporte" <suporte@logicworks.pt> Cc: "users" <users@ovirt.org> Itens enviados: Quinta-feira, 28 de Novembro de 2024 12:22:31 Assunto: Re: [ovirt-users] Changing Disk Alocation Policy On Thu, Nov 28, 2024 at 11:42 AM José Ferradeira via Users < [ mailto:users@ovirt.org | users@ovirt.org ] > wrote: Hi, It's possible to change a thin-provision disk to a preallocated disk? Storages are ISCSI Thanks there was an old thread about it at the time of 4.0/4.1. What it worked and I verified still works in 4.5 is: VM is powered on or off (with pros and cons for both scenarios in case of production machine) create a snapshot of the VM select the snapshot line under snapshots and select clone button in resource allocation section of the new vm screen change allocation policy for the desired disk/s from thin provision to preallocated Then you can decommission old VM and use the cloned one HIH, Gianluca

Hi José, Yes, it is possible via API. Let me search my notes for the call you need to run. Marcos From: José Ferradeira via Users <users@ovirt.org> Sent: Thursday, November 28, 2024 7:42 AM To: users <users@ovirt.org> Subject: [External] : [ovirt-users] Changing Disk Alocation Policy Hi, It's possible to change a thin-provision disk to a preallocated disk? Storages are ISCSI Thanks -- ________________________________ Jose Ferradeira http://www.logicworks.pt<https://urldefense.com/v3/__http:/www.logicworks.pt__;!!ACWV5N9M2RV99hQ!I-Ntt6JmH2v8kfscU3_f8CcF4aS8uVArEYg7DbTkQyvc0zUIIIxiw6-wYqgH28AijLpyGAVs7FYglTQgZw$>

Ps. Not sure why this didnt appear as a replym, but as a seperate thread. Apologies for that. Hey, Jose is right, you can do this via the api. The server needs to be shutdown. I usually use the below curl command on the engine itself (login with ssh). You need 3 pieces of information: - You need the ce.pem of the engine (which you can download from the engine login page) and make it available. In the command below I assume it is in the local directory. - You need an administrator user in engine, in the below example I used admin. Replace "yourpassword" behind the : with your own. - You need the disk-id as it is know in oVirt. You need to replace "yourdiskid", with your own. You can find the id in Engine. Select Storage, then Disks, then find the disk you want to convert and click on it. The number behind ID is the one you want and has the following format: db7b649f-76b6-4fd1-9b90-aa6becc2a283 The command: curl --cacert './ca.pem' --user 'admin@internal:yourpassword!' --request POST --header 'Version: 4' --header 'Content-Type: application/xml' --header 'Accept: application/xml' --data ' <action> <disk> <sparse>true</sparse> <format>cow</format> <backup_mode>incremental</backup_mode> </disk> </action> ' https://engine.blueit.dk/ovirt-engine/api/disks/yourdiskid/convert The command will return immediately. In engine you will see it is working on the disk image. You get the ballon messages in the right bottom corner and you can see it working in the taskview on the webinterface. Once it is done, you can start the VM again, and the disk is now thin provisioned and incremental backups are allowed. Good luck
participants (4)
-
change_jeeringly679@dralias.com
-
Gianluca Cecchi
-
Marcos Sungaila
-
suporte@logicworks.pt