Unable to start VM after TrueNAS 12 upgrade

neomilium

Cadet
Joined
Nov 26, 2020
Messages
2
Hi,

I just upgraded my «FreeNAS mini» appliance from FreeNAS 11.3 to TrueNAS 12 and I not able to start my VM anymore.

Using the GUI, the error is a bit obscure to me:

Code:
Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method
result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1202, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1106, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, 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 1533, in start
self.vms[vm['name']].start(vm_data=vm)
KeyError: 'debian'


Does anyone know how to fix it? I searched if a similar error occurred to anybody else, without success.

Additionally, how to handle GUI-created VMs using CLI?

Thanks
 

neomilium

Cadet
Joined
Nov 26, 2020
Messages
2
I found a workaround to be able to use this VM again:
  1. I receated a VM using the zvol used by the VM which is not able to start
  2. After setting back all devices, I started this new VM
  3. I fixed the network due to interface MAC changes (it was probably possible to copy and paste MAC address from old config but did not test it)
  4. Back to TrueNAS GUI, I deleted the old configuration ; Please note I was forced to delete VNC device on old VM and to check "Force delete" during deletion.
My VM is back to life, so its OK for me.

PS: I did not find how to change the title of this topic to flag it as "solved". Do I miss something?
 
Top