On Wed, Oct 4, 2023 at 12:09 AM Nir Soffer <nsof...@redhat.com> wrote:

> On Tue, Sep 26, 2023 at 9:07 PM anton.alymov--- via Users <users@ovirt.org>
> wrote:
>
>> Hi! I use ovirt rest api to start vm, backup vm and then remove vm.
>> I start vm, wait for vmstatus up, then  start backup, wait for starting,
>> finalize, wait for succeeded, wait for disk unlock. Looks like backup is
>> finished here from my side.Because ovirt repost succeed status and unlocks
>> disk. But if i try shutdown and remove vm ovirt will throw error  Cannot
>> remove VM. The VM is performing an operation on a Snapshot. Please wait for
>> the operation to finish, and try again.
>> Ok, ovirt is right here, I see from web interface that operation hasn't
>> finished yet. How can I obtain correct status where vm can be removed? I
>> also tried to get info about vm snapshots but all of them had Status: ok
>>
>
Nir wrote some good advice below, but specifically about "I also tried to
get info about vm snapshots but all of them had Status: ok", something is
fishy because the error you get is produced when there's a snapshot with
status LOCKED [1]. It might be that you queried the snapshots after the
remove-snapshot operation was completed

[1]
https://github.com/oVirt/ovirt-engine/blob/504baab74e6b846a0cd1a593cd34f3665dbbedb7/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsValidator.java#L42


>
> This sounds similar to ovirt stress delete-snapshot and backup tests.
>
> Please check here how to use the ovirt python sdk to create/delete/backup
> and wait for events:
> https://github.com/ovirt/ovirt-stress
>
> Nir
>
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@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/FY434LJRD4O724QEWK7KH73KYUFWCEEG/

Reply via email to