From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 98A0E1FF066 for ; Tue, 24 Nov 2026 17:35:04 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 37FF0218C7; Tue, 24 Nov 2026 17:33:15 +0100 (CET) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH docs v2 20/20] qm: document hv-reenlightenment, invtsc and CPU checks for migration Date: Tue, 24 Nov 2026 17:30:44 +0100 Message-ID: <20261124163136.320992-21-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261124163136.320992-1-j.theisen@proxmox.com> References: <20261124163136.320992-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795537949168 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.072 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: AWF3VE7ZSKQIW5O4FATSN2K2YTJFH4KA X-Message-ID-Hash: AWF3VE7ZSKQIW5O4FATSN2K2YTJFH4KA X-MailFrom: j.theisen@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Explain what the new 'hv-reenlightenment' CPU flag is for, and that custom CPU types with 'invtsc' can now be live migrated. Both restrict the nodes a VM can be live migrated to, as the target's TSC frequency must be compatible. Also document that live migrations known not to work because of the target node's CPU are now refused, for all CPU types, how root can override the check of the CPU flags for VMs with the 'host' or 'max' CPU type, the warnings about live migrations between different CPU vendors and models, and how the checks apply to HA-managed VMs. Signed-off-by: Jonas Theisen --- qm.adoc | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/qm.adoc b/qm.adoc index cfa8587..fd37e02 100644 --- a/qm.adoc +++ b/qm.adoc @@ -571,6 +571,16 @@ listings, `Mapping.Modify` gates create/update/delete in the panel, and enforced on VM create, VM update, and VM clone, so a user who can clone a VM that uses a custom model still needs `Mapping.Use` on that model's ACL path. +Custom CPU types can enable the invariant TSC flag `invtsc`, which guests need +to rely on the TSC as clock source, for example for applications reading it +directly or for nested hypervisors. The host CPU must have an invariant TSC as +well. For CPU types based on `host`, QEMU otherwise starts the VM without the +flag and only logs a warning. {pve} sets the TSC frequency of such VMs to the +frequency of the host they are started on, as QEMU requires it for live +migration, snapshots including RAM, and hibernation. Such a VM can only be live +migrated to nodes that support `invtsc`, and either support TSC scaling or +have a TSC frequency within 250 ppm of the VM's. + [[qm_meltdown_spectre]] Meltdown / Spectre related CPU flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -699,6 +709,13 @@ guests on recent Intel hardware: only applies for x86_64 vCPUs; it is silently ignored on other architectures. +* The `hv-reenlightenment` flag allows nested Hyper-V guests, for example + Windows with WSL2 or virtualization-based security enabled, to keep a stable + clock source across live migrations. {pve} then sets the TSC frequency of + the VM to the frequency of the host it is started on. Such a VM can only be + live migrated to nodes that support TSC scaling, or whose TSC frequency is + within 250 ppm of the VM's. + NUMA ^^^^ @@ -1867,6 +1884,40 @@ For Live Migration to work, there are some things required: vendor *might* work depending on the actual models and VMs CPU type configured, but it cannot be guaranteed - so please test before deploying such a setup in production. ++ +{pve} refuses live migrations that are known not to work: ++ +-- +** VMs with the CPU type `host` or `max` to a node with a CPU from a different + vendor, or whose CPU lacks flags of the source node's CPU, as the guest + might use them. +** VMs with any other CPU type, for example `x86-64-v3` or a custom CPU type, to + a node that does not support all flags of the VM's virtual CPU, including + the flags the CPU type enables by default. QEMU would refuse to start the + VM on such a node. +** VMs with the `hv-reenlightenment` or `invtsc` CPU flag to a node with an + incompatible TSC frequency. +-- ++ +The migration dialog and `qm migrate` show the reason, and migrating all VMs +of a node skips such VMs. For live migrations between CPU vendors with other +CPU types, a warning is shown, as guests can become unstable, sometimes only a +while after the migration. A warning is also shown for VMs with the CPU type +`host` or `max` if the CPU models of the nodes differ, as live migration with +these CPU types is only reliable between identical CPUs. Most of these checks +only apply if the target node runs a {pve} version that reports its CPU +information. ++ +As the flags supported by KVM also depend on the kernel version, `root@pam` +can override the check of the flags for the CPU types `host` and `max` with +the `--allow-missing-cpu-flags` option of `qm migrate`, or the corresponding +option in the migration dialog. The `--force` option, which the HA stack uses +for its migrations, does not override this check. ++ +The checks also apply to migrations of HA-managed VMs. A migration requested +through the API or web interface is refused right away. Migrations that the HA +stack starts on its own, for example for maintenance mode, cannot override the +check and fail. Conntrack State Migration ^^^^^^^^^^^^^^^^^^^^^^^^^ -- 2.47.3