Hi sorry,good moorning
[root@ovirtengine2 ovirt_ansible_backup]# ansible-playbook backup_ovirt_vms.yml[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] ****************************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************ok: [localhost]
TASK [Authenticate] *************************************************************************************************************************************************************************ok: [localhost]
TASK [Backup VMs] ***************************************************************************************************************************************************************************included: /root/ovirt_ansible_backup/export_vm.yml for localhost
TASK [Ensure state of backup in_progress directory] *****************************************************************************************************************************************ok: [localhost]
TASK [Ensure state of backup completed directory] *******************************************************************************************************************************************ok: [localhost]
TASK [Export VM to OVA] *********************************************************************************************************************************************************************An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Error: Failed to read response: [(<pycurl.Curl object at 0x7fd5bbf1bbc0>, 6, 'Could not resolve host: ovirtengine2.5g********.local; Unknown error')]fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to read response: [(<pycurl.Curl object at 0x7fd5bbf1bbc0>, 6, 'Could not resolve host: ovirtengine2.5g********.local; Unknown error')]"}
PLAY RECAP **********************************************************************************************************************************************************************************localhost : ok=5 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0Best Regards,
Nazan.
From: Jayme <jaymef@gmail.com>
Sent: Tuesday, February 18, 2020 1:23:39 AMCan you share the ansible output?
On Mon, Feb 17, 2020 at 5:02 PM Nazan CENGİZ <nazancengiz@havelsan.com.tr> wrote:
Hi sir,
thanks for reply.
I am running script on ovirt engine then I create NFS directory.
I create ca.crt on command;
curl --insecure "https://ovirtengine2.5ghvl.local/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA" -o ca.crt
[root@ovirtengine2 ovirt-engine]# cat ca.pem-----BEGIN CERTIFICATE-----MIIDzzCCAregAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCVVMxFDASBgNVBAoMCzVnaHZsLmxvY2FsMScwJQYDVQQDDB5vdmlydGV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hbDEnMCUGA1UEAwweb3ZpcnRlbmdpbmUyLjVnaHZsLmxvY2FsLjc1MzYyggIQADAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAQEAFsK8y7QFKaEj6KwgHCo03pWfyrGu7oRogXMSHZXQweWJA5dbdgNyHJ00lpz20QnBC04v+p8wt0rx9Od0yD4yM+2E8Q8aNg9c7+ilcTUrN1aYsn61mju9peD5Jjkw60w8YNJKc+L1/emfDE8baLCw10BwnL+aFyTS9U8P0rjamqyFyP2ci7cQgCz3QjXE0KzXkPUd1v3z8JCXa8tBwznFvS3icL0Wy0SfHOz+1ECrQmjpUOm4/ej7TVgAX7GU4fCQAJXQd0s6Z4Qn3o/IgVm4AqFLzAAISCbQEIiZV+cx+YRFeLVzCtp0cg5mkGsaWd+x604MrDa9skXqUY16oLe6yQ==-----END CERTIFICATE-----
ca.crt and ca.pem both file.I am using ca.crt.
I only one have cluster name is Default;
My backup vm Bacchus
Config file;
[root@ovirtengine2 ovirt_ansible_backup]# cat backup_ovirt_vms.yml---- hosts: localhostconnection: local
vars:host: ovirtbackup.5ghvl.localcluster: Defaultin_progress_path: "/mnt/backup/in_progress/"completed_path: "/mnt/backup/completed/"file_ext: ovaretain_days: 10vms:- Bacchus
tasks:- name: "Authenticate"ovirt_auth:username: admin@internalca_file: /etc/pki/ovirt-engine/ca.crtpassword: "hvl"
- name: "Backup VMs"include_tasks: export_vm.ymlloop: "{{ vms }}"
- name: "Clean Backups"include_tasks: cleanup.ymlloop: "{{ vms }}"
- name: "Remove SSO token"ovirt_auth:state: absentovirt_auth: "{{ ovirt_auth }}"tags: always
But it is failed;
Nfs mounting;
From: Jayme <jaymef@gmail.com>
Sent: Monday, February 17, 2020 9:25:44 PM
To: Nazan CENGİZ
Cc: users@ovirt.org
Subject: Re: [ovirt-users] backupHello,
I have not used this script myself so I don't have a resolution for you, however I recently wrote an article regarding a simple method to backup oVirt VMs using ansible without the need of any complicated software or proxy VMs involved. Here is the link to the article if it's helpful to you: https://blog.silverorange.com/backing-up-ovirt-vms-with-ansible-4c2fca8b3b43
On Mon, Feb 17, 2020 at 2:11 PM Nazan CENGİZ <nazancengiz@havelsan.com.tr> wrote:
_______________________________________________Hi all,
I am trying https://github.com/vacosta94/VirtBKP.
ovirt version:4.3.5
my config file;
[bkp]user = admin@internalpassword = yyyca_file = /opt/VirtBKP/ca.crtbkpvm = VirtBKMbckdir = /mnt/backup
[restore]url = https:/xxx/ovirt-engine/apiuser = admin@internalpassword = yyyca_file = ca.crtstorage = hosted_storage(storage domain name for new vm???)proxy = xxx(engine FQDN)proxyport = 54323
Fail on below;
[root@virtbkp VirtBKP]# /opt/VirtBKP/backup_vm.py default.conf Bacchus[OK] Connection to oVIrt API success https://ovirtengine2.5ghvl.local/ovirt-engi ne/api[INFO] Trying to create snapshot of VM: 8a95f435-94dd-4a69-aed0-46395bcbd082[INFO] Waiting until snapshot creation ends[INFO] Waiting until snapshot creation ends[OK] Snapshot created[INFO] Trying to create a qcow2 file of disk aa564596-fd33-4734-8050-0f82130a677b[INFO] Attach snap disk to bkpvmTraceback (most recent call last):File "/opt/VirtBKP/backup_vm.py", line 6, in <module>b.main()File "/opt/VirtBKP/backup_vm_last.py", line 242, in mainself.backup(self.vmid,self.snapid,disk_id,self.bkpvm)File "/opt/VirtBKP/backup_vm_last.py", line 210, in backupself.attach_disk(bkpvm,disk_id,snapid)File "/opt/VirtBKP/backup_vm_last.py", line 123, in attach_diskresp_attach = requests.post(urlattach, data=xmlattach, headers=headers, verify=False, auth=(self.user,self.password))File "/usr/lib/python2.7/site-packages/requests/api.py", line 112, in postreturn request('post', url, data=data, json=json, **kwargs)File "/usr/lib/python2.7/site-packages/requests/api.py", line 58, in requestreturn session.request(method=method, url=url, **kwargs)File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 498, in requestprep = self.prepare_request(req)File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 441, in prepare_requesthooks=merge_hooks(request.hooks, self.hooks),File "/usr/lib/python2.7/site-packages/requests/models.py", line 309, in prepareself.prepare_url(url, params)File "/usr/lib/python2.7/site-packages/requests/models.py", line 377, in prepare_urlraise InvalidURL(*e.args)requests.exceptions.InvalidURL: Failed to parse: https://ovirtengine2.5ghvl.local/ovirt-engine/api/v3/vms/13d45c7f-7812-4f01-9bd8-a3e8ff91c15b/disks/
Nazan CENGİZ
AR-GE MÜHENDİSİMustafa Kemal Mahallesi 2120 Cad. No:39 06510 Çankaya Ankara TÜRKİYE
+90 312 219 57 87 +90 312 219 57 97 YASAL UYARI: Bu elektronik posta işbu linki kullanarak ulaşabileceğiniz Koşul ve Şartlar dokümanına tabidir. LEGAL NOTICE: This e-mail is subject to the Terms and Conditions document which can be accessed with this link.
Lütfen gerekmedikçe bu sayfa ve eklerini yazdırmayınız / Please consider the environment before printing this email
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/NDLWEVOS6MEASC5KUDSMYZIKCH7NHVNB/