Install QEMU Guest Agent on TrueNAS

Hi, I've tried to install qemu agent from this repo: aborche-qemu-guest-agent.
Unfortunately, you have no root permissions on TrueNAS system.
First of all I installed gcc, make, and some required library what I found in error logs. I had to create some symbolic links for the MakeFile to run and install FreeBSD Ports. When finally I did run the make script, my whole TrueNAS database corrupted, and my TrueNAS system's pools went to offline. I had to reinstall TrueNAS and import my full backup.
My opinion is: Create your own NAS share on Ubuntu or some linux which supports qemu guest agent.

Anyway, good luck! Hopefully someone will succeed!
 
Also keep in mind that you are not supposed to install ANYTHING on the FreeNAS guest itself. Installing stuff is only allowed inside jails and from inside that jail you are very limited that you can do. I for example would like to use the zabbix agent with smartmontools plugin to monitor my HDDs health but I wasn't able to do it, because it is hard to access the HDDs with smartmontools from inside a jail.
 
TrueNAS SCALE has the qemu guest agent preinstalled, but TrueNAS CORE unfortunately I didn’t have much luck with.
 
I don't know if you see that same thing, but on the host that runs my TrueNas VM, the memory is used much more than what I've set for TrueNas.

I can see it on the summary of the host (almost all memory used on the host) but the VM is using just what it's set to use. I think it's because the lack of the QEMU support.

I don't see anything like it on other hosts that I have.
 
I got the same thing with OPNsense. Both are based on FreeBSD and it looks like FreeBSD doesn't work well with KVM. For example, if I assign 8GB RAM to the VM the KVM procress will reserve 7.5GB RAM for that process, even if the guest is only using 0,5GB RAM (incl. cache). So KVM is always using nearly the full RAM whether that RAM is really used or not.
 
For example, if I assign 8GB RAM to the VM the KVM procress will reserve 7.5GB RAM for that process, even if the guest is only using 0,5GB RAM (incl. cache). So KVM is always using nearly the full RAM whether that RAM is really used or not.
I don't know much about FreeBSD but I'm curious as FreeBSD does seem to support ballooning. Is it enabled? Also, passing through PCI devices requires all pages to be locked into memory because of possible DMA, which sometimes comes as a surprise.
 
I don't know much about FreeBSD but I'm curious as FreeBSD does seem to support ballooning. Is it enabled? Also, passing through PCI devices requires all pages to be locked into memory because of possible DMA, which sometimes comes as a surprise.
FreeBSD is supporting ballooning. But the implemantation is different. For example, FreeBSDs ballooning driver isn't reporting most data like used/free RAM. Because of that ballooning can't be used to draw memory usage graphs and as a fallback proxmox will use the reserved RAM of the kvm process as RAM usage and because KVM is reserving alot of RAM, even if the guest isn'T using it, the RAM usage graphs will be wrong.
 
Looks like I can install the prebuilt qemu-guest-agent at https://www.truenas.com/community/resources/qemu-guest-agent.167/.
The guide line misses part that you have to chmod +x for the executable files.
On proxmox I can see the VM IP is reported, but I have no idea on how correctly other functions work.
I followed exactly the same guide as yours with making those files executables. But still reporting its not up. In fact Proxmox showing the VM is up and running for 40 days even after I rebooted it ‍♂️
 
I built and posted that qemu-guest-agent on the TrueNAS forums.

I remember someone saying that they had to make the file executable. It definately not something I had to do. But perhaps thats because I built it? Not sure.

I have now migrated my TrueNAS Core installation over to TrueNAS Scale where the agent is built in so its not something I have thought about for a while.

Functionality wise it didnt report everything from memory. The two main things for me was the IP address showing and also the ability to gracefully shutdown the VM from Proxmox.

You do need to make sure the Guest Agent option is enabled in the VM options. And also make sure the tunables and startup scripts etc are setup correctly in TrueNAS.
 
  • Like
Reactions: Trinh Pham
Everyone is saying that TrueNAS Scale has qemu-guest-agent installed and active at all times. I am not sure where everyone is getting this information. I installed TrueNAS Scale, and Proxmox reports that there is no guest agent installed, AND when I launch a shell on TrueNAS and look for qemu in the process list (ps -ax | grep qemu) nothing shows up.
 
Everyone is saying that TrueNAS Scale has qemu-guest-agent installed and active at all times. I am not sure where everyone is getting this information. I installed TrueNAS Scale, and Proxmox reports that there is no guest agent installed, AND when I launch a shell on TrueNAS and look for qemu in the process list (ps -ax | grep qemu) nothing shows up.
I've seen that in the logs and it properly reports IPs to the PVE webUI and I can't remember having to install or configure anything.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!