Skip to content

[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
last-genius:asv/8.3-fix-lifecycle
Open

[Backport] xapi_vm_lifecycle: Only consult data-cant-suspend-reason and feature-suspend for live VMs#7048
last-genius wants to merge 1 commit intoxapi-project:26.1-lcmfrom
last-genius:asv/8.3-fix-lifecycle

Conversation

@last-genius
Copy link
Copy Markdown
Contributor

Backport of #7047

…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants