Configure SR-IOV adapters
The SR-IOV configuration APIs allow you to configure SR-IOV adapters from PowerVC during deployment of virtual machines on a NovaLink or HMC managed host.
Options for SR-IOV configuration
Method | URI | Description |
---|---|---|
GET | /v2/{tenant_id}/host-sriov |
Lists the SRIOV configuration for all compute hosts on the tenant. |
GET | /v2/{tenant_id}/host-sriov/host_id |
Lists the SRIOV configuration for a host. |
PUT | /v2/{tenant_id}/host-sriov/host_id |
Updates the SRIOV configuration as specified in the request body for a host on the tenant.
The
force parameter overrides warning messages. Default value is
True .Note: Error messages cannot be overridden.
|
The operation finishes configuration of SR-IOV adapter on a NovaLink or HMC managed host.
- Normal response code: 200
- Error response codes: Bad Request (400®), Unauthorized (401), Not Found (404)
{
"host-sriov": [
{
"host_name": "host1",
"physical_ports": [
{
"location_code": "U78C9.001.WN-P1-C7-T1",
"max_logical_ports": 20,
"avail_logical_ports": 14,
"speed": "10Gbps",
"avail_capacity_pct": 80,
"state": "True",
"physical_network_name": "DATA1"
},
{
"location_code": "U78C9.001.WN-P1-C7-T2",
"max_logical_ports": 20,
"avail_logical_ports": 20,
"speed_mb": 10000,
"avail_capacity_pct": 100,
"state": "OK",
"physical_network_name": "DATA2"
}
]
},
{
"host_name": "host2",
"physical_ports": [
{
"location_code": "U78C5.001.WW-P1-C5-T1",
"max_logical_ports": 20,
"avail_logical_ports": 10,
"speed_mb": 10000,
"avail_capacity_pct": 40,
"state": "OK",
"physical_network_name": "DATA1"
}
]
}
]
}
PUT SRIOV configuration
- Allows configuring details of physical network that are associated with physical ports.
- Cannot be used for creating, updating, or deleting Neutron networks. You can perform such operation by using the Neutron network API.
- Cannot be used for creating, updating, or deleting physical ports.
- This operation attempts to be atomic. If one part of the operation fails, the entire operation is rolled back before reporting the error.
- This operation can only be run on a single host at a time. Batch updates that apply to multiple
hosts are explicitly not supported. This is consistent with the rest of the OpenStack APIs.
-- POST
supports batching but PUT does not.
- Normal response code: 200
- Error response codes: Bad Request (400), Unauthorized (401), Not Found (404), Conflict (409)
Update SRIOV configuration
This operation updates the SRIOV configuration
on host1
so that the physical port with location code
U78C9.001.WN-P1-C7-T1
is associated with physical network DATA1
and the physical port with location code U78C9.001.WN-P1-C7-T2
is associated with
the physical network DATA2
. The API might return a 409
(Conflict) in cases where the requested network config might potentially cause an
unexpected disruption, for example, when guest virtual machine connections might be interrupted. In
these cases, the API caller can display the warning message to the user, and call the API again with
the force=true
URL parameter to force the change
through.
{
"host-sriov": [
{
"host_name": "host1",
"physical_ports": [
{
"location_code": "U78C9.001.WN-P1-C7-T1",
"physical_network_name": "DATA1"
},
{
"location_code": "U78C9.001.WN-P1-C7-T2",
"physical_network_name": "DATA2"
}
]
}
]
}
Response JSON
200 (OK)
Update SRIOV configuration - with warning
This operation updates the SRIOV configuration on host1
. The API
warns that this causes a temporary interruption in network traffic, and the action is not completed.
To complete the action, invoke the API again with the same request and add
force=true
as a URL
parameter.
{
"host-sriov": [
{
"host_name": "host1",
"physical_ports": [
{
"location_code": "U78C9.001.WN-P1-C7-T1",
"physical_newtork_name": "NEWDATA"
}
]
}
]
}
Response JSON
409
(Conflict)
{
"warnings": {
"temp.disconnect":
"Warning: This will cause a temporary
interruption in network traffic to your virtual
machines. Are you sure you want to proceed?"
}
}
Update SRIOV configuration - with error
This operation updates the SRIOV configuration on
host1
. The API indicates an error due to the existence of virtual machines already
that use this physical port. The physical network cannot change on a physical port when the port is
in use. Use of force=true
does not override such kind of
error.
{
"host-sriov": [
{
"host_name": "host1",
"physical_ports": [
{
"location_code": "U78C9.001.WN-P1-C7-T1",
"physical_newtork_name": "NEWDATA"
}
]
}
]
}
Response JSON
400 (Bad
Request)
{
"errors": {
"physical.port.in.use":
"Error: The physical port with ID 1 is currently in
use and cannot be updated. Move all VMs off of this
port to update."
}
}