Truenas, home assistant os, failed to start QEMU Guest Agent

Hi,

I have the same problem however found a partial workaround at Reddit

Need to attach the special serial device to the VM then do an extra reboot of VM to let the qemu-guest to start normally with the OS:

To list how to refer to the HA OS VM:

virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" list

In my case the VM called as “1_homeassistant”. So I can use the following command to attach the missing serial device and reboot the VM

virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" attach-device 1_homeassistant  --file /mnt/nasV1/VM/Channel.xml --current
virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" reboot 1_homeassistant

The content of the Channel.xml:

<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>

Hope this helps until it became fixed in TrueNAS or even become to a configurable item through its GUI.

-Boti

1 Like