[Backport] xapi_vm_lifecycle: Only consult data-cant-suspend-reason and feature-suspend for live VMs#7048
Open
last-genius wants to merge 1 commit intoxapi-project:26.1-lcmfrom
Open
Conversation
…suspend for live VMs
Otherwise, a shutdown VM that had data/cant_suspend_reason populated during its
runtime will not be migratable with VM_NON_SUSPENDABLE error.
Additionally uses Xapi_vm_lifecycle_helpers.is_live (which checks for both
`Paused and `Running) instead of a check for `Running to determine if the VM is
live.
The following matrix of cases was tested:
[x] Test on migratable Windows (shouldn't block suspend) → OK
[x] Test on Windows with a non-migratable device (should block suspend as VM
lacks feature) → OK
[x] Test on migratable Linux with XenServer tools (shouldn't block) → OK
[x] Test on migratable Linux with XCP-ng tools (shouldn't block) → OK
[x] Test on Linux with a non-migratable device (should block) → OK
[x] Test nopv Windows/Linux without unmigratable devices with manual
`feature-suspend` xenstore entry forced (shouldn't block, should
resume correctly)
[x] Windows BIOS → OK
[x] Linux BIOS → OK
[x] Test VDI migration on VM that had cant_suspend_reason populated but was
shut down (shouldn't block VDI migration) → OK
Fixes: c895469 ("xapi_vm_lifecycle: Disallow suspend when cant_suspend_reason is present")
Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
(cherry picked from commit 3d4d26b)
psafont
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #7047