XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unkown PCI device attached to VM

    Scheduled Pinned Locked Moved Hardware
    4 Posts 3 Posters 153 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      champagnecharly
      last edited by champagnecharly

      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?

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hmm that's interesting. I suppose you can remove it via xe CLI, but XO shouldn't prevent you to remove it.

        Let me ping @Team-XAPI-Network for the xe command to remove this parameter, and ping @bastien-nollet to see how we could get rid of this limitation that blocks removing bogus devices.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          champagnecharly @olivierlambert
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • Bastien NolletB Offline
            Bastien Nollet Vates 🪐 XO Team
            last edited by

            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 file xo-server/dist/xapi-object-to-xo.mjs before the line that start with if (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:

            1 Reply Last reply Reply Quote 0
            • First post
              Last post