libvirtError XML error: Hostdev already exists in the domain configuration

TrueNAS-SCALE-23.10.2
After duplicating a vm I am unable to use any vms:

When clicking on the Virtualisation sidebar I get an error:
libvirtError XML error: Hostdev already exists in the domain configuration
More. Info…
(the last. part)
self.__define_domain()
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py”, line 99, in __define_domain
if not self.LIBVIRT_CONNECTION.defineXML(vm_xml):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/libvirt.py”, line 4495, in defineXML
raise libvirtError(‘virDomainDefineXML() failed’)
libvirt.libvirtError: XML error: Hostdev already exists in the domain configuration

After which the VM window appears is empty and just have spinning circle. I don’t see the original vm or the copy.

Any help would be greatly appreciated.

I am on 24.10 and got the same error. I got it after trying to mess with GPU passthrough to the VM. I checked the “devices” tab (after rebooting the TrueNAS instance) and saw there were multiple extraneous PCIE devices listed, all with the same device order #. I deleted all of the PCIE devices and the VM started fine.

Is there any solution on the command line? The UI only gives me that error “XML error: Hostdev already exists in the domain configuration” and does not even show ANY VM anymore.