[ovirt-users] Unable to Delete a VM snapshot .
Kumar R, Prashanth (Prashanth)
pkumarr at avaya.com
Mon May 11 08:12:47 EDT 2015
Hi All,
I am facing issue in deleting a VM snapshot.
I am using ovirt-engine-sdk-java-3.5.0.5.jar
According to the SDK API,I can delete a VM using :
api.getVMs().get(vmName).getSnapshots().getById(snapshotId).delete();
But there is no way to fetch the snapshot ID of a particular snapshot.
Or
List<VMSnapshot> vmSnapshots = api.getVMs().get(vmName).getSnapshots().list();
for (VMSnapshot vmSnapshot : vmSnapshots) {
if(vmSnapshot.getDescription() == snapshotdescription){
vmSnapshot.delete();
}
I cannot use the above snippet of code to delete a snapshot,but the multiple snapshots for a vm can be created with the same description.
So is there a way to create a snapshot with a snapshot name assigned to it.
SO that delete,restore opeartions can be performed based on the snapshot name .
Thanks,
Prashanth R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20150511/13563491/attachment.html>
More information about the Users
mailing list