all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH-SERIES qemu-server 0/1] fix #7053: allow setting additional HA migration parameters
Date: Wed, 25 Feb 2026 15:35:04 +0100	[thread overview]
Message-ID: <20260225143514.368884-1-d.kral@proxmox.com> (raw)

Bugzilla #7053 reports that even though 'with-conntrack-state' is
checked, the VM will always migrate without conntrack state in the end.

In fact, any parameters from the migrate_vm API endpoint but the $vmid
and $node are not passed on to the HA stack at all. This was likely
caught now, because the conntrack state is the only optional parameter
visible in the web interface and set by default.



Currently, the resource motion crm command is matched from ^ to $:

    if ($cmd =~ m/^(migrate|relocate)\s+(\S+)\s+(\S+)$/) {

We could extend that crm command to something like:

    if ($cmd =~ m/^(migrate|relocate)\s+(\S+)\s+(\S+)(?:\s+(\S.*))?$/) {

but this would need the newer `ha-manager {migrate,relocate} ...`
API/CLI endpoint to append both the standard and extended version for
some period as older HA Manager versions wouldn't be able to parse the
extended version but only the standard versions. Newer HA Manager
versions would be fine though, as first the standard version would be
parsed and afterwards the extended version would overwrite the request
from the standard version.

The downside from this though is that the migration parameters are not
the same for VMs and CTs (and possible future resource types) and would
therefore expose quite a lot of resource-specific data structures to the
more generic HA Manager code.

Additionally, both the node with the active HA Manager as well as the
node's LRM where the to-be-moved HA resource is on need to have the
newer pve-ha-manager version to correctly relay the migration
parameters.



As the migrate_vm API request is proxied to the node where the HA
resource is assigned to, this RFC patch series puts the responsibility
to handle the additional migration parameters at the caller's side,
where these are saved while the request is relayed through the HA stack
until the LRM on the node calls migrate_vm again.

The implementation is not fully fleshed out (e.g. cleaning up the
migration params file on a crashed/stopped VM or rejected migration
requests, etc.), but I wanted to get more feedback whether this solution
has any merit and if not decide on another possible solution.

If it does have merit, this could be generalized for both qemu-server
and pve-container if it useful for containers as well.


qemu-server:

Daniel Kral (1):
  fix #7053: api: migrate: save and restore migration params for HA
    managed VMs

 src/PVE/API2/Qemu.pm | 54 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)


Summary over all repositories:
  1 files changed, 54 insertions(+), 0 deletions(-)

-- 
Generated by murpp 0.9.0




             reply	other threads:[~2026-02-25 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 14:35 Daniel Kral [this message]
2026-02-25 14:35 ` [RFC qemu-server 1/1] fix #7053: api: migrate: save and restore migration params for HA managed VMs Daniel Kral

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=20260225143514.368884-1-d.kral@proxmox.com \
    --to=d.kral@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