My VM has some kinks

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
MOBO: Supermicro X11SSL-F
CPU: Intel Pentium G4560
RAM: 1x16GB Hynix DDR4 2666MHz Unbuffered ECC
PSU: LC-Power 560W GOLD
BOOT: 1x Seagate IronWolf 250GB SATA SSD (ZA250NM1A002)
STORAGE: 2x Seagate IronWolf 3 TB CMR HDD (ST3000VN007)
So, it has been a while since I put togheter my system and everything works well... except but my Ubuntu VM.
I use this ubuntu VM to run a server for my rpg tabletop game with friends, and I have (apparently) no network issues: I didn't config anything network-side when I setup this and I do have DHCP active in local network. I do have a specific port open in my router in order to let my friends connect with the server, but I don't have UPnP on (and never did, nor plan to!).

I have been experiencing some strange behaviours, namely:
  • Inability to connect with VNC after some time the VM is booted (have yet to identify the exact time);
  • Inability to power off, or reboot, the VM after some time (have yet to identify the exact time) without rebooting the entire system (VM is set to autostart);
When it happens, sometimes I am able to verify via my online server the VM is working as well as access it via SSH, but more often than not it looks just irresponsive.
I suspect this might be thanks to me totally ignoring a proper configuration of something after creating the VM, but I am a bit lost.

Screenshot_1.png
This is the error I get when I try to shutdown the VM:
Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 355, in run
    await self.future
  File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 393, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *([self] + args))
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1154, in run_in_thread
    return await self.run_in_executor(self.thread_pool_executor, method, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1151, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 979, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/vm.py", line 1628, in stop
    vm.stop(vm_data['shutdown_timeout'])
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/vm.py", line 262, in stop
    self.domain.shutdown()
  File "/usr/local/lib/python3.9/site-packages/libvirt.py", line 2916, in shutdown
    raise libvirtError('virDomainShutdown() failed')
libvirt.libvirtError: An error occurred, but the cause is unknown

Please do tell me if you need anything else, iirc the VM was created with 13.0 and my system was updated every time (so no jumps in updates). I appreciate the kindness of those who will help solving this minor issue, or enlight me about anything that should be common-sense regarding VM usage.
 
Last edited:

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I've also experienced this and I'm almost certain it's because you don't have enough RAM. My problems went away when I upgraded from 16 GB to 32 GB. Another workaround is to not use the VNC installed on the OS instead of the VM. Only use the VM VNC just to get to the point where you can install VNC on the Ubuntu VM. Once that's setup, switch full time to the VNC you installed on the VM instead and you should stop seeing this problem.
 
Top