Skip to content

Instantly share code, notes, and snippets.

@andrebrait
Last active June 4, 2026 07:24
Show Gist options
  • Select an option

  • Save andrebrait/0f30e0a32e28bcce3e0faa39ea06561a to your computer and use it in GitHub Desktop.

Select an option

Save andrebrait/0f30e0a32e28bcce3e0faa39ea06561a to your computer and use it in GitHub Desktop.
Install and enable QEMU Guest Agent on pfSense on boot
#!/bin/sh
# Install qemu-guest-agent
pkg update
pkg install -y qemu-guest-agent
# Enable it in rc.conf.local
cat > /etc/rc.conf.local << EOF
qemu_guest_agent_enable="YES"
qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
EOF
# Create a startup script
#
# Adding a delayed startup script in /usr/local/etc/rc.d/ helps circumvent
# boot services failing to auto-start after pfSense updates
cat > /usr/local/etc/rc.d/qemu-agent.sh << EOF
#!/bin/sh
sleep 5
service qemu-guest-agent start
EOF
# Make it executable
chmod +x /usr/local/etc/rc.d/qemu-agent.sh
# Reboot
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment