[ovirt-users] Snapshot preview,clone and undo using ovirt api

Daniel Erez derez at redhat.com
Thu Aug 28 06:23:12 UTC 2014



----- Original Message -----
> From: "Doron Fediuck" <dfediuck at redhat.com>
> To: "Shanil S" <xielesshanil at gmail.com>
> Cc: users at ovirt.org
> Sent: Wednesday, August 27, 2014 5:45:04 PM
> Subject: Re: [ovirt-users] Snapshot preview,clone and undo using ovirt api
> 
> 
> 
> ----- Original Message -----
> > From: "Shanil S" <xielesshanil at gmail.com>
> > To: users at ovirt.org
> > Sent: Wednesday, August 27, 2014 2:07:15 PM
> > Subject: [ovirt-users] Snapshot preview,clone and undo using ovirt api
> > 
> > Hi All,
> > 
> > In the ovirt admin panel, it is possible to do the following snapshots
> > actions
> > 
> > 1. Clone
> > 2. Preview
> > 3. Undo
> > 
> > but i couldn't find out any direct api methods to do these actions, Is it
> > possible to it using the ovirt api ?

Hi Shanil,

Preview/Undo actions can be invoked from VM context.
I.e.:
/api/vms/{vm_id}/preview_snapshot
/api/vms/{vm_id}/undo_snapshot

These actions are supported only on versions > 3.4, 
in older versions, use 'restore' (which is 'preview + commit'):
/api/vms/{vm_id}/snapshots/{snapshot_id}/restore

To clone a VM from snapshot, POST to /api/vms :
<vm>
  ...
  <snapshots>
    <snapshot id={snapshot_id}/>
  </snapshots>
  ...
</vm>

> > 
> > 
> > --
> > Regards
> > Shanil
> > 
> 
> Hi Shanil,
> take a look here:
> http://www.ovirt.org/Features/Single_Disk_Snapshot#REST-API
> 
> Maybe Allon or other can add some info if needed.
> 
> Doron
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 



More information about the Users mailing list