Inaccessible VM after a period of time

spiceygas

Explorer
Joined
Jul 9, 2020
Messages
63
UPDATE: I may be wrong, but I’m beginning to see the possibility that for some reason the launching of a VNC session is the trigger that makes the VM inaccessible. My VM is running two days now and I have only accessed it via terminal in Linux or an iOS or Android app. Previously I sometimes felt the need to check the VM via the GUI and so would always click on the VNC tab and then obtain the error in connection message. If the VM stays connectable without VNC use, then it seems VNC may very well be the culprit. In the words of Arnie, “I’ll be back.”
Anecdotally, I would agree that VNC is a common pattern. I access my Ubuntu Desktop via xrdp, and it never has problems. I access my Ubuntu Server via VNC and it is the one that hangs -- always a bit of time after I VNC into it.

But that's just observational. Far from conclusive.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Anecdotally, I would agree that VNC is a common pattern. I access my Ubuntu Desktop via xrdp, and it never has problems. I access my Ubuntu Server via VNC and it is the one that hangs -- always a bit of time after I VNC into it.

But that's just observational. Far from conclusive.
Thanks. My VM still up at time of writing so still looking good ...
 

jdrames

Cadet
Joined
Aug 9, 2020
Messages
4
I'm also tossing in my 2-cents here saying that it is related to the VNC connection.

I'm using my FreeNas box only for NAS storage and 2 VMs. The VMs are running Win 10 and Ubuntu Server.
Both VMs run fine and I have no problems with them as long as I am RDP'ing in the Win 10 machine or SSH into the Ubuntu server. But if I try to use VNC once the machines have been running for a while then it immediately crashes those VMs and I have to restart them.

That being said. When the VMs are first started I can use the FreeNAS web VNC client or a local VNC client and view those VMs fine and they will be okay for awhile. But anytime I've come back over an hour later trying to connect just stops the VM in its track.

While using other connection methods to get access to the VMs is doable. There are times when I need a root access connection for the Win 10 machine. Such as when connecting to a VPN that doesn't support remote sessions. When those instances come up I have to just shut the VM down. Then restart it from the FreeNAS web interface and then VNC connect to the session. A little annoying when you're trying to get something done fast.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
I'm also tossing in my 2-cents here saying that it is related to the VNC connection.

I'm using my FreeNas box only for NAS storage and 2 VMs. The VMs are running Win 10 and Ubuntu Server.
Both VMs run fine and I have no problems with them as long as I am RDP'ing in the Win 10 machine or SSH into the Ubuntu server. But if I try to use VNC once the machines have been running for a while then it immediately crashes those VMs and I have to restart them.

That being said. When the VMs are first started I can use the FreeNAS web VNC client or a local VNC client and view those VMs fine and they will be okay for awhile. But anytime I've come back over an hour later trying to connect just stops the VM in its track.

While using other connection methods to get access to the VMs is doable. There are times when I need a root access connection for the Win 10 machine. Such as when connecting to a VPN that doesn't support remote sessions. When those instances come up I have to just shut the VM down. Then restart it from the FreeNAS web interface and then VNC connect to the session. A little annoying when you're trying to get something done fast.
Yes, that’s my experience too. I’m curious tho - perhaps I misunderstand - why can you not login as root via ssh?
 

jdrames

Cadet
Joined
Aug 9, 2020
Messages
4
Yes, that’s my experience too. I’m curious tho - perhaps I misunderstand - why can you not login as root via ssh?

I can SSH into the Ubuntu VM if that is what you're asking. That's not a problem and doesn't cause any issues.
As for the RDP on the Win 10 machine, again that doesn't cause any issues.

So just VNC. And in my case I need to have "root/native" access to the Windows box from time to time as some of the VPNs that it connects out to will not allow a connection with an RDP session.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Thanks for that clarification. VNC is almost certainly the trigger issue for my setup. Five days up now, haven’t touched the VNC button, and the VM is rock solid. Still early days tho, so I’ll wait before final judgment. I don’t need VNC, so as long as (primarily) the WireGuard VPN continues to work and I can ssh in, I’ll be happy. Good luck with your resolution search.
 

ctag

Patron
Joined
Jun 16, 2017
Messages
225
Sorry to bump this old thread.

I believe I'm seeing the same issue here.

Ubuntu 20.04.3 VM that works fine, even VNC works for the first ~day, until I forget and try to access by VNC after a couple days have elapsed. Then it's gone, no SSH, no VNC now, no webpage being hosted. I have to "Power Off" and then start again in the Truenas UI. As long as I don't click the VNC button though, this VM tends to keep running.
 

spiceygas

Explorer
Joined
Jul 9, 2020
Messages
63
I noted in a different thread that when I rolled back the Linux kernel, all the problems went away. It's been almost a year with multiple Ubuntu VMs running and not a single hang/freeze.

Not the most satisfying answer ("stop updating your kernel"), but it has worked for me. You could clone your VM, roll back the kernel, and see if you have similar resolution.

 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
UP
I noted in a different thread that when I rolled back the Linux kernel, all the problems went away. It's been almost a year with multiple Ubuntu VMs running and not a single hang/freeze.

Not the most satisfying answer ("stop updating your kernel"), but it has worked for me. You could clone your VM, roll back the kernel, and see if you have similar resolution.

UPDATE: I’ve moved to Scale and no such problem. Rock solid too.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
UPDATE: I’ve moved to Scale and no such problem. Rock solid too.
So you are running KVM VMs with Linux as a guest? Care to share some more details?
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
So you are running KVM VMs with Linux as a guest? Care to share some more details?
Hi Patrick. Tried Scale Beta and had initial problems with an Ubuntu VM being able to copy files across the network to the underlying Scale OS or shares. This was solved with bridging, which was also initially a bit fiddly to achieve, but is now easier. Scale version is up to RC.1.2 and my Ubuntu VM is 21.10. I use it primarily to run a WireGuard vpn into my network for those occasions when I need to access my files externally, and it is additionally handy for a connection to my Linux-based satellite and terrestrial TV box. There is an increasing number of kubernetes managed docker applications that work like jails and I’m hoping that a more easily deployed WireGuard app will eventually become available and possibly replace my use of it in the VM.
 
Top