Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How I got a XenHVM kernel and xen-tools working in FreeNAS

Status
Not open for further replies.

Phlogi

Newbie
Joined
Apr 2, 2014
Messages
33
Just a word of warning that you are in unsupported territory by trying to install packages yourself. We've warned God and Country about not doing package installs this way, so do this at your own peril.
Of course I agree, however comparing the risk of those few packages (that don't even change the system much, it's more of a monitoring thing) to the whole virtualization we can say that if someone came that far he knows what he's doing. Alternately you could continue creating your own build that does include those packages, although I don't think it's less risky.

Besides that if you try to install a wrong package some cases will be handled by the package manager:
Code:
pkg: wrong architecture: FreeBSD:9:amd64 instead of FreeBSD:10:amd64


By the way I had to change the following tunable when switching from 9.3 to 9.10 so that my passthrough devices show up properly:


The background is explained here:
http://i.imgur.com/dZdoq9U.png

Apart from that I removed / disabled the following three variables:


So from many tweaks in the past it actually comes down to one single tunable thanks to FreeBSD10.
 

cyberjock

Moderator
Joined
Mar 25, 2012
Messages
19,148
Of course I agree, however comparing the risk of those few packages (that don't even change the system much, it's more of a monitoring thing) to the whole virtualization we can say that if someone came that far he knows what he's doing. Alternately you could continue creating your own build that does include those packages, although I don't think it's less risky.
You know, if you want a package added it takes 1 line of code to add a package to a FreeNAS build. If you'd like I can compile a copy of FreeNAS 9.10 with the package already installed. :p

Edit: In payment for this service I would have to add a package called find_cyerjocks_moms_porn_and_forwarding. If you are cool with sending me copies, that is. ;)
 

Phlogi

Newbie
Joined
Apr 2, 2014
Messages
33
You know, if you want a package added it takes 1 line of code to add a package to a FreeNAS build. If you'd like I can compile a copy of FreeNAS 9.10 with the package already installed. :p

Edit: In payment for this service I would have to add a package called find_cyerjocks_moms_porn_and_forwarding. If you are cool with sending me copies, that is. ;)
As you can be read in my previous posts, I did build all previous versions myself to get xen support and I know how to do it. It's just a waste of time to keep up with the updates like that. Also as xen is now officially supported by the OS I think the packages should be included. I will create a pull request and see what happens.

Anyway: I'm interested to see the sourcecode of that find_... package you mentioned :D

/edit: https://github.com/freenas/freenas-build/pull/3

/edit2: Pull request accepted, we will have the xen guest tools in the next update
 
Last edited:

Elegant

Newbie
Joined
Aug 27, 2015
Messages
57
I've noticed that you require a tunable to make this work. My question is how do you determine the number required for hint.ada.#.at and scbus#00?
 
Joined
Nov 1, 2017
Messages
2
Does anyone have any update on this?

I see that pull #3 was never merged back in master after all, but rather the pull request was closed.
Further more I see that ticket #24824 was rejected for lack of python3 support from xen-guest-tools 4 months ago. Is there any update on that end?

I'm mostly asking for advice on how I should proceed. I was forced to rebuild a FreeNAS VM after a hardware failure during a critical period where I had no backups. Previously it was running FreeNAS 9.10-Stable and I had gotten working Xen support (as per details on this post). I was confident back then that moving forward, FreeNAS 10-11 would bring proper support thanks to FreeBSD but I saw it wasn't the case after having just built a FreeNAS 11 VM.

Is there an easy way for a FreeBSD noob like me to get the xen tools and utilities working on FreeNAS 11, or should I just give up for now, and create a FreeNAS-9.10 VM like I had previously?

FYI in either case, I've had no issue recovering my ZFS volumes, thanks to vt-d/IOMMU. All I've ever needed was the tunable adjustment "hint.ada.0".
 

Elegant

Newbie
Joined
Aug 27, 2015
Messages
57
You don't need xe-guest-utilities to have FreeNAS work. If you can still access a console to perform shut downs manually you should be good to go.
 
Joined
Nov 1, 2017
Messages
2
You don't need xe-guest-utilities to have FreeNAS work. If you can still access a console to perform shut downs manually you should be good to go.
I agree, that's what I have at the moment since rescuing my ZFS volumes...
But with a small UPS I don't have the luxury of relying on manual shutdown during power outages. I suppose I could always script/automate somehow via a ssh session with the guest... But I'd rather avoid scripting the entire shutdown sequence when I can instead rely on Xen to do most of the work for me. Seems less hacky, less error prone and less time consuming to set up and maintain.

I'll have to think more about it... Thanks!
 

acp

FreeNAS Aware
Joined
Mar 25, 2013
Messages
59
It is slated to be included in 11.2. So I will wait for it rather than hacking my install.
 
Status
Not open for further replies.
Top