VM SPICE Screen goes black

Hello,

I am new to TrueNAS and setting up a VM. However, I have followed multiple guides.

When setting up a Linux Ubuntu VM, I get to the initial setup where you select language, etc. However, seemingly randomly, the spice connection will go to a smaller black screen and then a full black screen, and I cannot access the VM again.

Any suggestions on how to fix?

Running TrueNAS Scale 25.4.2.0

yeah the buildin spice webview is not the best…it randomly freezes after 30 seconds…
Try with an external spice viewer, at least those were working fine when i last tried vms around a year ago…

I’ve had this happening with one VM since I migrated all my VMs from VirtualBox to TrueNAS. I’m not very familiar with SPICE (VNC historically), but besides this issue it seems to be working fine so far with my other VMs (Linux and Windows).

It doesn’t matter if I use the web viewer or virt-viewer client. It is an Ubuntu 22.04 VM, and after around a day the screen will either go black or have the boot image stuck on it, but it won’t show the desktop anymore. I also noticed I cannot Ctrl+Alt+F1/F7 between ttys anymore. When I tried, that resulted in it crashing as well. When it is crashed, around every five minutes you can see virt-viewer flicker briefly and after it does, usually my keyboard input is captured by the viewer until I focus on the viewer and click off again. But the VM isn’t crashed as I can still SSH into it and all services are still responding. Maybe just X is crashed? I have the SPICE tools (vdagent) installed.

It seems to be only this VM. When I ran it through VirtualBox, I had to increase the VRAM from 64MB to 128MB for it to boot. I see via the CLI the display device is booting with 64MB. Is there a way I can increase that to see if the issue resolves? The TrueNAS UI doesn’t have an input field for the VRAM size.

I see this via ps output: "driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"xres":1400,"yres":1050

Current screen, although booting finished a long time ago and later it will go black again. Before the viewer crash, I was looking at the Ubuntu desktop:

Random?
People simply don’t pay attention.

This happens when you switch to another browser tab, it wants you to enter the password again, but you have to refresh the web page in the browser or with control-r.

Hope they do something better than “that” when fully released!

The web viewer disconnects very quickly unless you are interacting with it. But it appears frozen. A page refresh and login works, though. It would be great if it were improved to be on par with web consoles provided by cloud providers (clear disconnect notices, if any, for example).

I posted my experience under what the OP described, though, because I’m wondering if it is the same as mine–not just they didn’t realize they could refresh the browser to reconnect. Hopefully someone from iX can weigh in later.

1 Like

Quick follow up to my issue with the VM crashing. It was resolved by removing the VirtualBox Guest Additions from the VM. They were not needed anymore, but apparently were causing X to crash. It has been almost a week and it has worked perfectly.

Here are the removal steps for anyone else that runs into this issue post-migration: Remove VirtualBox Guest Additions from a VM that has already been migrated to Hyper V - Super User