Skip to content

Commit

Permalink
Send qemu-ga logs out via /dev/kmsg
Browse files Browse the repository at this point in the history
`/dev/kmsg` is conveniently hooked up to the host, where vmtest is
listening. Rather than create yet another side channel, reuse a
reliable existing one.
  • Loading branch information
danobi committed Dec 5, 2023
1 parent df1abca commit cffd94a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/init/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,11 @@ if [[ -z "$vport" ]]; then
fi
log "Located qemu-guest-agent virtio port: ${vport}"

# Send QGA logs out via kmsg if possible
qga_logs=
if [[ -e /dev/kmsg ]]; then
qga_logs="--logfile /dev/kmsg"
fi

log "Spawning qemu-ga"
qemu-ga --method=virtio-serial --path="$vport"
qemu-ga --method=virtio-serial --path="$vport" $qga_logs

0 comments on commit cffd94a

Please sign in to comment.