Install the qemu guest agent in TrueNAS

From Levy

Revision as of 18:25, 31 December 2024 by Louis (talk | contribs) (Created page with "== Introduction == This page gives instructions for installing the qemu guest agent on TrueNAS Core == Instructions == Download this zipfile. :File:Qemu-guest-agent freebs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

This page gives instructions for installing the qemu guest agent on TrueNAS Core

Instructions

Download this zipfile. Qemu guest agent for FreeBSD It contains 3 files:

qemu-ga
qemu-guest-agent
virtio_console.ko
  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