SmechVisor spk-visor

spk-visor is the SmechVisor management CLI. It is not a general-purpose package manager — it replaces the roles that apt, dnf, or emerge would fill on a normal OS with two operations specific to a hypervisor appliance: live OTA updates and zero-downtime network deployment.

Overview

On a running SmechVisor node, spk-visor is the only way to update or redeploy the system. It is a pure Rust binary with zero external dependencies — it calls only the OS primitives available on any POSIX system.

Not spk spk-visor is not the same as spk. On SmechOS, spk system-install and spk userland-install download and extract packages. On SmechVisor, those commands are intentionally disabled — the OS is sealed. Running them will produce an error and exit.

Commands

spk-visor entire-system-upgrade
OTA update — downloads the latest smechvisor-daemon and smechvisor-base packages from GitHub Releases, stages them, swaps the daemon binary live (no reboot for daemon updates), and schedules a reboot for base system changes.
spk-visor deploy-system-img-copy <code>
Network deploy — the donor side. Streams all SmechVisor packages over TCP to the machine running the Deploy Shim ISO that advertised the given code.
spk-visor deploy-system-img-copy e13gts2
spk-visor receive-deploy
The receiver side (used internally by the Deploy Shim). Generates a 7-character hex code, displays it on screen, broadcasts it over UDP, waits for a donor to connect, receives packages over TCP, extracts them to /mnt/target, and reboots into the installed system.
spk-visor system-install <pkg>
Blocked. SmechVisor is a sealed appliance OS. Installing arbitrary packages is not supported. For updates, use spk-visor entire-system-upgrade.
spk-visor userland-install <pkg>
Blocked. Same as system-install — SmechVisor has no desktop environment or userland app layer.
spk-visor help
Prints all available commands with short descriptions.
spk-visor about
Prints version, docs URL, and credits.
spk-visor version
Prints the version string only — useful for scripts.

OTA Updates

SmechVisor is designed for zero-downtime server operation. spk-visor entire-system-upgrade handles two classes of update differently:

PackageUpdate methodReboot needed?
smechvisor-daemon Stop smechvisord → swap binary → restart immediately No — live swap, <3 seconds downtime
smechvisor-base Write to disk, stage for next boot Yes — scheduled, at operator's discretion

How it works

  1. spk-visor fetches smechvisor-daemon.tar.xz and smechvisor-base.tar.xz from the GitHub Release URL using curl.
  2. Packages are extracted to a staging directory.
  3. The daemon package: rc-service smechvisord stop → copy binary → rc-service smechvisord start.
  4. The base package: extracted to / directly. Running system processes are unaffected. A reboot activates the new kernel or base libraries.
  5. If the daemon fails to restart, the old binary is restored from a backup taken in step 2.
Note Running VMs are never affected by a daemon OTA update — cloud-hypervisor processes run independently and continue operating while smechvisord restarts. The dashboard goes dark for under 3 seconds.

Network Deploy

Network deploy lets you provision a new bare-metal machine with SmechVisor without a USB drive, using an existing running SmechVisor node as the donor.

Prerequisites

Workflow

  1. Boot the target machine from the Deploy Shim ISO. Walk through: disk selection → auto-partition → network setup.
  2. The shim displays a 7-character code — for example e13gts2. It also broadcasts this code on UDP port 9191 on the LAN.
  3. On the donor node, run:
    spk-visor deploy-system-img-copy e13gts2
  4. spk-visor listens on UDP port 9191 for the broadcast containing SMECHVISOR_SHIM:e13gts2, gets the sender's IP, connects back on TCP port 9192, and streams all packages.
  5. The shim receives the packages, extracts them to the partitioned disk, installs GRUB, and reboots into SmechVisor.

Wire protocol

UDP discovery (port 9191):

SMECHVISOR_SHIM:{code}
# example: SMECHVISOR_SHIM:e13gts2

TCP package stream (port 9192):

[4 bytes big-endian: name length]
[name bytes: package name]
[8 bytes big-endian: data length]
[data bytes: raw .tar.xz contents]
... (repeat for each package)
[4 bytes: 0x00000000] -- stream terminator

Deploy Shim ISO

The Deploy Shim is a minimal bootable ISO that transforms any bare-metal machine into a SmechVisor receiver. It boots into a Rust + Newt TUI wizard with no desktop environment, no live OS — just the installer flow.

Shim TUI flow

  1. Disk selection — lists all detected block devices. Select the target disk.
  2. Auto-partition — the shim creates a GPT partition table with three partitions automatically:
    PartitionSizeTypeMount
    Part 1512 MBEFI System/boot/efi
    Part 22 GBLinux swapswap
    Part 3RemainingLinux filesystem/
  3. Network type — choose Ethernet or Wi-Fi.
    • Ethernet: choose DHCP (auto) or static IP.
    • Wi-Fi: select SSID from scan, enter password.
  4. Code display — a screen shows the 7-character deploy code. On another machine, run spk-visor deploy-system-img-copy <code>.
  5. Receive & install — packages stream in over TCP, progress is displayed. GRUB is installed to the EFI partition. System reboots into SmechVisor.
Code generation The deploy code is generated from the current monotonic time and process PID, encoded as 7 hex characters. It is unique per shim boot session. The shim broadcasts it continuously every 2 seconds until a donor connects.

Shim ISO details

PropertyValue
Volume labelSMECHVISOR_SHIM
BootBIOS (GRUB i386-pc) + EFI (GRUB x86_64-efi)
InitMinimal shell wrapper — mounts /proc /sys /dev, runs dhcpcd, launches spk-visor receive-deploy
Networkdhcpcd on all detected interfaces
DNS1.1.1.1 (Cloudflare) written to /etc/resolv.conf
BinarySame spk-visor binary as the production SmechVisor image

Download

The Deploy Shim ISO is distributed alongside the Install ISO on the SmechVisor downloads page.