Skip to content

Commit

Permalink
init: Set QEMU state dir/PID file path directly
Browse files Browse the repository at this point in the history
This fixes #101 for me.

I'm not sure why I didn't used to hit this, but on my host system
/var/local/run is owned by a privilged user and has no global write
perms, but is also the default where the qemu-ga build writes these
files to.

Fix is just to set it explicitly to the default that exists on other
systems, which the init script is already set up to handle.
  • Loading branch information
bjackman authored and danobi committed Dec 3, 2024
1 parent edd5141 commit b1c42ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/init/init.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ if [[ -e /dev/kmsg ]]; then
fi

log "Spawning qemu-ga in the background"
qemu-ga --method=virtio-serial --path="$vport" $qga_logs -d
# These --statedir and --pidfile match th default on typical QEMU builds, but
# versions exist where the default is something else. See
# https://github.com/danobi/vmtest/issues/101
qemu-ga --statedir /var/run --pidfile /var/run/qemu-ga.pid \
--method=virtio-serial --path="$vport" $qga_logs -d


# Run a login shell
Expand Down

0 comments on commit b1c42ff

Please sign in to comment.