[ovirt-users] API auto delete vms snapshot

Fred Rolland frolland at redhat.com
Sun Sep 17 07:22:40 UTC 2017


Lionel hi,

You should wait until the operation is done. Take a look at this example
[1].

Regards,
Fred

[1]
https://github.com/oVirt/ovirt-engine-sdk/blob/e4ef67041a639cddbae82b172572ac5c45217341/sdk/examples/vm_backup.py#L163

On Fri, Sep 15, 2017 at 5:28 PM, Lionel Caignec <caignec at cines.fr> wrote:

> Hi,
>
> i'm playing with ovirt sdk, to automatically manage snapshots.
> My script is for now very basic
> step 1) list all vm of cluster
> step 2) for each vm create a snapshot if needed
> step 3) for each vm delete oldest snapshot
> No problem for step 1 and 2.
>
> But step 3 is harder.
> If i launch snap remove with command "snapshots_service.snapshot_service(
> snap.id).remove()", python tell me snapshot operation already in progress
> (creation of snapshot in step2).
>
> If i launch snap remove with parameter "async=true" the snapshot to delete
> is locked by ovirt, but never deleted.
>
> So how can i do? Also there is some way to monitor running task about
> snapshot (ovirt-shell ...)?
>
> --
> Lionel
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170917/a88af10a/attachment.html>


More information about the Users mailing list