Skip to main content
Resource Center/Hardware/Host Operations/PCI Device Operations
GETPCI Device OperationsSince 2.1SynchronousAuth Required

GetPciDeviceCandidatesForAttachingVm

GetPciDeviceCandidatesForAttachingVm

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Query Parameters

Request Inputs

Path Parameters

  • vmInstanceUuidStringRequired

    The VM instance UUID.

Query Parameters

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

  • typesList

    Optional. The types.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoriesListRequired

    See inventories.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • hostUuidStringRequired

      The host UUID.

    • parentUuidStringRequired

      The UUID of the physical PCI device.

    • vmInstanceUuidStringRequired

      The VM instance UUID.

    • pciSpecUuidStringRequired

      The UUID of the PCI device specification.

    • vendorIdStringRequired

      The vendor ID.

    • deviceIdStringRequired

      The device ID.

    • subvendorIdStringRequired

      The sub-vendor ID.

    • subdeviceIdStringRequired

      The sub-device ID.

    • pciDeviceAddressStringRequired

      The PCI device address.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • typePciDeviceTypeRequired

      See type.

      • GPU_Video_ControllerPciDeviceTypeRequired

        The GPU video controller.

      • GPU_Audio_ControllerPciDeviceTypeRequired

        The GPU audio controller.

      • GPU_3D_ControllerPciDeviceTypeRequired

        The GPU 3D controller.

      • Moxa_DevicePciDeviceTypeRequired

        The MOXA card.

      • GenericPciDeviceTypeRequired

        The general device.

    • statePciDeviceStateRequired

      See state.

      • EnabledPciDeviceStateRequired

        The PCI device is enabled.

      • DisabledPciDeviceStateRequired

        The PCI device disabled.

    • statusPciDeviceStatusRequired

      See status.

      • ActivePciDeviceStatusRequired

        The PCI device is active.

      • AttachedPciDeviceStatusRequired

        The PCI device is attached.

      • SystemPciDeviceStatusRequired

        The PCI device is managed by the system.

    • virtStatusPciDeviceVirtStatusRequired

      See virtStatus.

      • UNVIRTUALIZABLEPciDeviceVirtStatusRequired

        Cannot be virtualized.

      • SRIOV_VIRTUALIZABLEPciDeviceVirtStatusRequired

        Supports SR-IOV.

      • VFIO_MDEV_VIRTUALIZABLEPciDeviceVirtStatusRequired

        Supports VFIO MDEV.

      • SRIOV_VIRTUALIZEDPciDeviceVirtStatusRequired

        Has been virtualized by SR-IOV.

      • VFIO_MDEV_VIRTUALIZEDPciDeviceVirtStatusRequired

        Has been virtualized by VFIO MDEV.

      • SRIOV_VIRTUALPciDeviceVirtStatusRequired

        The SR-IOV device.

      • UNKNOWNPciDeviceVirtStatusRequired

        The status is unknown.

    • metaDataPciDeviceMetaDataRequired

      See metadata.

      • metaDataStringRequired

        元数据。

      • metaDataEntriesListRequired

        See metaDataEntries.

        • keyStringRequired

          The key.

        • valueStringRequired

          The value.

        • opPciDeviceMetaDataOperatorRequired

          See op.

          • EqualPciDeviceMetaDataOperatorRequired

            The equal operator.

          • UnequalPciDeviceMetaDataOperatorRequired

            The not equal operator.

    • matchedPciDeviceOfferingRefListRequired

      See matchedPciDeviceOfferingRef.

      • pciDeviceUuidStringRequired

        No description provided.

      • pciDeviceOfferingUuidStringRequired

        No description provided.

    • mdevSpecRefsListRequired

      See mdevSpecRefs.

      • pciDeviceUuidStringRequired

        The PCI device UUID.

      • mdevSpecUuidStringRequired

        The UUID of the MDEV device specification.

      • effectiveBooleanRequired

        Whether the current MDEV device specification is used to segment the PCI device.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

  • errorErrorCodeRequired

    See error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

Endpoint

GET/zstack/v1/vm-instances/{vmInstanceUuid}/candidate-pci-devices

/zstack/v1/vm-instances/{vmInstanceUuid}/candidate-pci-devices

Operation ID

GetPciDeviceCandidatesForAttachingVm

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/vm-instances/{vmInstanceUuid}/candidate-pci-devices?systemTags=<systemTags>&userTags=<userTags>&types=<types>' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "99bc47cf68e340a1b0a85c874637ec7b", "hostUuid": "f853669ede9c4699bdff97e30d91235b", "status": "Attached", "type": "GPU_Video_Controller", "vendorId": "10de", "deviceId": "0e0f", "subvendorId": "10de", "subdeviceId": "118b", "pciDeviceAddress": "0000:06:00.1" } ] }

Change History

This API has no change history records yet.

View all change history