Resource icon

Resource QEMU Guest Agent 2021-03-11

Under no circumstances will I be held responsible or liable in any way for any claims, damages, losses,
expenses, costs, or liabilities whatsoever (including, without limitation, any direct or indirect damages for loss of profits, business interruption, or loss of information) resulting from or arising directly or indirectly from your use of these files and/or the instructions within this post.

Credit to @Tomek_ for the assistance provided in getting these binaries built and setup!
Credit to aborche!

Contained in the zip archive are three files.

  1. Place virtio_console.ko in /boot/modules.
  2. Run kldload virtio_console.ko.
  3. Place qemu-ga in /usr/local/bin.
  4. Place qemu-guest-agent in /usr/local/etc/rc.d.
  5. Place qemu-guest-agent in another location of your choice. This will be a copy that is re-added to the rc.d directory each time TrueNAS boots.
  6. Create Tunables in the TrueNAS web UI. System -> Tunables.
    1. Variable=qemu_guest_agent_enable Value=YES Type=RC Enabled=yes
    2. Variable=qemu_guest_agent_flags Value=-d -v -l /var/log/qemu-ga.log Type=RC Enabled=yes
    3. Variable=virtio_console_load Value=YES Type=LOADER Enabled=yes
  7. Create Init/Shutdown Scripts in the TrueNAS web UI. Tasks -> Init/Shutdown Scripts.
    1. Type=Command Command=service qemu-guest-agent start When=POSTINIT Enabled=yes Timeout=10
    2. Type=Command Command=cp /[path to a local copy of qemu-guest-agent file] /usr/local/etc/rc.d When=PREINIT Enabled=yes Timeout=10
  8. Reboot TrueNAS.

After running through these steps the QEMU guest agent should be running. I am personally running the binaries provided on my TrueNAS which is running in Proxmox. The IP information is reported back to Proxmox and Proxmox is able to gracefully shutdown/reboot the TrueNAS virtual machine.

For further information please see this thread


First release
Last update
4.86 star(s) 7 ratings

Latest reviews

Amazing! This worked for me... THANK YOU!
Works great, thank you.
Great for older TrueNAS versions and perfect instructions!
(if you are looking for TrueNAS 13 build, check out
I really appreciate what you've done here, helped a lot. It is working! As said by others, just need to make files executable with the chmod. Awesome!
Works like a charm, thank you. If using Proxmox remember to enable QEMU guest agent in the VM's option menu.
The only missing commands were to make qemu-ga and qemu-guest-agent executable by chmod +x command
Nice work with good install guidelines.