Skip to content

HyOps On-Prem Template to VM Smoke

  • Purpose: Validate the core on-prem chain end-to-end in one environment. Owner: Platform engineering

  • Trigger: Driver/validator changes, module refactors, release candidate checks

  • Impact: Confirms template-image and platform-vm behaviors before broader blueprint rollout
  • Severity: P2 Pre-reqs: HyOps runtime initialized, Proxmox reachable, vault password source available.

  • Rollback strategy: Script auto-destroys the temporary smoke VM by default; template-image rollback remains module-level destroy with matching inputs.

Context

This smoke gate verifies:

  1. hyops init proxmox
  2. hyops apply core/onprem/template-image (Linux)
  3. hyops apply core/onprem/template-image (Windows)
  4. hyops apply platform/onprem/platform-vm via template_state_ref using an isolated state instance
  5. hyops destroy platform/onprem/platform-vm (automatic cleanup, unless --keep-vm)

It is implemented as a single script:

  • hybridops-core/tools/smoke/hyops-onprem-template-vm-smoke.sh

Preconditions and safety checks

  • Installed hyops (via install.sh) can be run from any working directory.
  • Source-checkout usage should export HYOPS_CORE_ROOT=/path/to/hybridops-core.
  • Confirm target environment (dev, staging, etc.) is correct.
  • Confirm Proxmox API and SSH reachability from the runner.
  • Confirm sufficient datastore capacity for template rebuilds.
  • Confirm no change-freeze restrictions for VM/template lifecycle operations.

Steps

  1. Run smoke chain

    # If running from a source checkout:
    #   ./tools/smoke/hyops-onprem-template-vm-smoke.sh ...
    #
    # If running from an installed HyOps prefix (default):
    "$HOME/.hybridops/core/app/tools/smoke/hyops-onprem-template-vm-smoke.sh" \
      --env dev \
      --proxmox-ip <proxmox-ip> \
      # --vault-password-command <absolute-path-to-password-command>
    
  2. Optional flags

    # Skip init (when target is already initialized)
    ./tools/smoke/hyops-onprem-template-vm-smoke.sh \
      --env dev \
      --skip-init \
      --proxmox-ip <proxmox-ip>
    
    # Skip Windows build for faster checks
    ./tools/smoke/hyops-onprem-template-vm-smoke.sh \
      --env dev \
      --proxmox-ip <proxmox-ip> \
      --skip-windows
    
    # Keep the temporary VM for manual inspection (disables automatic cleanup)
    ./tools/smoke/hyops-onprem-template-vm-smoke.sh \
      --env dev \
      --proxmox-ip <proxmox-ip> \
      --keep-vm
    

Verification

Check module state outputs:

  • $HOME/.hybridops/envs/dev/state/modules/core__onprem__template-image/latest.json
  • $HOME/.hybridops/envs/dev/state/modules/platform__onprem__platform-vm/instances/template_smoke_vm.json

Confirm:

  • Both states report status: ok.
  • Template state contains template_key, template_name, template_vm_id.
  • VM state (instance slot) contains vm_ids/vm_keys/vm_names and references deployed VM outputs.
  • vm_keys are the logical HyOps names; vm_names are the physical names created on the target platform.
  • Script output includes smoke_verify=ok plus resolved VM details (smoke_vm_name, smoke_vm_id, smoke_vm_ip_present, and smoke_vm_ip when available).

Evidence root:

  • $HOME/.hybridops/envs/dev/logs/module/

The script also prints:

  • scratch (generated overlays used for the run)
  • template_state
  • vm_state
  • smoke_verify / smoke_vm_* verification fields
  • module_logs

Post-actions and clean-up

  • The script destroys the temporary smoke VM automatically unless --keep-vm is used.
  • If --keep-vm was used, destroy the temporary VM with the same generated inputs and --state-instance shown in the script output and runtime logs.
  • Archive runtime log paths in the release or change ticket.
  • If smoke fails, block blueprint-level rollout until root cause is resolved.

References