Gamtrulia

QEMU Guest Agent for FreeBSD 12.1

Recommended Posts

I am running 1.02b DS3617xs/6.1.7 and I created a virtual machine running FreeBSD 12.1 on the Virtual Machine Manager from Synology. When I want to power off the vm it said I dont have the guest agent installed. I tried looking for it in FreeBSD ports and packages but cannot get any meaningful progress. Can anyone point me to the right direction please?

Share this post


Link to post
Share on other sites
6 hours ago, flyride said:

You could have mentioned that you found, and are not able to use the Syno builds.

 

"qemu guest agent bsd"

https://github.com/aborche/qemu-guest-agent

 

Yeah I read that also. Failed initially and found out the port tree was updated to a new version. After redirected to the correct version all is good. Just somehow the whole process installed over 1G of files and spent hours to compile so that I can shutdown from the VMM isn't quite justifying... XD

Share this post


Link to post
Share on other sites

After several attempts I figured out how to install the qemu-guest-agent in FreeBSD 12.1 without wasting G of space and hours of compiling this and that. Here are the instructions, for those who might need it:

# install all required binaries
pkg install -y gettext-runtime git glib gmake pkgconf python37

# update the port tree
portsnap auto

# use qemu41 instead 
mv /usr/ports/emulators/qemu /usr/ports/emulators/qemu42 && ln -s /usr/ports/emulators/qemu41 /usr/ports/emulators/qemu

# download the qemu-guest-agent source and compile/install it
git clone https://github.com/aborche/qemu-guest-agent.git /usr/ports/emulators/qemu-guest-agent
cd /usr/ports/emulators/qemu-guest-agent
make install clean

# restore the port tree
rm /usr/ports/emulators/qemu && mv /usr/ports/emulators/qemu42 /usr/ports/emulators/qemu

# enable the guest agent in rc.conf
sysrc qemu_guest_agent_enable="YES"
sysrc qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

# load the VirtIO console and make it permanent
kldload virtio_console
echo 'virtio_console_load="YES"' >> /boot/loader.conf

# start the guest agent
service qemu-guest-agent start

It could still take around 30 mins tho.

 

Reference: https://github.com/aborche/qemu-guest-agent

Edited by Gamtrulia

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.