Need help to create FreeBSD15 VM, with Gnome using a video card

I need a FreeBSD15 machine with Gnome gui and would like to use a VM for that. I think that Gnome needs a graphic card so I plan to assign the Nvidia 1030 card I have available in my TrueNas Scale ElectricEel-24.10.2.2 system.

So I did start downloading the actual FreeBSD15 iso and created a zvol for the VM.

Defined the VM including the Nvidia 1030 card and started the VM. Not working
So I removed the Nvidia card from the defs and started the VM again,

Now I can install FreeBSD. After doing so I changes the sshd config to allow login and added nano and sudo.

Than I did create a snapshot :slight_smile:

However the system is working without gui. So I installed Gnome (pkg install gnome) that did not work.

I noticed I had to install a video card driver and setup xorg. That did still not work, among other things probably because a video card is needed.

So now I added the Nvidia card driver and added the nvidia card to the VM.
The VM does not boot …

So I need help because I do not know how to get the VM with Gnome running.

Below some actions I did take (without the needed result :unamused:)


##The following command can be used to identify which graphics card is installed in the system:
pciconf -lv|grep -B4 VGA
% pciconf -lv|grep -B4 VGA
louisb@:~ $ pciconf -lv|grep -B4 VGA

situation without nvidia card

" vgapci0@pci0:0:2:0: class=0x030000 rev=0x05 hdr=0x00 vendor=0x1b36 device=0x0100 subvendor=0x1af4 subdevice=0x1100
" vendor = ‘Red Hat, Inc.’
" device = ‘QXL paravirtual graphic card’
" class = display
" subclass = VGA

https://www.youtube.com/watch?v=FUs7Or_Uxn8

Install the nvidia driver

sudo pkg install nvidia-driver
sudo sysrc kld_list+=nvidia-modeset

Chapter 5. The X Window System | FreeBSD Documentation Portal

pkg install xorg
sudo sysctl kern.evdev.rcpt_mask=6

To make it persistent across reboots, add the following to /etc/sysctl.conf:

sudo pw groupmod video -m
kern.evdev.rcpt_mask=6

Install Gnome

pkg install gnome
GNOME requires /proc to be mounted. Add this line to /etc/fstab to mount this file system automatically
proc /proc procfs rw 0 0
sudo nano /etc/rc.conf
sysrc dbus_enable=“YES”
sysrc gdm_enable="YES“

actual gnome settings /etc/rc.conf

sysrc dbus_enable=“YES”
sysrc gdm_enable=“YES”
dbus_enable=“YES”
gnome_enable=“YES”
gdm_enable=“YES”
kld_list=“nvidia-modeset”

After a roll-back and starting over from a clean FreeBSD version (with ssh-enabled), I did start over with trying to install gnome.

I did more or less the same, however in another / better order. Skipping some commands which were automatically performed. At the end and after adding my nvidia graphic card (did not work without), I managed to get gnome running.

However … running like you normally do on a physical machine … the Gui on the machine itself (in this case via spice).

However that is not what you / I want, I want the VM showing up like a website or perhaps better in a window on my windows machine.

Any one idea’s what the best method is and how to implement that?
WebRTC ???
vnc ???
spice ???