Skip to content

[VM Stage 8] Integrate VM isolation into Windows/Linux installation, guided setup, reconfiguration, and repair #116

Description

@iteathen

Parent: #107
Depends on: #108–#115
Coordinates with: #103

Goal

Make the VM-only repository execution boundary a first-class installation/configuration capability on both host families:

  • Windows -> Hyper-V;
  • Linux -> KVM/QEMU/libvirt.

By this stage the active host sandbox should already have been removed in Stage 1 and repository execution restored through VMs in Stage 6. Setup must never recreate direct-host repository execution when VM readiness is absent.

Setup should discover first, recommend safe defaults second, and prompt only for unresolved choices or explicit local consent.

Mandatory planning gate

Before changing code:

  1. read AGENTS.md, DB-020, docs/vm-migration.md, docs/vm-lego-studs.md, Stage-1 sandbox-removal/no-provider evidence, all VM stages, Reduce setup/configuration burden with guided auto-discovery and confirmation #103, setup/bootstrap docs, doctor behavior, and transactional configuration rules;
  2. inspect completed provider/image/environment/bridge implementation and enumerate what can be discovered, provisioned, repaired, or only diagnosed per platform;
  3. map every setup action to the existing provider/image/environment/composition interface; setup-only raw Hyper-V/libvirt bypasses are architecture defects;
  4. research Hyper-V feature/privilege/reboot behavior and Linux KVM/QEMU/libvirt package/service/group/socket/storage/network setup plus safe cleanup;
  5. research base-image acquisition/provisioning, storage requirements, networking, and guest bootstrap prerequisites;
  6. plan discovery, prompts, defaults, elevation/reboot/service handling, image acquisition, per-repo guest selection, resources, transactional config, repair/reset/migration, rollback, uninstall, noninteractive setup, and sandbox-era config migration;
  7. apply Reduce setup/configuration burden with guided auto-discovery and confirmation #103's discover-first/suggest-second/prompt-only-when-needed rule.

Provider discovery

Windows:

  • Hyper-V availability/enabled/usable state;
  • management privilege/readiness;
  • DevBridge image/environment inventory.

Linux:

  • KVM acceleration usability;
  • QEMU/libvirt package/service/provider readiness;
  • selected system-provider access, normally qemu:///system where policy allows;
  • DevBridge image/environment inventory.

Both:

  • storage/free space;
  • existing repo/provider/guest environments;
  • image generations;
  • bridge/bootstrap health;
  • approved repositories and immutable repo IDs;
  • configured guest profiles/resources;
  • installed-but-unusable prerequisites.

Do not infer readiness from /dev/kvm, virsh, Hyper-V installation, or a VM/domain name alone.

Guided choices

Present a proposed configuration covering repositories, guest profiles, provider, image generations, storage implications, memory/vCPU/lifecycle defaults, prerequisites requiring elevation/reboot/package/service/group/session changes, and exact DevBridge-owned objects that will be created/changed/removed.

Do not silently create authority-bearing environments merely because capability was discovered.

Provisioning / repair / re-entry

Use the same provider/lifecycle studs used by runtime/doctor; do not duplicate raw provider management.

Support re-entry for:

  • adding/removing repo environments;
  • enabling/disabling guest profiles;
  • image migration;
  • degraded provider/bridge repair;
  • reset/reseed;
  • resource/storage policy changes;
  • cleanup of obsolete owned images/environments;
  • recovery after host/provider changes.

Temporary provider unavailability must degrade execution, not reactivate a host fallback or delete persistent configuration.

Sandbox-era configuration migration

Stage 1 removes the execution effect of sandbox-era configuration. Stage 8 owns the deliberate operator-facing migration/deprecation of remaining keys such as:

  • workspace.externalReadRoots;
  • execution.allowUncontainedTools;
  • proposal/tool profile sandbox.* fields.

These keys must never be silently reinterpreted as permission for direct host repository execution. Migrate when semantics are unambiguous; otherwise emit an actionable error/reviewed change.

Non-interactive setup

Support declarative automation through the same validation/authority/provider interfaces. It must not bypass repository approval, image/provider/environment identity, host path ownership, or prerequisites.

Uninstall / cleanup

Distinguish DevBridge state, repo writable layers, immutable images, DevBridge-owned Hyper-V/libvirt objects, and operator/system virtualization infrastructure.

Do not casually disable Hyper-V, remove KVM/libvirt packages, stop shared services, or delete operator-owned provider objects.

Acceptance criteria

  • Fresh Windows setup discovers Hyper-V/image readiness before platform questions.
  • Fresh Linux setup discovers KVM/QEMU/libvirt/image readiness first.
  • Setup uses the same provider-neutral capability/health/lifecycle studs as runtime/doctor.
  • Setup derives approved repo identity from GitHub discovery rather than arbitrary local paths.
  • Operator can select per-repo guest profiles and safe image/resource/storage defaults.
  • Elevation/reboot/package/service/group/session requirements are precise and recoverable.
  • Provisioning is transactional/recoverable and touches only owned artifacts.
  • Setup validates bridge/bootstrap/tool readiness before reporting repository execution usable.
  • Reconfiguration supports add/remove/reset/reseed/migrate without reinstall.
  • Provider/image/VM unavailability is degraded/fail-closed, never direct-host fallback.
  • doctor remains diagnostic; authority-changing operations belong to explicit setup/lifecycle actions.
  • Sanitized config export/import does not transfer secrets or blindly trusted host/image state.
  • Noninteractive setup obeys the same authority rules.
  • Sandbox-era config is deliberately migrated/deprecated and cannot reactivate host repository execution.
  • Generic setup/controller code contains no raw Hyper-V/libvirt command/path special cases outside adapters.
  • Uninstall preserves operator-owned virtualization infrastructure.
  • Reduce setup/configuration burden with guided auto-discovery and confirmation #103 remains compatible with the VM-only architecture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions