QEMU Guest Agent install problems on pfsense in VM


Recommended Posts

I have a couple of Hypervisors with pfsense running on them (Unraid and Proxmox) and finally figured out a problem I'm having is caued by pfsense not shutting down when asked.

 

So I installed the QEMU Guest Agent on the Proxmox VM and it seems to have worked beautifully.

 

https://forum.netgate.com/topic/162083/pfsense-vm-on-proxmox-qemu-agent-installation

 

So lets try the pfsense VM on the Unraid server:

 

1660578057.840915: debug: disabling command: guest-suspend-disk
1660578057.841103: debug: disabling command: guest-suspend-ram
1660578057.841109: debug: disabling command: guest-suspend-hybrid
1660578057.841113: debug: disabling command: guest-set-vcpus
1660578057.841116: debug: disabling command: guest-get-memory-blocks
1660578057.841119: debug: disabling command: guest-set-memory-blocks
1660578057.841122: debug: disabling command: guest-get-memory-block-size
1660578057.841126: debug: disabling command: guest-get-memory-block-info
1660578057.841129: debug: disabling command: guest-fsfreeze-status
1660578057.841137: debug: disabling command: guest-fsfreeze-freeze
1660578057.841140: debug: disabling command: guest-fsfreeze-freeze-list
1660578057.841144: debug: disabling command: guest-fsfreeze-thaw
1660578057.841147: debug: disabling command: guest-fstrim
1660578057.841185: critical: error opening channel: No such file or directory
1660578057.841190: critical: error opening channel
1660578057.841193: critical: failed to create guest agent channel
1660578057.841196: critical: failed to initialize guest agent channel

 

OK, I'm clearly missing something... How do I get Unraid to open that channel?

 

from the xml:

 

    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-37-pfSense - Cerberus/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

 

 

(To be fair the first install is on pfsense CE and the Unraid one is running pfsense plus... So that could be the cause but I don't think so.

 

Thanks for any input

 

 

jupiter-diagnostics-20220815-1228.zip

Link to comment

I'm wondering if something changed with the pfsense build, because I would swear that the system was not performing the soft shutdown.

 

I built a test vm last night and it does now perform the shutdown as desired. So maybe I don't really need the Guest Agent with pfsense.

 

I'm still curious as to why it fails though.

Link to comment
  • 1 year later...

Found a solution in the meantime:

 

pkg install -y qemu-guest-agent

cat > /etc/rc.conf.local << EOF

qemu_guest_agent_enable="YES"

qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

#virtio_console_load="YES"

EOF

cat > /usr/local/etc/rc.d/qemu-agent.sh << EOF

#!/bin/sh

sleep 5

service qemu-guest-agent start

EOF

chmod +x /usr/local/etc/rc.d/qemu-agent.sh

service qemu-guest-agent start

 

 

source:

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.