From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 8B8FC1FF17E for ; Thu, 8 Jan 2026 11:10:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 65D7E1FA77; Thu, 8 Jan 2026 11:11:33 +0100 (CET) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Thu, 8 Jan 2026 11:10:09 +0100 Message-ID: <20260108101103.82029-2-m.frank@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260108101103.82029-1-m.frank@proxmox.com> References: <20260108101103.82029-1-m.frank@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1767867051876 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.001 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v2 1/3] vga: allow live-migration with clipboard X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The live-migration feature now works with QEMU 10.1: 5d56bff11e ("ui/vdagent: add migration support") Signed-off-by: Markus Frank --- v2: * add machine version check to ensure QEMU version is at least 10.1. src/PVE/API2/Qemu.pm | 4 +++- src/PVE/QemuMigrate.pm | 6 +++++- src/PVE/QemuServer.pm | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index 190878de..3ab0afcf 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -5300,7 +5300,9 @@ __PACKAGE__->register_method({ my $vga = PVE::QemuServer::parse_vga($vmconf->{vga}); if ($res->{running} && $vga->{'clipboard'} && $vga->{'clipboard'} eq 'vnc') { - push $local_resources->@*, "clipboard=vnc"; + my $machine_version = PVE::QemuServer::Machine::get_current_qemu_machine($vmid); + push $local_resources->@*, "clipboard=vnc" + if !PVE::QemuServer::Machine::is_machine_version_at_least($machine_version, 10, 1); } $res->{allowed_nodes} = []; diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm index b3ddc34e..829288ff 100644 --- a/src/PVE/QemuMigrate.pm +++ b/src/PVE/QemuMigrate.pm @@ -301,7 +301,11 @@ sub prepare { my $vga = PVE::QemuServer::parse_vga($conf->{vga}); if ($running && $vga->{'clipboard'} && $vga->{'clipboard'} eq 'vnc') { - die "VMs with 'clipboard' set to 'vnc' are not live migratable!\n"; + my $machine_version = PVE::QemuServer::Machine::get_current_qemu_machine($vmid); + if (!PVE::QemuServer::Machine::is_machine_version_at_least($machine_version, 10, 1)) { + die "VMs with 'clipboard' set to 'vnc' are not live migratable with" + . " QEMU/machine versions older than 10.1!\n"; + } } my $vollist = PVE::QemuServer::get_vm_volumes($conf); diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 69991843..ecf64fea 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -177,8 +177,8 @@ my $vga_fmt = { }, clipboard => { description => - 'Enable a specific clipboard. If not set, depending on the display type the' - . ' SPICE one will be added. Migration with VNC clipboard is not yet supported!', + 'Enable a specific clipboard. If not set, depending on the display type the SPICE one' + . ' will be added. Live migration is not possible with QEMU version < 10.1.', type => 'string', enum => ['vnc'], optional => 1, -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel