Skip to content

[live-migration] disable log listener for migratable UVMs#2715

Merged
rawahars merged 2 commits into
microsoft:mainfrom
rawahars:lm_disable_non_migratable
Jun 18, 2026
Merged

[live-migration] disable log listener for migratable UVMs#2715
rawahars merged 2 commits into
microsoft:mainfrom
rawahars:lm_disable_non_migratable

Conversation

@rawahars

@rawahars rawahars commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request adds support for live-migratable Linux containers on Windows (LCOW) sandboxes by introducing a new LiveMigrationAllowed option. When enabled, this option changes how the sandbox is initialized to avoid starting a log listener and to skip the /bin/vsockexec wrapper in the kernel arguments, which is necessary for live migration scenarios. The changes include updates to the configuration, kernel argument construction, and test coverage to ensure correct behavior.

Live migration support and configuration:

  • Added the LiveMigrationAllowed field to SandboxOptions and parse it from the io.microsoft.migration.allowed annotation, allowing sandboxes to be marked as live-migratable.
  • Updated the kernel argument construction in buildKernelArgs, buildInitArgs, and buildGCSCommand to thread the liveMigrationAllowed flag through and alter command-line construction accordingly. When enabled, the /bin/vsockexec wrapper is omitted to prevent stalling during migration.

Controller and runtime behavior:

  • Modified the VM controller's logging listener setup to skip creating a log listener when the sandbox is live-migratable, as the host will not run a log listener in this mode.

Testing and validation:

  • Added comprehensive tests in specs_test.go to verify correct parsing, kernel argument construction, and runtime behavior for both enabled and disabled live migration scenarios, including edge cases.

@rawahars rawahars requested a review from a team as a code owner April 30, 2026 08:25
@rawahars rawahars force-pushed the lm_disable_non_migratable branch 2 times, most recently from 1f015af to a570878 Compare May 7, 2026 16:19
@rawahars rawahars changed the title [live-migration] disable unsupported features for migratable pods [live-migration] disable log listener for migratable UVMs May 7, 2026
@apurv15

apurv15 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

When enabled, this option changes how the sandbox is initialized to avoid starting a log listener and to skip the /bin/vsockexec wrapper in the kernel arguments, which is necessary for live migration scenarios

Do capture in the comments why disabling log listener is necessary for live migration. What work would be required to re-enable it and work item to track it.

Comment thread internal/builder/vm/lcow/sandbox_options.go Outdated
@rawahars rawahars force-pushed the lm_disable_non_migratable branch from a570878 to dc14d71 Compare June 17, 2026 19:06
Introduces a sandbox-scoped LiveMigrationAllowed flag (parsed from the
LiveMigrationAllowed annotation) that propagates from the LCOW sandbox
options through spec building, kernel-args construction, and the host-side
VM controller. When a sandbox opts into live migration, the builder
validates and locks the allow-listed UVM-shape annotations up front so the GCS init command is
emitted without the /bin/vsockexec wrapper since the host will not run a
log listener that is non-migratable. Correspondingly, the controller short-circuits its GCS log
listener setup for live-migratable pods, closing logOutputDone so the
boot path proceeds cleanly without a host-side log socket.

Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
@rawahars rawahars force-pushed the lm_disable_non_migratable branch from dc14d71 to b69c2ba Compare June 17, 2026 19:14
Comment thread internal/builder/vm/lcow/specs_test.go Outdated
Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
@rawahars rawahars merged commit c446e12 into microsoft:main Jun 18, 2026
31 of 33 checks passed
@rawahars rawahars deleted the lm_disable_non_migratable branch June 18, 2026 20:48
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.

5 participants