# XenGT and FreeBSD



## Dan MacDonald (Mar 8, 2017)

I have a FreeBSD 11 home server with an integrated Intel GPU that I'd like to use for some light virtualisation, although with some specific requirements. I know Bhyve is the recommended virt platform under FreeBSD but AFAIK it doesn't meet my requirements yet and I'm not sure Xen under FreeBSD does either.

The main OS I want to run virtualised is Windows - 7, 8 or 10 but 7 preferably. There are two main features I'm hoping will work under FreeBSD 11 Xen:

XenGT - I would like to be able to run some light OpenGL / GLES 2 Windows apps with hardware accelerated graphics via XenGT, presuming this is supported under FreeBSD? Maybe it only matters that the DOM0 kernel used supports this?

USB passthrough - AFAIK this is not supported under Bhyve yet unless you passthrough a PCI USB controller but thats not an option for me.

I would also like to use both features for a virtualised Linux guest.

Are these features available and working under FreeBSD Xen?

Thanks


----------



## SirDice (Mar 8, 2017)

A Xen Dom0 on FreeBSD is still highly experimental.

https://wiki.freebsd.org/Xen


----------



## Dan MacDonald (Mar 8, 2017)

OK but what if I use a Linux kernel for the Dom0? Can I expect XenGT to work to provide accelerated (Intel) GPU support to my guests?


----------



## SirDice (Mar 8, 2017)

Dan MacDonald said:


> OK but what if I use a Linux kernel for the Dom0?


You should probably ask that on a Linux forum.

I would suggest going with Citrix' XenServer. That seems to be the most complete and functional of all. I have quite a bit of experience with XenServer 5.0 - 6.5 but I haven't tried 7.0 or 7.1 yet.



> XenServer 7 is the leading hypervisor providing support for high-performance enhanced 3D graphics, with the widest variety of GPU pass-through and virtualized GPU vendor options. Only XenServer includes support for Intel’s Virtual Graphics Technology (GVT-g), a CPU embedded GPU with no extra hardware required to facilitate enhanced graphics workloads.
> 
> XenServer support of NVIDIA GRID vGPU has been extended for Linux graphical applications and desktops. With the latest NVIDIA GRID Maxwell-gen hardware integration, vGPU sessions per host have now increased to 128.



https://www.citrix.com/products/xenserver/


----------



## Dan MacDonald (Mar 8, 2017)

Are you implying I will only get support for running Xen under FreeBSD if I use a FreeBSD kernel for the Dom0, which as you say is experimental at best? When you say Dom0 is experimental under FreeBSD, you mean when using FreeBSD as the Dom0 kernel, right?

You recommend XenServer but do they support running under FreeBSD as the host OS? I would imagine they only officially support Linux hosts. According to the FreeBSD Xen wiki, the SLES kernel supports as many Xen features as the Xenserver kernel.

I would prefer to run Xen under FreeBSD due to its more mature ZFS support, if it has the same feature set as Xen under Linux. I don't really care which kernel is used for Dom0 as long as it does what I need.


----------



## SirDice (Mar 8, 2017)

Dan MacDonald said:


> Are you implying I will only get support for running Xen under FreeBSD if I use a FreeBSD kernel for the Dom0


I'm implying you can only run a FreeBSD kernel with FreeBSD.



Dan MacDonald said:


> You recommend xenserver but do they support running under FreeBSD as the host OS?


XenServer is a complete package, OS and all. You're supposed to run it on bare-metal. Use an iSCSI storage repository. The storage could be FreeNAS, plain FreeBSD host, EMC, NetApp or whatever else you have.


----------



## Dan MacDonald (Mar 8, 2017)

SirDice said:


> I'm implying you can only run a FreeBSD kernel with FreeBSD.



Unless I'm misunderstanding it (or its incorrect), the FreeBSD wiki Xen page says I can run a Dom0 host under FreeBSD by using a Linux kernel / distro for Dom0:

https://wiki.freebsd.org/FreeBSD/Xen

"FreeBSD still cannot run as a Dom0 host, which means you need to setup with a different Dom0-capable operating system. A list of Dom0 kernels is available here:

http://wiki.xen.org/wiki/Dom0_Kernels_for_Xen "

Does this mean Xen under FreeBSD is unusable without having a separate, bare metal Linux install running the Dom0? I find that description a bit unclear.

If this is the case, does anyone know how far we are from having PV GPU support under Bhyve?


----------



## SirDice (Mar 8, 2017)

Dan MacDonald said:


> Unless I'm misunderstanding it (or its incorrect), the FreeBSD wiki Xen page says I can run a Dom0 host under FreeBSD by using a Linux kernel / distro for Dom0


Yeah, you're right about that. I was under the false impression the Dom0 simply ran on top of the OS (and therefor uses whatever kernel the OS has). 



Dan MacDonald said:


> Does this mean Xen under FreeBSD is unusable without having a separate, bare metal Linux install running the Dom0? I find that description a bit unclear.


It was a bit unclear for me too. But this sounds about right.


----------



## grehan@ (Mar 16, 2017)

Dan MacDonald said:


> If this is the case, does anyone know how far we are from having PV GPU support under Bhyve?



I think this is a long way off


----------

