Hi Everyone,
Can someone help me in how to use proxmox_kvm module ? I want to create VM's using this module but was unable to understant how to use it. I have gone through the ansible-doc but unable to create a correct playbook for that. If some can share me the working it will be a great help.
Having looked at the error message closely, it might actually be an issue with SSL and not the firewall. Do you use a self-signed Proxmox certificate? If so, then you may need to tell urllib3 to ignore "invalid" SSL certificates.
I had a similar issue when using a dynamic Proxmox inventory, it refused to work with a self-signed certificate. Adding an option to ignore an invalid SSL certificate solved it for me.
When you say that you are unable to create a playbook, how far did you get and what exactly does not work? If you explain the problem, then it's more likely that somebody will be able to help you. Also, there are examples available that show how to create new VMs with minimal options. Have you tried these, and if so, which part did not work?
Hi @Lisenet, thanks for replying.
I have tried by using the example provided in the ansible-doc, can you please guide me where I am doing wrong. Below is my play.
name: create new vm with minimal packages
proxmox_kvm:
api_user : root@pam
api_password: redhat
api_host : 192.168.0.11 #(ip of my local host)
name : test1
node : control-node #(local host)
And I am getting this error:
"msg": "authorization on proxmox cluster failed with exception: HTTPSConnectionPool(host='192.168.0.11', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0847f2f650>: Failed to establish a new connection: [Errno 111] Connection refused'
Is communication on a TCP port 8006 allowed between your ansible host and Proxmox? The error message says that the connection was refused. Check the firewall.
Yup I have added port 8006 in firewalld, but still it showing same error.
Having looked at the error message closely, it might actually be an issue with SSL and not the firewall. Do you use a self-signed Proxmox certificate? If so, then you may need to tell urllib3 to ignore "invalid" SSL certificates.
I had a similar issue when using a dynamic Proxmox inventory, it refused to work with a self-signed certificate. Adding an option to ignore an invalid SSL certificate solved it for me.
Hi @Lisenet, Thanks a lot for the solution. After ignoring "invalid" in urllib3 it worked.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.