FreeNAS on Proxmox. What's the current state of play?

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
You need to make a loader tunable, not edit the file directly if you want it to continue to work after a reboot.
Type:LOADER
Variable: virtio_console_load
Value:YES
Oh, OK.

TrueNAS has been rebooted since and if I run kldstats I can see virtio_console.ko in the list.

I'm afraid the term "tunable" is new to me. When you say make a loader tunable, is just a file with the contents as you have printed above? What is the file extension and where would I need to place this file? Also, would I need to remove the line I added to loader.conf to load to the virtio_console module?

Thanks,

FS
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
I'm afraid the term "tunable" is new to me. When you say make a loader tunable, is just a file with the contents as you have printed above?
In the GUI, under System | Tunables... Add one there with the points I mentioned.

would I need to remove the line I added to loader.conf to load to the virtio_console module?
It shouldn't matter as it would be removed anyway, but you can do it.
 

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
In the GUI, under System | Tunables... Add one there with the points I mentioned.


It shouldn't matter as it would be removed anyway, but you can do it.
I see. OK, thanks. I will check on this as soon as I get back today.

FS
 

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
In the GUI, under System | Tunables... Add one there with the points I mentioned.


It shouldn't matter as it would be removed anyway, but you can do it.
Thanks. I have added the Tunable.

Screenshot 2021-02-24 at 14.37.23.png


Interestingly, the line I added to the /boot/loader.conf is still present and the system has been restarted since I added it.

Screenshot 2021-02-24 at 14.38.00.png


Will it have any detrimental effect if I just leave that be? Or should I remove it and let the tunable handle it?

Thanks,

FS
 

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
The aborche repo looks to have been updated to support qemu 5.0.1 so I'm assuming the portdowngrade is no longer necessary. Do you have the ports installed in your jail? If not do
Code:
portsnap fetch
and
Code:
portsnap extract
before attempting to build the agent.
Thanks again for all your help thus far.

I am a bit stuck on this last bit sadly. I've been going through it trying to figure it out myself but struggling.

I have run make and the make has completed successfully. I'm just unsure how I now install that into TrueNAS. I'm guessing that I need to copy some files into my jails mount point so I can run the install in TrueNAS but I'm not sure which ones.

Thanks,

FS
 

Tomek_

Cadet
Joined
Nov 13, 2020
Messages
6
The install is best to be done manually at this point. From your repo look for qemu-ga and put that in /usr/local/bin and then qemu-guest-agent and move that to /usr/local/etc/rc.d/. Here's where I'm not quite familiar with TrueNAS and can't get the service to start automatically even with Tunables entries for rc.conf. I can see the service is enabled but it doesn't get started automatically so I defer to the custom init scripts configuration. I hope someone more knowledgable can chime in and provide a better way (and possible update proof).

Here's my setup so far:
Screen Shot 2021-02-24 at 10.29.45.png

Screen Shot 2021-02-24 at 10.30.16.png
 

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
The install is best to be done manually at this point. From your repo look for qemu-ga and put that in /usr/local/bin and then qemu-guest-agent and move that to /usr/local/etc/rc.d/. Here's where I'm not quite familiar with TrueNAS and can't get the service to start automatically even with Tunables entries for rc.conf. I can see the service is enabled but it doesn't get started automatically so I defer to the custom init scripts configuration. I hope someone more knowledgable can chime in and provide a better way (and possible update proof).

Here's my setup so far:
View attachment 45433
View attachment 45434

Amazing! Can't thank you enough. You have been a huge help!

It's actually working! Haha.

Memory ballooning doesn't seem to work correctly but I can live with that. The main thing for me was being able to have Proxmox reboot and shutdown TrueNAS and that's working now.

Thanks again.

FS
 

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Looks like i am at the right place and trying to get qemu guest agent running in TrueNas within Proxmox.
@fsociety3765 have you get it to work in Proxmox? I have a TrueNas VM running in Proxmox and would love to get qemu guest agent installed.
Would appreciate if you jot down some idiot proof instructions on how to get it up and running? :)

Cheers
 

fsociety3765

Explorer
Joined
Feb 2, 2021
Messages
61
Looks like i am at the right place and trying to get qemu guest agent running in TrueNas within Proxmox.
@fsociety3765 have you get it to work in Proxmox? I have a TrueNas VM running in Proxmox and would love to get qemu guest agent installed.
Would appreciate if you jot down some idiot proof instructions on how to get it up and running? :)

Cheers
Hey,

Yes I have it working. Network info is relayed back to Proxmox and I can reboot and shutdown TrueNAS from Proxmox too. RAM usage still doesn't seem to report correctly but I'm able to live with that.

I will try to list down what I did following @Tomek_'s instructions later. Although, maybe it would easier just to share the built files required to make it work. Seems silly for everyone to have to go through the build process.

FS
 

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
tha
I will try to list down what I did following @Tomek_'s instructions later. Although, maybe it would easier just to share the built files required to make it work. Seems silly for everyone to have to go through the build process.

that would be amazing. You could either upload it in Resources tab (I think) or somewhere where we could easily download the files. Look forward to hearing from you soon :)

Cheers mate,
 

{c}guy

Dabbler
Joined
Mar 12, 2019
Messages
10
Ok Anyone who comes here looking for a way to make this work, I can say that I have the qemu agent running on TrueNas on Proxmox. It is functioning correctly (although some functionality is missing) now under TrueNas on Proxmox as well as PfSense on the same server. I get the IP addresses reported back as well ad shutdown commands function correctly.

I followed the instructions in this thread, and another one I found and got the code to build. I used the same startup method as Tomek_ above did.. works fine.

If anyone feels comfortable, I'm posting links to the binaries I compiled... although I did compile them on TrueNas core, but they worked on pFsense too.

Here's the links:
qemu-ga : http://jrfiles.s3.amazonaws.com/qemu-ga
qemu-guest-agent: http://jrfiles.s3.amazonaws.com/qemu-guest-agent

Use at your own risk, but I assure you I did not modify the code in any way. Just giving back to the community which has helped me so much in the past.

Best,
{c}guy
 

Universalism

Cadet
Joined
Mar 6, 2017
Messages
8
Same here, followed the instructions yet get the same as fahadshery.
 

Tomek_

Cadet
Joined
Nov 13, 2020
Messages
6
Do you see the guest agent process running on the TrueNas VM? If not try running qemu-ga directly and see what the problem is.
 

TimvH

Dabbler
Joined
Mar 28, 2018
Messages
25
To make everything work you need to make the qemu-ga and gemu-guest-agent files executable with chmod +x.
Would be nice to make this possible with a plugin. Or even builtin to TrueNAS.
 

kappa42

Cadet
Joined
Jun 13, 2021
Messages
3
Mhm duno but is there a guide for people who are not so familiar with freebsd?

As I understand, I have to create a jail with v12.2?
I tried svn co but svn isnt installed. Why the heck is the virtio_console.ko not in the zip folder as it is described in the guide?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,455
Mhm duno but is there a guide for people who are not so familiar with freebsd?
https://www.truenas.com/community/resources/qemu-guest-agent.167/ doesn't appear to require any familiarity with FreeBSD, other than (as Tim mentions in the post above yours) to make those two files executable (which he also gives the command to do)
Why the heck is the virtio_console.ko not in the zip folder as it is described in the guide?
If "the guide" is the one I just linked, it is.
 
Top