Unkown PCI device attached to VM
-
As per title i have an unkown PCI showing in list. When i attempt to remove i get "invalid Parameter" error.
Whilst its doing no harm, its rather annoying and i'd like to remove it.listing the already attached devices, the change in the response is :
When only the unknown device is attached:
other-config (MRW): pci: 0/;And when one other.
other-config (MRW): pci: 0/,0/0000:03:00.0;The log in settings is:
vm.detachPcis { "id": "30c58e43-cbd0-5ceb-55ac-2f6a8ae547c8", "pciIds": [ "" ] } { "code": 10, "data": { "errors": [ { "instancePath": "/pciIds/0", "schemaPath": "#/properties/pciIds/items/minLength", "keyword": "minLength", "params": { "limit": 1 }, "message": "must NOT have fewer than 1 characters" } ] }, "message": "invalid parameters", "name": "XoError", "stack": "XoError: invalid parameters at Module.invalidParameters (/opt/xo/xo-builds/xen-orchestra-202507061258/packages/xo-common/api-errors.js:26:11) at Xo.call (file:///opt/xo/xo-builds/xen-orchestra-202507061258/packages/xo-server/src/xo-mixins/api.mjs:121:22) at Api.#callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202507061258/packages/xo-server/src/xo-mixins/api.mjs:409:19)" }Any ideas of how to get rid of this phantom device?
-
Hmm that's interesting. I suppose you can remove it via
xeCLI, but XO shouldn't prevent you to remove it.Let me ping @Team-XAPI-Network for the
xecommand to remove this parameter, and ping @bastien-nollet to see how we could get rid of this limitation that blocks removing bogus devices. -
@olivierlambert Thanks! Very little time/ learning progress had been made/spent on this VM so I have gone ahead and created a new VM. The VM with the mysterious device still exists. So it would be interesting to know how but not essential.
-
Hi @champagnecharly ,
On the XO side, it seems that this PCI has an empty string ID, which doesn't enable us to delete it.
We'll have to do some tests to find out how to prevent that.We might have trouble reproducing the issue, so would you mind helping us with the tests?
You would need to add this piece of code on filexo-server/dist/xapi-object-to-xo.mjsbefore the line that start withif (isHvm) {(that should be near line 475)if ((_vm$attachedPcis = vm.attachedPcis) !== null && _vm$attachedPcis !== void 0 && _vm$attachedPcis.includes('')) { warn('Empty string PCI id:', otherConfig.pci); }then restart xo-server and look at the output of
journalctl, there should be some lines looking like:2026-01-30T09:26:17.763Z xo:server:xapi-objects-to-xo WARN Empty string PCI id: