[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] Delete a snapshot
Hi Vijay, A snapshot of VM is just a VM that can't be started, only cloned. This means that you can perform (most) VM operations on a VM snapshot. You can use the API to get the list of a particular VM's snapshots, and then check the snapshot_time field to see which one is the oldest. After that, it's just a simple VM.destroy call. Please refer to the API reference, particularly the VM class documentation: http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/index.html?c=VM Hope this helps, Mike On 25/06/12 23:21, Vijay Ramadoss wrote: > I don’t want to do periodic snapshots. I want to take snapshots on > demand and when I do that I need to get rid of my oldest snapshot. VMPP > doesn’t provide me an option for doing that. > > > > Also last_shutdown_time field doesn’t give me details about snapshot > ,does it? Also is there a method for deleting the snapshot? Destroy > method in VM class destroys a VM but not a snapshot I believe. > > > > *Regards,* > > *Vijay R* > > > > *From:*R J [mailto:torushikeshj@xxxxxxxxx] > *Sent:* Monday, June 25, 2012 8:39 AM > *To:* Vijay Ramadoss > *Cc:* xen-api@xxxxxxxxxxxxx > *Subject:* Re: [Xen-API] Delete a snapshot > > > > Hi Vijay, > > You could look at vmpp ( VM Protection Policy ) to take periodic > snapshots and delete the oldest one. > > Another safe way would be to create a Parent-Child relation amongst the > VM-Snapshot and compare the dates / timestamps. > Have you checked the "other-config (MRW): last_shutdown_time " ? > > - RJ > > On Mon, Jun 25, 2012 at 9:45 AM, Vijay Ramadoss <vramadoss@xxxxxxxxxx > <mailto:vramadoss@xxxxxxxxxx>> wrote: > > Hi – I am trying to figure out a way to delete a snapshot from a VM and > could not find the right API to do that. I basically want to delete the > most oldest snapshot of a VM. How do I do that? > I found the timetamp field of the VM class, but that is returning > invalid timestamp for a timestamp for me for some reason. Any idea how > to figure out the oldest snapshot and delete it? > > > > Any help would be appreciated. > > > > *Regards,* > > *Vijay R* > > > > ------------------------------------------------------------------------ > > This email message is for the sole use of the intended recipient(s) and > may contain confidential information. Any unauthorized review, use, > disclosure or distribution is prohibited. If you are not the intended > recipient, please contact the sender by reply email and destroy all > copies of the original message. > > ------------------------------------------------------------------------ > > > _______________________________________________ > Xen-api mailing list > Xen-api@xxxxxxxxxxxxx <mailto:Xen-api@xxxxxxxxxxxxx> > http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api > > > _______________________________________________ Xen-api mailing list Xen-api@xxxxxxxxxxxxx http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |