general/other Easy and best way to run FreeBSD with Xorg

Hi guys,

I am hitting my head with virtualization.

I followed the guide to use vmrun.sh to create a vm, but it looks like this method is for creating headless vm.

Now I am trying with Virtualbox, but it doesn't have any specific FreeBSD acceleration... Perhaps Libvirt?
I read that I need to built from ports to activate bhyve... What else? Qemu?

I need a vm to test out random software that might run on FreeBSD but I don't want to touch my real system, thanks... 🙏
 
Hi guys,

I am hitting my head with virtualization.

I followed the guide to use vmrun.sh to create a vm, but it looks like this method is for creating headless vm.

Now I am trying with Virtualbox, but it doesn't have any specific FreeBSD acceleration... Perhaps Libvirt?
I read that I need to built from ports to activate bhyve... What else? Qemu?

I need a vm to test out random software that might run on FreeBSD but I don't want to touch my real system, thanks... 🙏
bhyve is included with the base system, it has nothing to do with ports.
I would recommend sysutils/vm-bhyve to easily manage your bhyve VMs.
 
Generally I find a headless setup to work best for virtualization. Then if I want graphics:
  • If the UI I am using is decent, X11/ssh forward.
  • If the UI is bloated / crap, I use Xvnc (tigervnc).
If you want accelerated 3D / gpu passthrough then VirtualBox is easiest if using Win/Lin guests. Qemu doesn't have a Bhyve backend so is software CPU accel only. Bhyve I believe allows you to pass through the entire GPU if you have multiple on the host.

Perhaps just LLVMpipe is good enough for you for a 3D software renderer?
 
Perhaps Libvirt?
No that won't get you a GUI.
Problem is Bhyve is geared to command line.

This as a good place to start but I don't prefer that method. Jump ahead in the manual to 24.7.4 and checkout UEFI guest. That is probably the most practical example.
/usr/share/examples/bhyve/vmrun.sh -h

Libvirt has a GUI program for setting up VM's but not running one.

When I did GUI in VM I had separate video cards for each VM. Along with USB card for each VM.
And you need VT-d//IOMMU instructions on your CPU for PCI Passthrough.

So its pretty complex going hardware route. TigerVNC route might be better for you.
 
This is one little tweak if you are interested in a single VM GUI Bhyve experience.

If you run a NVidia/AMD Graphics card on your host machine you may have a spare Intel GPU that you are not using.

There is driver to send that through to a Bhyve VM.


 
Is the VNC server provided by bhyve or do I have to install a vnc server into the VM?

I don't need GPU passthrough, I only need to test some software in a safe way.
 
Bhyve does provide a VNC server but it is tied to their virtual GPU driver and scrapes the framebuffer from it. This is way more layers.

So, as long as you have CPU accel (and virtio network drivers), I believe tigervnc's Xvnc installed on the guest will still be faster. Its also much smaller than a full fat Xlibre/Xorg (though you likely want one of them too for the libs / utilities).
 
Bhyve does provide a VNC server but it is tied to their virtual GPU driver and scrapes the framebuffer from it. This is way more layers.

So, as long as you have CPU accel (and virtio network drivers), I believe tigervnc's Xvnc installed on the guest will still be faster. Its also much smaller than a full fat Xlibre/Xorg (though you likely want one of them too for the libs / utilities).

This is true... It is just convoluted, I haven't figured it out in my head yet...
 
Back
Top