GetNodeVNCStatusWithClient checks if VNC shell is available for a node using a specific client.
(client *api.Client, nodeName string)
| 199 | |
| 200 | // GetNodeVNCStatusWithClient checks if VNC shell is available for a node using a specific client. |
| 201 | func (s *Service) GetNodeVNCStatusWithClient(client *api.Client, nodeName string) (bool, string) { |
| 202 | s.logger.Debug("Checking VNC shell status for node: %s", nodeName) |
| 203 | |
| 204 | // Node VNC shells don't work with API token authentication |
| 205 | if client.IsUsingTokenAuth() { |
| 206 | s.logger.Debug("VNC shell not available for node %s: using API token authentication", nodeName) |
| 207 | |
| 208 | return false, "Node VNC shells are not supported with API token authentication.\n\nThis is a Proxmox limitation - node VNC shells require password authentication.\n\nTo use node VNC shells:\n1. Configure password authentication instead of API tokens\n2. Set PROXMOX_PASSWORD environment variable\n3. Remove PROXMOX_TOKEN_ID and PROXMOX_TOKEN_SECRET" |
| 209 | } |
| 210 | |
| 211 | s.logger.Debug("VNC shell available for node %s", nodeName) |
| 212 | // For nodes with password auth, VNC shell is available if the node is online |
| 213 | return true, "VNC shell available" |
| 214 | } |
| 215 | |
| 216 | // ConnectToVMEmbedded opens an embedded VNC connection to a VM using the built-in noVNC client |
| 217 | // This method supports multiple concurrent sessions - each VM gets its own session. |
no test coverage detected