Bhyve connection works for one connection, then never works again until VM reboot.

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
I have a couple of VM's working just fine.

Bhyve works just fine at boot up but if I disconnect or the machine I am using to connect goes to sleep (guess that's a disconnect) I am unable to reconnect. I have to shutdown the VM and restart it. Then it connects fine. Is there a way to restart/refresh the Bhyve session when it timesout or disconnects?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What do you mean by "bhyve connection"? The VM stops being reachable over the network? What is the guest operating system?
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
Bhyve - NoVNC browser based connection. (http://10.x.x.x:17850/vnc.html?autoconnect=1)

When I first start the VM the VNC link works just fine (or the first time I connect to it regardless if it's immediately upon boot or not) Once I disconnect or the session is interrupted, it never works again until a fresh reboot of the VM. Even if I disconnect via the noVMC connection panel on the side.

The guest VM is Ubuntu 22.04.
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
And the VM it's self stays running just fine. I can SSH to it, etc. It's just the VNC connection that wont reconnect.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would recommend deleting the VNC device and configuring a serial console for a Linux VM. The browser based VNC is very limited in multiple ways. I use it for installation only, then delete it. There's SSH for Linux and RDP for Windows.
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
Will the serial connection allow for X11? You mention SSH and I can SSH fine via the network, but I am guessing you are talking about being able to access even if there is a network issue. In that case SSH would be okay for troubleshooting/fixing.

I would like to have more than command line for normal use. I can always install RealVNC or the like but wanted to go as minimal as possible.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Use X11 forwarding if possible or install x11vnc in the VM and talk VNC directly to it.

The TrueNAS VNC is not a VNC server in the VM but an emulated graphics card served via VNC protocol. Which is one reason why keyboard layouts, copy&paste, etc. don't work.

For access in case of a problem you can set up a serial console, which available even in the UI. Or via SSH to the NAS host and using cu.
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
Thanks for the help. I am installing X11vnc now.

It makes perfect sense that's it's iffy...since it's emulated. I still wonder why it only works once per boot?
 
Top