Skip to content

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

Open
rawahars wants to merge 1 commit intomicrosoft:mainfrom
rawahars:lm_disable_non_migratable
Open

[live-migration] disable log listener for migratable UVMs#2715
rawahars wants to merge 1 commit intomicrosoft:mainfrom
rawahars:lm_disable_non_migratable

Conversation

@rawahars
Copy link
Copy Markdown
Contributor

@rawahars rawahars commented Apr 30, 2026

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 from 49ad723 to 1f015af Compare May 1, 2026 18:23
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 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
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