cant create vm : Error while creating the DISPLAY device. [EINVAL] password: Empty value not allowed

skyman48

Cadet
Joined
Oct 15, 2023
Messages
3
cant create new VM with following error

Error while creating the DISPLAY device. [EINVAL] password: Empty value not allowed

Error: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/main.py", line 184, 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 1317, in _call return await methodobj(*prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/service.py", line 940, in create rv = await self.middleware._call( File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1317, in _call return await methodobj(*prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1247, in nf res = await f(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1379, in nf return await func(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_devices.py", line 168, in do_create data = await self.validate_device(data, update=False) File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_devices.py", line 299, in validate_device await self.middleware.run_in_thread(device_obj.validate, device, old, vm_instance, update) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1234, 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 1231, 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/devices/device.py", line 43, in validate verrors.check() File "/usr/lib/python3/dist-packages/middlewared/service_exception.py", line 70, in check raise self middlewared.service_exception.ValidationErrors: [EINVAL] password: Empty value not allowed

Version:
TrueNAS-SCALE-22.12.4.1

I'm trying to follow this tutorial, but cant create the VM

I don't know what Display device settings are involved for creation of vm
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Well, it seems to say: password: Empty value not allowed

Are you entering a password? Instead of following random tutorials that may be out of date or wrong, why not use the official Scale doc?


Note password is in fact required if you enable the display device.
 

skyman48

Cadet
Joined
Oct 15, 2023
Messages
3
Got it.

Compared to Official Scale doc, when enable display is checked, I'm missing the password input box below bind.

1697408202158.png
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Which probably means you are not on current version, 22.12.4.2, the box is there for me on this version but not 22.12.3 or earlier. Doc is for latest version.
 

ceftee

Cadet
Joined
Sep 21, 2023
Messages
5
Which probably means you are not on current version, 22.12.4.2, the box is there for me on this version but not 22.12.3 or earlier. Doc is for latest version.
I updated yesterday to 22.12.4.2 and I also can't see the password field when trying to create a new VM. Update went through without any reported errors or interruptions. I already tried:
- Rebooting the system through shell
- Manually rolling back to the previous version and then manual reinstalling the update

Problem persists. Any ideas?
 

Attachments

  • no_password.png
    no_password.png
    17.8 KB · Views: 104
  • truenasversion.png
    truenasversion.png
    19.5 KB · Views: 114

ceftee

Cadet
Joined
Sep 21, 2023
Messages
5
I updated yesterday to 22.12.4.2 and I also can't see the password field when trying to create a new VM. Update went through without any reported errors or interruptions. I already tried:
- Rebooting the system through shell
- Manually rolling back to the previous version and then manual reinstalling the update

Problem persists. Any ideas?
I was able to find a workaround, but not a fix. Create the VM without a display device and then manually add the display device before starting said VM. Unlike in the VM creation interface, in the Devices menu the password field actually shows up.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Awesome! Must be a bug that doesn't affect everyone then. Maybe people who migrated from certain versions, who knows, but glad you found a workaround!
 

JinxSwe

Cadet
Joined
Nov 6, 2023
Messages
1
I was able to find a workaround, but not a fix. Create the VM without a display device and then manually add the display device before starting said VM. Unlike in the VM creation interface, in the Devices menu the password field actually shows up.

Having the same problem. How did you install a VM without display?
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
You could also try to use spice instead of vnc for the vm creation and then switch the display device to vnc from spice before starting the vm so you'd get the password promt.
 

ceftee

Cadet
Joined
Sep 21, 2023
Messages
5
Having the same problem. How did you install a VM without display?
You don’t really “install” anything, you just create a VM as you would normally do, but you uncheck the option to add a display, since it is not really required for the purpose of creating a VM. If you are talking about installing an OS in your new “displayless” VM, you just go to the Devices menu and add a new display. In this field the password bracket will actually show up.

Despite all this, I created a new VM yesterday to try a Pi-hole Recursive DNS server and now the password field is actually present on the VM creation interface. I made absolutely no changes in my system to justify this, just kinda fixed itself.
 

JustToAnswer

Cadet
Joined
Nov 16, 2023
Messages
2
I had just updated my system to OS Version:TrueNAS-SCALE-22.12.4.2. I attempted to create some virtual machines with different combinations of spice/vlc but each time was greeted by the same error message as skyman48. After testing a few more things I decided to reboot truenas. After the reboot there was now a password field available to enter a password. I hate to say it but in this case it looks like a reboot resolved this problem in my case. Hope it helps some of you.
 

BKman

Cadet
Joined
Aug 8, 2023
Messages
4
Well, I have the same issue. Just updated to TrueNAS-SCALE-23.10.0.1 - still have no password field in the UI. Tried both VNC and SPICE.

Used the workaround above to create a display device, specified the password there.

The VM started fine, I even got an arpwatch notification that it booted up and obtained an IP address. However, when I click the Display button to access the UI, the server reports following in the JS console:
Object { error: 11, errname: "EAGAIN", type: "VALIDATION", reason: "[EINVAL] options.devices_passwords: Field was not expected\n"
 

BKman

Cadet
Joined
Aug 8, 2023
Messages
4
It was the browser's cache (Firefox if that matters). Once I performed the hard TrueNAS web ui refresh, everything appeared and started working as it should.
 
Top