SOLVED Can't get rid of a unused VM that was on a deleted pool, this VM still shows up in the GUI

titust1

Explorer
Joined
May 10, 2022
Messages
66
Hi everyone,
I am trying to delete all traces of an old unused VM, but I can't. This VM had the drive on a Pool that does not exist anymore.
In the CLI I tried:
Code:
[diskstation]> service vm delete 1
Error: This system does not support virtualization.
Any idea? If I want to delete it in the GUI, I get this:
Code:
Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 175, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1257, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/service.py", line 942, in delete
    rv = await self.middleware._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1257, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1129, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1261, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vms.py", line 391, in do_delete
    await self.middleware.run_in_thread(self._check_setup_connection)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1172, in run_in_thread
    return await self.run_in_executor(self.thread_pool_executor, method, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1169, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/connection.py", line 64, in _check_setup_connection
    self._check_connection_alive()
  File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/connection.py", line 57, in _check_connection_alive
    self._system_supports_virtualization()
  File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/connection.py", line 54, in _system_supports_virtualization
    raise CallError('This system does not support virtualization.')
middlewared.service_exception.CallError: [EFAULT] This system does not support virtualization.
I don't know how to get rid of this unused VM. This VM was saved somehow in the Truenas .tar configuration that I saved, besides the pool information
 

titust1

Explorer
Joined
May 10, 2022
Messages
66
I managed to find the reason I got the message: "This system does not support virtualization" when trying to delete the VM.
I thought that was because the Pool that contained the VM zvol was deleted, prior to delete the VM. But it was something else.
This is in fact because my Truenas Scale installation is virtualized now in Proxmox. And Proxmox was not enabled for Nested Virtualization.
To enable Nested Virtualization you have to do the following in Proxmox:
1. Make sure /sys/module/kvm_intel/parameters/nested contains "Y"
2. The Truenas guest VM has the CPU type set to "host"
I did change the above (point 2.) and then I was able to delete my ghost unused VM.
Hoping that this might help someone in the future.....
 
Top