hmc_add_vnic
Add an SR-IOV-backed virtual NIC to an LPAR via HMC CLI, specifying capacity, vSwitch, VLAN, and optional backing devices.
Instructions
Add a vNIC (SR-IOV-backed Virtual NIC) to an LPAR via the HMC CLI.
Runs chhwres -r virtualio --rsubtype vnic -o a -m <system_name> --filter lpar_names=<lpar_name> -a "<attrs>" on the HMC via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
V1 scope boundary: Only the following parameters are supported in
this version: capacity, vswitch_name, port_vlan_id, and
backing_devices (optional, opaque string passed verbatim). Complex
backing-device topology (multi-adapter failover, per-device SR-IOV
physical port IDs, capacity weights) is a follow-up and explicitly out
of scope for v1.
Returns the raw HMC command output on success.
WARNING: This modifies the LPAR configuration on the HMC. Confirm
system_name_or_uuid, lpar_name_or_uuid, and vswitch_name before calling. The
underlying physical adapter must be in SR-IOV mode (see
hmc_set_sriov_adapter_mode).
Raises: HMCCLIError: If the HMC command fails, e.g. because the underlying SR-IOV adapter is not in SR-IOV mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capacity | Yes | ||
| port_vlan_id | Yes | ||
| vswitch_name | Yes | ||
| backing_devices | No | ||
| lpar_name_or_uuid | Yes | ||
| system_name_or_uuid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |