Cannot connect to VM display (VNC / Spice) after migrating from CORE

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
I am having trouble with my VM (Ubuntu 22.04) following migration from CORE (latest) to SCALE (23.10.0.1) on a Dell R710 (Rev. 2/II model). Whenever I click the display button I get a please wait message and a circular loading bar that never goes away. I have tried:
  • Accessing from OSX and android
  • Serial console - no output
  • Deleting the display device and adding a new one (with password) and I understand through searching the forums that spice has recently been introduced and VNC is no longer an option.
  • Changing the port to 5900
  • Using multiple browsers (safari and firefox)
  • Navigating directly to http://<truenas-ip>:5900/spice_auto.html
  • Creating a new VM (Ubuntu 22.04) - serial console works initially but when I move past the first page onto installation everything goes blank
I currently have the VM's running through a bridge that has my ethernet port as a member and a single alias.

Also I saw this but wasn't sure if it was still relevant: https://www.truenas.com/community/threads/web-ui-and-vnc-sessions-timeout.110680/post-769669.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to specifically enable the serial console within the guest OS.

In /etc/default/grub place/edit this:
Code:
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600n8"
 
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"

Then enter the command update-grub as root.

Then create a file named /etc/init/ttyS0.conf with this content:
Code:
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
 
 
start on stopped rc RUNLEVEL=[12345]
stop on runlevel [!12345]
 
respawn
exec /sbin/getty -L 9600 ttyS0 vt102


This is a legacy method but the only one I know. Systemd will pick it up. After a reboot you will have a serial console.
 

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
Thanks for helping Patrick. The problem is that I can't even access the VM. This is all I get when I use the download logs facility within TN (from my migrated VM):
Code:
2023-11-29 08:56:24.394+0000: starting up libvirt version: 9.0.0, package: 9.0.0-4 (Debian), qemu version: 7.2.2Debian 1:7.2+dfsg-7, kernel: 6.1.55-production+truenas, hostname: eeyore.local
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
HOME=/var/lib/libvirt/qemu/domain-15-1_roo \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-15-1_roo/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-15-1_roo/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-15-1_roo/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=1_roo,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-15-1_roo/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/1_roo_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-i440fx-7.2,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel kvm \
-cpu qemu64 \
-m 16384 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":17179869184}' \
-overcommit mem-lock=off \
-smp 16,sockets=1,dies=1,cores=4,threads=4 \
-uuid 928f231c-d665-4c29-87bb-09dbb267deda \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=46,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime \
-no-shutdown \
-boot strict=on \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x4"}' \
-blockdev '{"driver":"host_device","filename":"/dev/zvol/tank/roo-2zfzn","aio":"threads","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x5","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1,"logical_block_size":4096,"physical_block_size":4096,"write-cache":"on"}' \
-netdev '{"type":"tap","fd":"47","vhost":true,"vhostfd":"50","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:a0:98:6f:d0:d6","bus":"pci.0","addr":"0x3"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=44,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x6"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/9 (label charserial0)
I have also now tried a fresh chrome install on OSX and I still get nothing from the display button when trying this on the new VM (created on Cobia).

Screenshots attached of display issue and network setup.
 

Attachments

  • Screenshot 2023-11-29 at 12.09.40 PM.png
    Screenshot 2023-11-29 at 12.09.40 PM.png
    116.2 KB · Views: 83
  • Screenshot 2023-11-29 at 12.11.00 PM.png
    Screenshot 2023-11-29 at 12.11.00 PM.png
    109.2 KB · Views: 79

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sorry, I run VMs only on CORE.
 

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
Thanks Patrick for looking into it anyway. Hopefully a SCALE user is around that can help.
 

ABain

Bug Conductor
iXsystems
Joined
Aug 18, 2023
Messages
172
Not seen this before, given your issue is continuing I would recommend reporting a bug using the link at the top of this page, you will be provided a link to upload a debug to a private area, we'll need this to investigate.
 

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
Not seen this before, given your issue is continuing I would recommend reporting a bug using the link at the top of this page, you will be provided a link to upload a debug to a private area, we'll need this to investigate.
Thank you ABain, I've done that now. I went back to CORE once I realised it was still accessible on reboot and it's been working fine. VNC opens correctly and I can view the console. I went to get back into SCALE and was having issues accessing the web portal and given all the issues so far I decided to do a configuration reset through the console. After that I reset the network config and created a new VM - I'm still seeing the same issues trying to access the display.

I'd still really like to get SCALE going though so that I can get GPU passthrough going.
 
Joined
Sep 23, 2013
Messages
24
I spent two hours trying to connect to the VM display in order to simply install Ubuntu from an ISO.
TLDR. Interface doesn't support Safari and clicking "Display" is a quick screen flash no-op. Switching to Chrome allowed me to click Display and get a SPICE window and interact with the installer.

The last time I needed console access I just used VNC. This is apparently no longer an option after trying with multiple VNC clients
Serial console gave me the initial Grub loader but installer is clearly going to a graphical mode after that. I do not want to modify every installer so I did not go far down this path.

TrueNAS, short of fixing this, needs to better document the requirements for running a VM including the permission groups that are required (KVM, libvirt?) and of course any browser specific choices they've made.

PS: pasting the URL from Chrome into Safari brought up a password dialogue and I was able to login fine. It's just the Display button interface that is broken on Safari.
 
Top