MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / GetNodeVNCStatusWithClient

Method GetNodeVNCStatusWithClient

internal/vnc/service.go:201–214  ·  view source on GitHub ↗

GetNodeVNCStatusWithClient checks if VNC shell is available for a node using a specific client.

(client *api.Client, nodeName string)

Source from the content-addressed store, hash-verified

199
200// GetNodeVNCStatusWithClient checks if VNC shell is available for a node using a specific client.
201func (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.

Callers 2

GetNodeVNCStatusMethod · 0.95
openNodeVNCMethod · 0.80

Calls 2

DebugMethod · 0.65
IsUsingTokenAuthMethod · 0.65

Tested by

no test coverage detected