[ovirt-users] Python: Clone snapshot into VM

Amador Pahim apahim at redhat.com
Wed Sep 16 13:11:06 UTC 2015


On 09/15/2015 11:57 AM, gregor wrote:
> Hi,
>
> I write currently a little backup tool in Python which use the following
> workflow:
> - create a snapshot -> works
> - clone snapshot into VM -> help needed

snapshot = 
params.Snapshot(id=api.vms.get('my_vm01').snapshots.list(description='my_vm_snap_01')[0].id)

snapshots = params.Snapshots(snapshot=[snapshot])

api.vms.add(params.VM(name='new_vm', memory=2524971008, 
cluster=api.clusters.get("Default"), snapshots=snapshots))

> - delete the snapshot -> works
> - export VM to NFS share -> works
> - delete cloned VM -> TODO
>
> Is it possible to clone a snapshot into a VM like from the web-interface?
>
> The above workflow is a little bit resource expensive but it will when
> it is finished make Online-Full-backups of VM's.
>
> cheers
> gregor
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users




More information about the Users mailing list