Wednesday, 25 February 2026
Fix to view VM on Truenas Fangtooth
This fix will solve this problem whereby the VM list do not appear on the UI:
midclt call vm.query
3 validation errors for VMQueryResult
result.list[VMQueryResultItem].8.devices.1.attributes.CDROM.path
String should match pattern '^/mnt/[^{}]*$' [type=string_pattern_mismatch, input_value='/mnt', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/string_pattern_mismatch
result.VMQueryResultItem
Input should be a valid dictionary or instance of VMQueryResultItem [type=model_type, input_value=[{'id': 6, 'name': 'unica...ain_state': 'RUNNING'}}], input_type=list]
For further information visit https://errors.pydantic.dev/2.9/v/model_type
result.int
Input should be a valid integer [type=int_type, input_value=[{'id': 6, 'name': 'unica...ain_state': 'RUNNING'}}], input_type=list]
For further information visit https://errors.pydantic.dev/2.9/v/int_type
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py", line 323, in process_method_call
result = await method.call(app, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 61, in call
return await self._dump_result(app, methodobj, result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 64, in _dump_result
return self.middleware.dump_result(self.serviceobj, methodobj, app, result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 819, in dump_result
return serialize_result(new_style_returns_model, result, expose_secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/api/base/handler/result.py", line 13, in serialize_result
return model(result=result).model_dump(
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pydantic/main.py", line 212, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 3 validation errors for VMQueryResult
result.list[VMQueryResultItem].8.devices.1.attributes.CDROM.path
String should match pattern '^/mnt/[^{}]*$' [type=string_pattern_mismatch, input_value='/mnt', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/string_pattern_mismatch
result.VMQueryResultItem
Input should be a valid dictionary or instance of VMQueryResultItem [type=model_type, input_value=[{'id': 6, 'name': 'unica...ain_state': 'RUNNING'}}], input_type=list]
For further information visit https://errors.pydantic.dev/2.9/v/model_type
result.int
Input should be a valid integer [type=int_type, input_value=[{'id': 6, 'name': 'unica...ain_state': 'RUNNING'}}], input_type=list]
For further information visit https://errors.pydantic.dev/2.9/v/int_type
Reference : https://forums.truenas.com/t/locked-out-of-vm-management-in-25-4-2/49383
Run the command
for i in {0..100}; do midclt call vm.device.get_instance "$i"; done 1> device.log 2>&1
View the device.log and see which id has errors (id is the next one after the successful id):
vi device.log
Check to ensure the id has error
midclt call vm.device.get_instance 68
Delete the device
midclt call vm.device.delete 68
Check it no longer exists:
midclt call vm.device.get_instance 68
[ENOENT] ALL: VMDevice 68 does not exist
Check in the UI to see if you can see the VMs now.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment