v0.1.7

Deployment

Last updated


This page covers which files the working directory needs when QemuRun-pve runs from a release binary or as a systemd service.

Working Directory Requirements


Every relative path resolves against the working directory at startup:
PathPurposeWhen missing
.envEnvironment variablesLogs a warning and falls back to the process environment
sh/Serves OS init scripts under /sh/*/sh/* returns 404, so curl -fsSL hands an empty script to bash; the pipeline still exits 0 and the VM boots without its init script
.go_qemu_disabledDisabled listThe VM list and every state check fail
.go_qemu_pubkey_adminExtra admin public keysSkipped
.go_qemu_cpu_typeCPU type cacheGenerated on the first VM install

New VMs download their script from http://<NODE_{MAIN_NODE}>:<PORT>/sh/<os>_<version>.sh, so the VM subnet must reach the main node's PORT.

Release Binary


Pushing a v* tag makes GitHub Actions run go build -o app ./cmd/api with Go 1.25 on ubuntu-latest and attach app packed as QemuRun-pve@<tag>.tar.gz to that release.
  1. git clone https://github.com/pardnchiu/QemuRun-pve.git /opt/QemuRun-pve
  2. cd /opt/QemuRun-pve
  3. curl -fsSL -o release.tar.gz \
  4. "https://github.com/pardnchiu/QemuRun-pve/releases/download/<tag>/QemuRun-pve@<tag>.tar.gz"
  5. tar -xzf release.tar.gz
  6. cp .env.example .env
  7. touch .go_qemu_disabled
  8. ./app

The clone provides sh/ and .env.example; the binary does not embed them.

systemd Service


  1. [Unit]
  2. Description=QemuRun-pve API
  3. After=network-online.target
  4. [Service]
  5. User=root
  6. WorkingDirectory=/opt/QemuRun-pve
  7. ExecStart=/opt/QemuRun-pve/QemuRun-pve
  8. Restart=on-failure
  9. [Install]
  10. WantedBy=multi-user.target

  1. systemctl daemon-reload
  2. systemctl enable --now QemuRun-pve
  3. journalctl -u QemuRun-pve -f

The ExecStart line points at the binary: QemuRun-pve when built from source, app when unpacked from a release. The working directory must point at the directory holding sh/ and .env; User=root is required for qm / pvesh and inter-node SSH.

Upgrade


  1. Get the new binary (rebuild or download the new release)
  2. git pull to update the sh/ scripts
  3. systemctl restart QemuRun-pve

After replacing node hardware, delete .go_qemu_cpu_type so the next install re-detects the CPU Baseline.
中文