Hello guys,
I'm trying to use Proxmox API in order to manage my nodes cluster from another server.
I read the Proxmox VE wiki but I'm getting an issue with authentification part of Proxmox API.
I'm using proxmoxer and Python.
I wrote this :
#!/usr/bin/python3
from proxmoxer import ProxmoxAPI
def proxmox_authentification () :
proxmox = ProxmoxAPI('172.30.10.140', user='root@pam', password='xxxxx', verify_ssl=False)
return proxmox
for node in proxmox.nodes.get():
for vm in proxmox.nodes(node['node']).openvz.get():
print "{0}. {1} => {2}" .format(vm['vmid'], vm['name'], vm['status'])
But I got this issue :
Traceback (most recent call last):
File "extinction.py", line 5, in <module>
proxmox = ProxmoxAPI('172.30.10.140', user='root', password='xxxxx', verify_ssl=False)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/core.py", line 106, in __init__
self._backend = importlib.import_module('.backends.%s' % backend, 'proxmoxer').Backend(host, **kwargs)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/backends/https.py", line 116, in __init__
self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/backends/https.py", line 46, in __init__
raise AuthenticationError("Couldn't authenticate user: {0} to {1}".format(username, base_url + "/access/ticket"))
proxmoxer.backends.https.AuthenticationError: Couldn't authenticate user: root to https://172.30.10.140:8006/api2/json/access/ticket
Did I miss something ? Thank you so much !
I'm trying to use Proxmox API in order to manage my nodes cluster from another server.
I read the Proxmox VE wiki but I'm getting an issue with authentification part of Proxmox API.
I'm using proxmoxer and Python.
I wrote this :
#!/usr/bin/python3
from proxmoxer import ProxmoxAPI
def proxmox_authentification () :
proxmox = ProxmoxAPI('172.30.10.140', user='root@pam', password='xxxxx', verify_ssl=False)
return proxmox
for node in proxmox.nodes.get():
for vm in proxmox.nodes(node['node']).openvz.get():
print "{0}. {1} => {2}" .format(vm['vmid'], vm['name'], vm['status'])
But I got this issue :
Traceback (most recent call last):
File "extinction.py", line 5, in <module>
proxmox = ProxmoxAPI('172.30.10.140', user='root', password='xxxxx', verify_ssl=False)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/core.py", line 106, in __init__
self._backend = importlib.import_module('.backends.%s' % backend, 'proxmoxer').Backend(host, **kwargs)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/backends/https.py", line 116, in __init__
self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
File "/Users/valentinjungbluth/Desktop/DatasystemsCORE3.6/lib/python3.6/site-packages/proxmoxer/backends/https.py", line 46, in __init__
raise AuthenticationError("Couldn't authenticate user: {0} to {1}".format(username, base_url + "/access/ticket"))
proxmoxer.backends.https.AuthenticationError: Couldn't authenticate user: root to https://172.30.10.140:8006/api2/json/access/ticket
Did I miss something ? Thank you so much !