TrueNAS 12 Windows 10 VM wont start/stop after update

The Presence

Cadet
Joined
Nov 17, 2020
Messages
8
Deployed my TrueNAS system and migrated all my data from my legacy NAS system. Seems to work well, although still working through configurations.
Installed a linux VM based on ubuntu 20.04 LTS with no trouble.
Installed a Window VM based on Windows 10 pro, and although it installs fine, once I update the VM using the windows standard tooling (Check for Update/WSUS), the updates install, but after rebooting, the web VNC session closes with "Failed to connect to server", and it appears that the system is hung in a bad state.
Attempting to stop the VM through the UI gives the following error:
Code:
[2020/11/16 23:02:54] (ERROR) middlewared.job.run():373 - Job <bound method accepts.<locals>.wrap.<locals>.nf of <middlewared.plugins.vm.VMService object at 0x81cb20b50>> failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
    await self.future
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 399, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *([self] + args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/vm.py", line 1585, in restart
    self.vms[vm['name']].restart(vm_data=vm, shutdown_timeout=vm['shutdown_timeout'])
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/vm.py", line 261, in restart
    self.stop(shutdown_timeout)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/vm.py", line 251, in stop
    self.domain.shutdown()
  File "/usr/local/lib/python3.8/site-packages/libvirt.py", line 2659, in shutdown
    if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self)
libvirt.libvirtError: An error occurred, but the cause is unknown


mdiclt shows it running, but its definitely not working. Attempting to stop it with mdiclt returns a PID, but doesn't stop the VM.
midclt call vm.status 2
{"state": "RUNNING", "pid": 5857, "domain_state": "RUNNING"}

Rebooting the NAS doesn't resolve the issue, it tries to boot the VM, and before long, it disconnects from VNC as before and I'm back to the wedged state.

I've changed two things in the VM, aside from updating it:
1) The system name
2) Enabled RDP

Any ideas on this? Searching didn't bring anything up other than some clues as to how mdiclt works.
 

The Presence

Cadet
Joined
Nov 17, 2020
Messages
8
In case there are questions of the config for the VM, I used the default settings (4GB ram, 2 virtual procs, 40GB HD).

Code:
Virtual CPUs:
2

Cores:
1

Threads:
1

Memory Size:
4.00 GiB

Boot Loader Type:
UEFI

System Clock:
LOCAL

VNC Port:
31356

Com Port:
/dev/nmdm2B

Description:
Windows 10 VM (Blue Iris, etc)

Shutdown Timeout:
90 seconds
 

The Presence

Cadet
Joined
Nov 17, 2020
Messages
8
Follow up.
If I "Power Down" then "Restart" and then "Start" the VM starts. It appears that the windows VM has this issue upon system reboot as well. Quite frustrating. Any idea where within the logging subsystem can be reviewed to determine failure root cause? Messages contains nothing useful (other than perhaps vnic down), middlewared.log has limited useful info.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
I was unable to get TrueNAS on Hyper V to work with UEFI. I have it installed using Legacy mode on Windows 10 Pro and Win Server 2019 and have no issues.
 
Top