[pve-devel] [PATCH qemu-server 2/2] fix #4522: api: vncproxy: also set environment variable for ticket without websocket

Fiona Ebner f.ebner at proxmox.com
Mon Oct 16 15:12:26 CEST 2023


Since commit 2dc0eb61 ("qm: assume correct VNC setup in 'vncproxy',
disallow passwordless"), 'qm vncproxy' will just fail when the
LC_PVE_TICKET environment variable is not set. Since it is not only
required in combination with websocket, drop that conditional.

For the non-serial case, this was the last remaining effect of the
'websocket' parameter, so update the parameter description.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Qemu.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index a31ddb81..9877ce24 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2267,7 +2267,8 @@ __PACKAGE__->register_method({
 	    websocket => {
 		optional => 1,
 		type => 'boolean',
-		description => "Prepare for websocket upgrade.",
+		description => "Prepare for websocket upgrade (only required when using "
+		    ."serial terminal, otherwise upgrade is always possible).",
 	    },
 	    'generate-password' => {
 		optional => 1,
@@ -2365,7 +2366,7 @@ __PACKAGE__->register_method({
 
 	    } else {
 
-		$ENV{LC_PVE_TICKET} = $password if $websocket; # set ticket with "qm vncproxy"
+		$ENV{LC_PVE_TICKET} = $password; # set ticket with "qm vncproxy"
 
 		$cmd = [@$remcmd, "/usr/sbin/qm", 'vncproxy', $vmid];
 
-- 
2.39.2






More information about the pve-devel mailing list