Skip to content

Comments

vmm: fix VM lifecycle bug#83

Merged
phip1611 merged 4 commits intocyberus-technology:gardenlinuxfrom
phip1611:poc-fix-bug
Feb 13, 2026
Merged

vmm: fix VM lifecycle bug#83
phip1611 merged 4 commits intocyberus-technology:gardenlinuxfrom
phip1611:poc-fix-bug

Conversation

@phip1611
Copy link
Member

@phip1611 phip1611 commented Feb 12, 2026

This PR fixes two bugs in the live-migration path.

Regarding the first one: This was a panic in the VMM that was happening during shutdown. Therefore, nothing critical.

The second bug: When the migration failes fairly late, the VMM might keep running but the VM is "dead" (paused). This fixes it by resuming it again.

Hints for Reviewers

Eventually, the VMM shuts down in the case of a successful migration.
We need to prevent "migration ongoing" errors in the shutdown path.

So far, I only triggered this with `ch-remote` but we didn't observe
it in the (test) production environment.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
@phip1611 phip1611 self-assigned this Feb 12, 2026
@phip1611 phip1611 force-pushed the poc-fix-bug branch 5 times, most recently from 4f6b722 to 2fd5636 Compare February 12, 2026 16:51
If a failure happens fairly late in the migration, the VM will remain
unusable. This commit uses the generic migration result check code path
to resume() the VM when the VM was running before as well.

I could nicely test various scenarios via `ch-remote`.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
Cloud Hypervisor only supports migration of running VMs. There are too
many implicit assumptions in the code to fix them easily. Further, with
our current knowledge, this restriction is perfectly feasible.

This check makes this failure case more explicit in favor of deeply
nested errors.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
Copy link

@amphi amphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good job finding this bug!

Copy link

@Coffeeri Coffeeri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phip1611 phip1611 merged commit 2a3a828 into cyberus-technology:gardenlinux Feb 13, 2026
11 checks passed
@phip1611 phip1611 deleted the poc-fix-bug branch February 13, 2026 14:32
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.

3 participants