Skip to content

Troubleshooting

Every cmdlet accepts -Debug. The module then prints what it sends and receives: method, URL, parameters, and the data, status code and reason of the response.

Get-PveNodesQemuConfig -Node pve01 -Vmid 100 -Debug

Compare the URL and the parameters with the endpoint in the cmdlet reference or the Proxmox VE API viewer: most problems are a parameter with the wrong name, type or value.

Passwords, second factors, tickets and tokens are shown as ****, so Connect-PveCluster -Debug does not print the password. Other values are printed as they are: check the output before you share it.

The script names a class of the module, but loaded it with Import-Module, which does not load classes. Start the script with using module Corsinvest.ProxmoxVE.Api: see Getting started.

Connect-PveCluster could not open port 8006 (or the port you gave) on any of the hosts within 2 seconds each. Check the name, the port, and firewalls between you and the nodes.

A response with StatusCode -1 and a ReasonPhrase like The SSL connection could not be established means the certificate of the node was refused, usually because it is self-signed. Install a trusted certificate on the nodes or connect with -SkipCertificateCheck: see Connection.

Many parameters of the generated cmdlets are [bool], not switches, because the API defines them as booleans that can be 0 or 1. They need a value:

Remove-PveNodesQemu -Node pve01 -Vmid 100 -Purge # fails: Missing an argument for parameter 'Purge'
Remove-PveNodesQemu -Node pve01 -Vmid 100 -Purge $true # works
Remove-PveNodesQemu -Node pve01 -Vmid 100 -Purge:$true # works

The type of every parameter is in the reference page of the cmdlet. More in Parameters.

A parameter cannot be found that matches parameter name 'Pid'

Section titled “A parameter cannot be found that matches parameter name 'Pid'”

A few API parameters have the name of a PowerShell automatic variable or common parameter: args, pid, verbose, debug. The generated cmdlets add _ to them: -Pid_, -Args_. See Parameters.

  • 401: the token or the ticket was refused. The token is wrong or revoked, or the ticket is older than two hours. Connect again.
  • 403: authenticated, but without the privilege the endpoint requires on that path. Check the roles of the user and, with privilege separation, of the token: see Permissions.

The generated cmdlets do not throw on these: check IsSuccessStatusCode. See Errors.

The request got no answer from the node: the name is not resolved, the connection is refused, the certificate is refused, or the node did not answer within the timeout (100 seconds unless Connect-PveCluster -TimeoutSec says otherwise). ReasonPhrase has the message of the failure. See Connection.

Couldn't authenticate user: the answer of ... has no ticket

Section titled “Couldn't authenticate user: the answer of ... has no ticket”

Something answered the login with a success status, but it is not Proxmox VE: usually a proxy or another service on that host and port. Check -HostsAndPorts.

Open an issue with:

  • the output of $PSVersionTable.PSVersion and (Get-Module Corsinvest.ProxmoxVE.Api).Version
  • the Proxmox VE version: (Get-PveVersion).Response.data.version
  • the command and the complete error, or the -Debug output, without tokens or passwords