I'm running TrueNAS-SCALE-23.10.1.3 on a physical machine.
Machine specs:
Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
24G ECC RAM
Supermicro X8DTL-i motherboard
Dell H310 Perc flashed to IT mode
I have a HP M1132 printer connected to it via a USB port. I run an Ubuntu Server virtual machine with USB device passthorugh so I can share the printer on my local network via CUPS. The virtual machine has 1CPU/Core/Thread, 1GB RAM, 10GB AHCI virtual hard drive, Intel e1000 virtual NIC and qemu-xhci USB controller for USB device passthrough.
The virtual machine is set to autostart after host reboot but it doesn't. It throws an error:
Don't know how to tell it in proper terms, but the problem is after the host reboots it "forgets" the previous USB path.
For example. Before reboot the "path" is usb_4_2:
After the reboot it's usb 3_2:
When I select this "new" device. The machine starts without any issues.
So I'm looking for a way to force same usb path every time I reboot the host machine. How would I do that? Thanx.
Machine specs:
Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
24G ECC RAM
Supermicro X8DTL-i motherboard
Dell H310 Perc flashed to IT mode
I have a HP M1132 printer connected to it via a USB port. I run an Ubuntu Server virtual machine with USB device passthorugh so I can share the printer on my local network via CUPS. The virtual machine has 1CPU/Core/Thread, 1GB RAM, 10GB AHCI virtual hard drive, Intel e1000 virtual NIC and qemu-xhci USB controller for USB device passthrough.
The virtual machine is set to autostart after host reboot but it doesn't. It throws an error:
Error: Traceback (most recent call last):
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1041, in _escape_attrib
if "&" in text:
^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py", line 45, in _check_add_domain
self._add(self._vm_from_name(vm_name)['id'])
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py", line 16, in _add
self._add_with_vm_data(vm)
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py", line 19, in _add_with_vm_data
self.vms[vm['name']] = VMSupervisor(vm, self.middleware)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py", line 30, in __init__
self.update_domain()
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py", line 66, in update_domain
self.__define_domain()
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py", line 98, in __define_domain
vm_xml = etree.tostring(self.construct_xml()).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1098, in tostring
ElementTree(element).write(stream, encoding,
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 743, in write
serialize(write, self._root, qnames, namespaces,
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 906, in _serialize_xml
_serialize_xml(write, e, qnames, None,
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 906, in _serialize_xml
_serialize_xml(write, e, qnames, None,
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 906, in _serialize_xml
_serialize_xml(write, e, qnames, None,
[Previous line repeated 1 more time]
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 899, in _serialize_xml
v = _escape_attrib(v)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1064, in _escape_attrib
_raise_serialization_error(text)
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1018, in _raise_serialization_error
raise TypeError(
TypeError: cannot serialize None (type NoneType)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 201, 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 1342, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 177, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 44, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_lifecycle.py", line 54, in start
await self.middleware.run_in_thread(self._start, vm['name'])
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1254, 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 1251, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py", line 67, in _start
self._check_add_domain(vm_name)
File "/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py", line 47, in _check_add_domain
raise CallError(f'Unable to define domain for {vm_name}: {e}')
middlewared.service_exception.CallError: [EFAULT] Unable to define domain for PrintServer: cannot serialize None (type NoneType)
Don't know how to tell it in proper terms, but the problem is after the host reboots it "forgets" the previous USB path.
For example. Before reboot the "path" is usb_4_2:
After the reboot it's usb 3_2:
When I select this "new" device. The machine starts without any issues.
So I'm looking for a way to force same usb path every time I reboot the host machine. How would I do that? Thanx.