Locked out of vm management in 25.4.2

I just updated from 24.something to 25.2.2, but now I’m locked out of managing my VMS. Thankfully they are running, I just can’t change them. The error I’m getting:

root@truenas[~]# midclt call vm.query
4 validation errors for VMQueryResult
result.list[VMQueryResultItem].0.devices.2.attributes.DISPLAY.password
  String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
result.list[VMQueryResultItem].1.devices.2.attributes.DISPLAY.password
  String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
result.VMQueryResultItem
  Input should be a valid dictionary or instance of VMQueryResultItem [type=model_type, input_value=[{'id': 2, 'name': 'Route...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': 2, 'name': 'Route...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: 4 validation errors for VMQueryResult
result.list[VMQueryResultItem].0.devices.2.attributes.DISPLAY.password
  String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
result.list[VMQueryResultItem].1.devices.2.attributes.DISPLAY.password
  String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
result.VMQueryResultItem
  Input should be a valid dictionary or instance of VMQueryResultItem [type=model_type, input_value=[{'id': 2, 'name': 'Route...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': 2, 'name': 'Route...ain_state': 'RUNNING'}}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/int_type

This is a grandfathered vm without password on the display. How do I:

  1. Report this bug properly
  2. Work around it, setting a password? I can’t via GUI because that one gives an error, probably because of this underlying error.

I managed to work around it using the shell by iterating over

idclt call vm.device.get_instance <> (starting at 0, up to in my case 9)

and finding the ones that gave the error. Using the previous device I’d guess the VM ID. Then I ran midclt call vm.stop <>, midclt call vm.device.delete <> and midclt call vm.start <>.

I now have access to my interface again, and can create the displays there again, now with password :tada:

This looks like the known issue described here:

For the record, reporting bugs is most conveniently done using the bug report button at the top of the TrueNAS servers GUI.

1 Like
1 Like