Import an exported VM using Ansible

Hello everybody! I'm trying to automate a copy of a VM from one Datacenter to another using an Ansible.playbook. I'm able to: - Create a snapshot of the source VM - create a clone from the snapshot - remove the snapshot - attach an Export Domain - export the clone to the Export Domain - remove the clone - detach the Export domain from the source Datacenter and attach to the destination. Unfortunately I cannot find a module to: - import the VM from the Export Domain - delete the VM image from the Export Domain. Any hint on how to do that? Thanks in advance. Cheers. Paolo PS: if someone is interested I can share the playbook.

On 15 Jan 2020, at 23:12, paolo@airaldi.it wrote: Hello everybody! I'm trying to automate a copy of a VM from one Datacenter to another using an Ansible.playbook. I'm able to: - Create a snapshot of the source VM - create a clone from the snapshot - remove the snapshot - attach an Export Domain - export the clone to the Export Domain - remove the clone - detach the Export domain from the source Datacenter and attach to the destination. Unfortunately I cannot find a module to: - import the VM from the Export Domain - delete the VM image from the Export Domain. Hi, those are legacy flows, on their way out. Use OVA export and import, it’s going to be much more straightforward. See import and export examples at https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples It is in ansible too Thanks, michal Any hint on how to do that? Thanks in advance. Cheers. Paolo PS: if someone is interested I can share the playbook. _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/QMFXXQFYYW6SJ4...

Thanks for your reply Michal. I saw the python examples and I spent a lot of time to figure out how to convert in an Ansible module, Please forgive my ignorance, but my developer knowledge is too low and I'm not able to do that. My questions are: - Is there a module to insert in an ansible playbook to do the import? - can you please provide some more detail on how to manage python with ansible? Any hint will be really appreciated. Thank you in advance! Paolo

Hello Had you fixed the missing feature that you needed? I would be pleased, if you could share the playbook with me. I'm trying to do someting similar, but I've got some problems to export vm to export domain I could use your code like guide Best regards
participants (4)
-
hserna74@gmail.com
-
Michal Skrivanek
-
Paolo Airaldi
-
paolo@airaldi.it