On February 27, 2020 5:32:15 PM GMT+02:00, Gianluca Cecchi <gianluca.cec...@gmail.com> wrote: >Hello, >sometimes I have environments (typically with Oracle RDBMS on virtual >machines) where there is one boot disk and one (often big, such as >500Gb or >more) data disk. >The data disk has already its application backup (typically RMAN) and I >want to complement it with a backup of only the boot disk of the >operating >system and VM configuration. >I'm almost done completing a script using oVirt Python SDK and sharing >for >comments. >I could be wrong, but I didn't find any ansible module to do this with >Ansible playbooks: I can only save all the VM, that in my case wouldn't >be >necessary and instead time and storage wasting. >The basic steps are: >- make a snapshot of the target vm, composed only by the boot disk >- clone the snapshot >- export the clone as OVA >- delete clone >- delete snapshot > >There are some things to discuss about, probably when I will share the >overall job (such as the name to give to the boot disk, if not using >the >bootable flag, the way to import the OVA in case of actual need, where >you >will have to comment out some fs entries related to missing disks, >ecc.). >The only thing missing is how to monitor the export to ova task that, >as >with Ansible, it completes almost immediately, while the export is >actually >altready running. >I need to monitor it, so only at its real end I can run the last 2 >steps of >the above list of tasks. > >Can you give me any hint? Not found very much in guide or docs on the >web. >I'm currently using a sleep because my boot disk is about 20Gb in size >and >I know that in less than 2 minutes it normally completes. > >The export as ova is very similar to what found in the examples and >they >don't contain a monitor for it but only the connection.close() call: > >cloned_vm_service.export_to_path_on_host( > host=types.Host(id=host.id), > directory = export_as_ova_dir, > filename = cloned_vm.name + '.ova' >) > >Thanks in advance, >Gianluca
Hi Gianluca, Did you check: https://github.com/silverorange/ovirt_ansible_backup Best Regards, Strahil Nikolov _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@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/647WHAVH3DHDQYEHZW7K55M3LVACJ72X/