
Le 16/12/2022 à 10:11, Arik Hadas a écrit :
On Fri, Dec 16, 2022 at 10:47 AM Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 15/12/2022 à 19:24, Arik Hadas a écrit :
On Thu, Dec 15, 2022 at 4:24 PM Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 15/12/2022 à 12:20, Arik Hadas a écrit :
On Wed, Dec 14, 2022 at 5:54 PM Nathanaël Blanchet <blanchet@abes.fr> wrote:
Le 14/12/2022 à 16:42, Arik Hadas a écrit :
On Wed, Dec 14, 2022 at 5:26 PM Nathanaël Blanchet via Users <users@ovirt.org> wrote:
Hello,
I am used to create new vm with ovirt_vm module.
Now, I want that the disk of each new created vm to be with the incremental statement.
I tried so:
disks: - id: "{{result.disk.id <http://result.disk.id>}}" bootable: True interface: virtio_scsi backup: incremental
but it seems that the backup item is not implemented.
How to attach a disk with the incremental statement?
Unlike bootable, disk interface and such settings that are per relation between a disk and a vm, the 'backup' (method) setting is a property of the disk itself. If the disk was created with incremental backup enabled, it would remain with incremental backup enabled when attached to a vm
The exact workflow is:
* The disk is created with incremental backup enabled * The disk is attached to a vm(incremental backup is ok at this step) * the vm is exported as a template * *The disk of the new vm created from the template doesn't have the incremental backup enabled!*
Sounds like the imported disk of the template is not set with incremental backup, what version of ovirt do you use?
4.5.3.2
As part of the fix for https://bugzilla.redhat.com/show_bug.cgi?id=2081556, which was merged to 4.5.1, we started writing the incremental-backup property to OVAs (I assume you refer to export-to-OVA since you wrote that you export a VM as a template)
I don't export vm as ova, I make a template from a vm or a snapshot.
- if you use an older version (than 4.5.1), this could explain it. Otherwise, please provide the output of:
select * from base_disks where disk_id in (select device_id from vm_device where vm_id in (select vm_guid from vm_static where vm_name='<template-name>'));
engine=# select * from base_disks where disk_id in (select device_id from vm_device where vm_id in (select vm_guid from vm_static where vm_name='alma8.x')); disk_id | wipe_after_delete | propagate_errors | disk_alias | disk_description | shareable | sgio | disk_storage_type | cinder_volume_type | disk_content_type | backup | backup_mode --------------------------------------+-------------------+------------------+------------+------------------+-----------+------+-------------------+--------------------+-------------------+ --------+------------- d55e6738-67d6-441f-a38f-86fc14f248cf | f | Off | Alma_8_8.7 | 8.7 | f | | 0 | | 0 | None |
(1 row)
You are right, making a template from a vm doesn't effectly enable the incremenat tal backup on the template disk, even if it is initially enabled on the vm disk. It seems to be a bug.
Yep, I filed an issue for this: https://github.com/oVirt/ovirt-engine/issues/779, and posted a fix
Thank you for the issue, now I there is a new one:
I was able to update the incremental backup on the template with API, but now if I create a vm from this template, the incremental backup of this new vm is not either enabled...
This takes me back to a different thread we had somewhere about this - the 'incremental backup' property is not like other properties that you can change by updating a template/vm/disk. You should rather call 'convert' [1]
[1] https://gerrit.ovirt.org/c/ovirt-engine-api-model/+/116966
So to sumup, if I want to create vms from template with incremental backup at final: * I create a vm with a qcow2 format but without incremental backup disk * I make a template from this vm (incremental backup is unuseful at this step) * I am able to create all my vms from this template still without incremental backup * I have to activate the incremental backup o in disk UI (awfull for a large number of vms) o with API (following https://www.ovirt.org/develop/incremental-backup-guide/incremental-backup-gu...) - name: Update disk incremental state ansible.builtin.uri: url: https://{{server}}.v100.abes.fr/ovirt-engine/api/vms/{{vm_id}}/diskattachments/{{item}} user: admin@internal password: "{{ovirt_password}}" method: PUT body: "{{body}}" validate_certs: no headers: Content-type: "application/xml" o vars: body: |- <disk_attachment> <disk> <backup>incremental</backup> </disk> </disk_attachment> o loop: "{{disk_id}}" loop_control: label: "{{item}}" The workflow is OK for me, but it is too bad that the latest step is not automatically done if the disk template has the two qcow2 format and <backup>incremental</backup> requirements.
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/VALEN65GD3DLDT...