Last active
June 4, 2026 07:24
-
-
Save andrebrait/0f30e0a32e28bcce3e0faa39ea06561a to your computer and use it in GitHub Desktop.
Install and enable QEMU Guest Agent on pfSense on boot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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