Skip to content

Add Linux NVMe preparation action - #40

Draft
jonathanbrenes wants to merge 4 commits into
Azure:mainfrom
jonathanbrenes:feature/nvme-action
Draft

jonathanbrenes wants to merge 4 commits into
Azure:mainfrom
jonathanbrenes:feature/nvme-action

Conversation

@jonathanbrenes

@jonathanbrenes jonathanbrenes commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a built-in, fix-only alar nvme action based on the Linux preparation logic
in Azure/azure-cli-extensions#9858, with guest-kernel/device adapters and the
tested RHEL 7 standalone EFI timeout correction.

NVMe must not run for ADE. The action now requires a fresh, successful
source-VM eligibility report covering OS and data disks. Missing, invalid,
unknown, failed, stale or ADE-positive evidence stops before disk discovery or
any requested repair. Locally encrypted/unidentified partitions are rejected
before ADE unlocking, even when credentials are available.

Scope

Seven runtime/documentation files, with no checked-in NVMe test suite:

  • The action, existing embedding/materialization additions and usage README.
  • main.rs: pre-discovery eligibility admission for invocations containing
    nvme, plus a defensive confirmed-ADE refusal before repairs.
  • distro.rs: NVMe-only refusal of encrypted/unknown partitions before ADE setup.
  • nvme.rs: typed source-report validation using existing dependencies.

Other actions retain their ADE recovery behavior. No generic encryption
classifier rewrite, new Rust dependencies, mode flags, cloud SDK calls inside
ALAR, runtime health checks or VM size/controller operations are introduced.
The Oracle plaintext-classification correction remains separate.

Required source-VM handoff

The updated CLI counterpart in Azure/azure-cli-extensions#9858 verifies extension
handler identities plus VM/managed-disk ADE metadata for the OS and every data
disk. API errors or incomplete inventory do not establish eligibility.

az nvme-conversion check -g SOURCE_RG -n SOURCE_VM --controller-type NVMe \
  --ignore-os-check --ignore-sku-check --ignore-windows-version-check \
  -o json > nvme-eligibility.json
# Securely transfer the full JSON to the rescue VM, then:
sudo install -m 600 nvme-eligibility.json /root/nvme-eligibility.json
sudo ALAR_NVME_ELIGIBILITY_FILE=/root/nvme-eligibility.json alar nvme

The file must be root-owned, regular and not writable by group/others. Its
successful report must contain consistent VM identity, complete OS/data disk
identities and explicit ADE-free states. Maximum age is 15 minutes, with at most
one minute of future clock skew accepted; boundary tests include milliseconds.
Combined action invocations are admitted or rejected before any action runs.

Trust boundary: the repair workflow/operator must associate the report with
the actual original VM/recovery disk and keep its disk/encryption configuration
unchanged during preparation. This is a private trusted workflow handoff, not
signed Azure attestation. ALAR cannot infer VM-wide state from an offline disk.
Root can bypass local software controls; direct internal-payload execution is
not the supported eligibility-gated interface.

Unlocking ADE or removing its extension is not decryption. SSE, customer-managed
server-side keys and encryption at host are not ADE.

Validation

Validated canonical Git tree 03a33ec80bb235530a327474708a5fbfd5d11dec.

Command/check Result
cargo test --locked --offline --target x86_64-unknown-linux-gnu PASSED: existing Rust unit test
cargo build --release --locked --offline --target x86_64-unknown-linux-gnu PASSED
Release --help/--version; exact embedded payload PASSED
External Rust contract suite against byte-identical guard source PASSED: 13 cases, including real CLI-generated Azure JSON and precise age boundaries
Actual ALAR executable refusal harness PASSED: 18 cases before guest discovery/repairs, including combined actions, missing/bad/stale evidence, OS/data ADE, credentials and unsafe file ownership/permissions
Real read-only source-VM preflight and private-file consumption PASSED: actual Azure SDK report accepted; retained VM remains deallocated
CLI counterpart workflow/EFI tests PASSED: 87 tests, 2 existing live scenarios deselected
Documentation, guard ordering, scope and diff checks PASSED

ALAR tests/harnesses and raw evidence remain external, not in this PR. No new
VM deployment, guest RunCommand or Azure resource mutation was performed for
this validation. The existing Rust unit test emits telemetry.

Unchanged action-payload SHA256:
681c6beabca9d41ca8dc5069a2596d5fcc3659e34291a9c54d0869e072be022e.
Guarded x64 GNU executable SHA256:
99a8f5ae9a88fcaf27256e00886010622faa94eb9e45720a5a3aacd6a2e4e8a5.

Earlier live validation and remaining boundaries

Earlier candidates passed RHEL 7.9 and native ARM64 preparation/boot/timeout
tests. Oracle 8.10/9.8/9.7 x64 passed only with a temporary plaintext-discovery
candidate that was reverted. Those were plaintext tests, not ADE support.
The current ADE change is a refusal policy, not successful encrypted conversion.
No new encrypted live VM campaign was run, and stable SSH remains uncertified.
Draft for review.

jonathanbrenes and others added 4 commits November 24, 2026 18:04
Embed the shared Linux preparation script with guest-kernel/device adapters
and the tested RHEL 7 standalone EFI timeout correction.

Add self-contained action regressions and optional shared-source fixtures.
Document the unchanged Oracle framework limitation and SSH acceptance gap;
keep ADE and session-specific deployment tooling outside this change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove unused check/dry-run flags, staging and non-fix branches while
preserving default repairs and the optional equivalent -fix argument.

Retain every shared-source fix/error scenario, update the self-contained
regressions and document the narrower interface and historical live scope.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the developer test harness separately and remove it from the
contribution. Keep only the action, minimal built-in wiring and usage
documentation, including the unchanged Oracle framework limitation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require a fresh root-owned source-VM check report covering OS and data disks
before discovery or repair. Refuse encrypted or unknown guest partitions
before ADE setup and keep other actions' recovery behavior unchanged.

Keep the regression harness external and document the trusted report handoff.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant