Conversation
383ed1e to
a9e69d3
Compare
There was a problem hiding this comment.
Thanks for your contribution!
Using a dedicated Migration Protocol command to decide whether the VM should be resumed on the destination is a neat and simple solution to the underlying problem. That said, I have a couple of questions and requests.
Could you please elaborate on your use case and motivation for migrating paused VMs? I’m slightly concerned that this change may be AI-assisted without being grounded in active work on live migration. Apologies if that assumption is wrong. Given the times we live in, reviewers need to be more aware and cautious about this. If you used AI/LLMs while preparing this contribution, please make sure you follow our CONTRIBUTING.md guidelines.
Also, a change like this needs integration test coverage. Please add an integration test for it. I think you can extend the existing migration helper with a paused: bool flag.
PS: Converted to draft as non-trivial parts (such as an integration tests) are missing.
There was a problem hiding this comment.
You will need to update the mermaid diagram please:
| @@ -979,11 +979,16 @@ impl Vmm { | |||
| StateReceived { | |||
| state_receive_begin, | |||
| } => match req.command() { | |||
| Command::Complete => { | |||
| cmd @ (Command::Complete | Command::CompletePaused) => { | |||
There was a problem hiding this comment.
this combined match arm doesn't make sense! For example, we still log Migration (incoming): resume:{}ms when we do not resume the VM.
There was a problem hiding this comment.
That's right, I separated them into two different arms
I'll try to add it
|
|
Perfect - thanks! :) |
72d11d7 to
39e180b
Compare
|
Added integration tests |
6b765ba to
f0245b3
Compare
rbradford
left a comment
There was a problem hiding this comment.
Some tests also got accidentally deleted
| @@ -103,6 +103,7 @@ use crate::bitpos_iterator::BitposIteratorExt; | |||
| /// Configured --> Configured: Memory | |||
| /// Configured --> StateReceived: State | |||
| /// StateReceived --> Completed: Complete | |||
| /// StateReceived --> PausedVMCompleted: CompletePaused | |||
There was a problem hiding this comment.
I don't see PausedVMCompleted mentioned anywhere else?
There was a problem hiding this comment.
I misunderstood how the diagram was constructed, so I’ve updated it again.
| } | ||
|
|
||
| #[test] | ||
| #[ignore = "See #5532"] | ||
| #[cfg(target_arch = "x86_64")] | ||
| #[cfg(not(feature = "mshv"))] | ||
| fn test_live_upgrade_ovs_dpdk_local() { | ||
| _test_live_migration_ovs_dpdk(true, true); | ||
| _test_live_migration_ovs_dpdk(true, true, true); |
There was a problem hiding this comment.
Did you intend to turn it on for paused here?
There was a problem hiding this comment.
I've removed this test case.
| } | ||
|
|
||
| #[test] | ||
| #[cfg(not(feature = "mshv"))] | ||
| fn test_live_upgrade_watchdog_local() { | ||
| _test_live_migration_watchdog(true, true); | ||
| _test_live_migration_watchdog(true, true, false); |
There was a problem hiding this comment.
I don't think we need all these variants.
Just one live migration and one live upgrade test with paused should be sufficient. This will consume too much CI time.
There was a problem hiding this comment.
I’ve uploaded a new version. There will only be two test cases for live migration—one basic case and one local variant. For live update, since the integration tests rely on the released cloud-hypervisor-static binary, I assume I can only add new tests once scripts/run_integration_tests_x86_64.sh is updated to the new version.
f0245b3 to
155346a
Compare
|
Will review it this week. |
phip1611
left a comment
There was a problem hiding this comment.
Thanks, LGTM! We don't do merge main into feature branch-style git histories. Instead, we use rebases. Although I think the MQ would resolve this automatically, please adapt your branch.
This extends migration to also support paused VMs, preserving the paused state on the destination. Changes: - Add CompletePaused protocol command that finalizes migration without resuming the VM on the destination - Skip the pause step during migration if the VM is already paused - On migration failure, only restore the running state if the VM was originally running (not paused) Signed-off-by: Nguyen Dinh Phi <[email protected]>
Adding a paused flag to live_migration() tests; when this flag is set, the VM will be paused before migration is performed. Signed-off-by: Nguyen Dinh Phi <[email protected]>
622d34b to
c29900e
Compare
I've rebased it. |
|
thanks! Test coverage is looking solid. Happy to have this in the Merge Queue soon |
This extends migration to support paused VMs, preserving the paused state on the destination.
Changes:
Closes #7815.