all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Markus Frank <m.frank@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server v2 1/3] vga: allow live-migration with clipboard
Date: Thu, 8 Jan 2026 16:20:40 +0100	[thread overview]
Message-ID: <ddf6dd16-8c9e-4221-8ccf-bce6d862273c@proxmox.com> (raw)
In-Reply-To: <20260108101103.82029-2-m.frank@proxmox.com>

2 high level notes (but not blocker):

* would it maybe make sense to pull the 'get_current_qemu_machine' out
   so other parts of the api/code can reuse that?
   i guess we'll maybe have more of such checks in the future, and having
   the version already available at e.g. the top level of the api call
   could make sense. This can ofc also be done when we actually need it

* afaics the checks in QemuMigrate and the api are identical, would
   it make sense to factor them out, so they don't accidentally
   diverge? (Are there maybe even more places where we check this?)

Aside from these (minor) changes consider this:

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>

On 1/8/26 11:11 AM, Markus Frank wrote:
> The live-migration feature now works with QEMU 10.1:
> 5d56bff11e ("ui/vdagent: add migration support")
> 
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
> ---
> 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,



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2026-01-08 15:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 10:10 [pve-devel] [PATCH qemu-server/manager/docs v2 0/3] live-migration with VNC clipboard Markus Frank
2026-01-08 10:10 ` [pve-devel] [PATCH qemu-server v2 1/3] vga: allow live-migration with clipboard Markus Frank
2026-01-08 15:20   ` Dominik Csapak [this message]
2026-01-09 13:19     ` Fiona Ebner
2026-01-09 13:17   ` [pve-devel] applied: " Fiona Ebner
2026-01-08 10:10 ` [pve-devel] [PATCH pve-manager v2 2/3] ui: display: update 'live-migration with VNC-clipboard not working' note Markus Frank
2026-01-08 15:24   ` Dominik Csapak
2026-01-09 13:26   ` [pve-devel] applied: " Fiona Ebner
2026-01-08 10:10 ` [pve-devel] [PATCH docs v2 3/3] vnc-clipboard: change 'live-migration " Markus Frank
2026-01-08 15:31   ` Dominik Csapak
2026-01-09 13:34   ` [pve-devel] applied: " Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ddf6dd16-8c9e-4221-8ccf-bce6d862273c@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=m.frank@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal