Driver does not work with Proxmox VE version 7.3-3
NIYI100 opened this issue · 10 comments
The driver does not seem to work with Proxmox VE 7.3-3.
Steps to reproduce:
Run the docker-machine command with the following flags:
docker-machine --debug
create
--driver proxmoxve
--proxmoxve-proxmox-host proxmox16.example.com
--proxmoxve-proxmox-user-name root
--proxmoxve-proxmox-user-password StrongPassword123
--proxmoxve-proxmox-realm pam
--proxmoxve-proxmox-pool rancher
--proxmoxve-vm-storage-path rancher
--proxmoxve-vm-storage-size 4
--proxmoxve-vm-cpu-cores 4
--proxmoxve-vm-memory 2
--proxmoxve-ssh-username testuser
--proxmoxve-ssh-password testpassword
--proxmoxve-debug-resty
--proxmoxve-debug-driver
testDockerMachineDriver
The stdout is:
Docker Machine Version: 0.16.2, build bd45ab13
Found binary path at /home/sam/docker-machine-driver-proxmoxve
Launching plugin server for driver proxmoxve
Plugin server listening at address 127.0.0.1:33947
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /home/sam/docker-machine-driver-proxmoxve
Launching plugin server for driver proxmoxve
Plugin server listening at address 127.0.0.1:41877
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(test-proxmox-driver) Calling .GetMachineName
(test-proxmox-driver) Calling .DriverName
(test-proxmox-driver) Calling .GetCreateFlags
(test-proxmox-driver) Calling .SetConfigFromFlags
(test-proxmox-driver) {"time":"2023-05-17T10:28:40.553245879+02:00","level":"INFO","prefix":"-","file":"proxmoxdriver.go","line":"95","message":"enabling Resty debugging"}
Creating CA: /home/sam/.docker/machine/certs/ca.pem
Creating client certificate: /home/sam/.docker/machine/certs/cert.pem
Running pre-create checks...
(test-proxmox-driver) Calling .PreCreateCheck
(test-proxmox-driver) {"time":"2023-05-17T10:28:41.182114366+02:00","level":"INFO","prefix":"-","file":"proxmoxdriver.go","line":"89","message":"Create called"}
(test-proxmox-driver) {"time":"2023-05-17T10:28:41.182175964+02:00","level":"INFO","prefix":"-","file":"proxmoxdriver.go","line":"89","message":"Connecting to proxmox16.example as root@pam with password 'StrongPassword123'"}
(test-proxmox-driver) {"time":"2023-05-17T10:28:41.278200363+02:00","level":"INFO","prefix":"-","file":"proxmoxdriver.go","line":"89","message":"Connected to PVE version '7.3-3'"}
(test-proxmox-driver) RESTY 2023/05/17 10:28:41
(test-proxmox-driver) ---------------------- REQUEST LOG -----------------------
(test-proxmox-driver) GET /api2/json/nodes/proxmox16.example/storage HTTP/1.1
(test-proxmox-driver) HOST : proxmox16.example:8006
(test-proxmox-driver) HEADERS:
(test-proxmox-driver) Cookie: PVEAuthCookie=PVE:root@pam:64649039::-..........-
(test-proxmox-driver) Csrfpreventiontoken: 64649039:ID/........
(test-proxmox-driver) User-Agent: go-resty v1.7 - https://github.com/go-resty/resty
(test-proxmox-driver) BODY :
(test-proxmox-driver) ***** NO CONTENT *****
(test-proxmox-driver) ----------------------------------------------------------
(test-proxmox-driver) RESTY 2023/05/17 10:28:41
(test-proxmox-driver) ---------------------- RESPONSE LOG -----------------------
(test-proxmox-driver) STATUS : 596 tls_process_server_certificate: certificate verify failed
(test-proxmox-driver) RECEIVED AT : 2023-05-17T10:28:41.312148799+02:00
(test-proxmox-driver) RESPONSE TIME : 33.856571ms
(test-proxmox-driver) HEADERS:
(test-proxmox-driver) Cache-Control: max-age=0
(test-proxmox-driver) Date: Wed, 17 May 2023 08:28:41 GMT
(test-proxmox-driver) Expires: Wed, 17 May 2023 08:28:41 GMT
(test-proxmox-driver) Pragma: no-cache
(test-proxmox-driver) Server: pve-api-daemon/3.0
(test-proxmox-driver) BODY :
(test-proxmox-driver)
(test-proxmox-driver) ----------------------------------------------------------
Error with pre-create check: "unexpected end of JSON input"
notifying bugsnag: [Error with pre-create check: "unexpected end of JSON input"]
What worked for me:
The pve-node-name was incorrect and after changing it I was able to connect to the server
This seems to be the problem:
(test-proxmox-driver) STATUS : 596 tls_process_server_certificate: certificate verify failed
The certificate check should be ignored according to
Have you checked if something else is wrong with the certificate?
We use a "Lets Encrypt" Cert for the server.
We also tried to use the "Lets Encypt" cert instead of the default cert but --tls-ca-cert, etc. didnt seem to work
Do you use the FQDN for the connection?
I just checked with hostname --fqdn and it seems to be the FQDN
And i tried the ip as well as the FQDM as --proxmoxve-proxmox-host
I meant the FQDN of the letsencrypt certificate, so that a simple
curl https://<letsencrypt-fqdn>:8006/
yields no error?
No. It works as expected....
Maybe the same problem as in #13? Try to set your PVE node name to the correct name. This is currently not the case:
---------------------- REQUEST LOG ----------------------
(test-proxmox-driver) GET /api2/json/nodes/proxmox16.example/storage
node name is here proxmox16.example
, but should only be proxmox16
.
This was the problem. Thank you very much.
This was the problem. Thank you very much.
No problem!