fangorn/sunshine-qemu
public
ref:a8c9585c538b23150d306cb7c8ead258754bb100
fix(packaging): start sunshine-qemu@ units for VM names with dashes on systemd 255
Found by running the units for real: with the escaped instance name in
StateDirectory=sunshine-qemu/%i (sq\x2de2e\x2dhook for the libvirt
domain sq-e2e-hook), systemd 255's executor exits before running
anything ('Failed to deserialize: Invalid argument'), so the unit
never started for any VM whose name contains '-' or a space.
systemd-analyze verify accepts it. Bisected to StateDirectory=; the
units now use the shared parent as StateDirectory and create the
per-VM directory, named after the VM itself (%I), in ExecStartPre.
The state is in /var/lib/sunshine-qemu/<vm>, which also simplifies the
install steps.
Verified on Ubuntu 24.04 (systemd 255, libvirt 10.0): the libvirt hook
starts sunshine-qemu@sq\x2de2e\x2dhook.service when the domain starts
and stops it when the domain stops; the unit runs as sunshine-qemu in
its sandbox, opens the p2p display through libvirt and the headless
client streams the guest pattern.
The packaging test also accepts shellcheck 0.9's SC2317.
Refs #6
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BPNw4PCgkEfhyCjQT19wsb
SHA:
a8c9585c538b23150d306cb7c8ead258754bb100
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-09-13 10:45
Parents:
9cc1e1a
4 files changed
+30
-17
| Type | ||
|---|---|---|
|
|
docs/qemu.md | +6 −7 |
|
||
|
|
packaging/linux/qemu/sunshine-qemu@.service | +9 −4 |
|
||
|
|
packaging/linux/qemu/user/sunshine-qemu@.service | +8 −3 |
|
||
|
|
tests/packaging/linux/qemu/test_sunshine_qemu.sh | +7 −3 |
|
||