<a id="devices-infiniband"></a>

# Type: `infiniband`


            <p class="youtube_link">
              <a href="https://www.youtube.com/watch?v=SDewhlRSOuM" target="_blank">
                <span title="LXD InfiniBand devices - YouTube" class="play_icon">▶</span>
                <span title="LXD InfiniBand devices - YouTube">Watch on YouTube</span>
              </a>
            </p>
        
#### NOTE
The `infiniband` device type is supported for both containers and VMs.
It supports hotplugging only for containers, not for VMs.

LXD supports two different kinds of network types for InfiniBand devices:

- `physical`: Passes a physical device from the host through to the instance.
  The targeted device will vanish from the host and appear in the instance.
- `sriov`: Passes a virtual function of an SR-IOV-enabled physical network device into the instance.

  #### NOTE
  InfiniBand devices support SR-IOV, but in contrast to other SR-IOV-enabled devices, InfiniBand does not support dynamic device creation in SR-IOV mode.
  Therefore, you must pre-configure the number of virtual functions by configuring the corresponding kernel module.

## Device options

`infiniband` devices have the following device options:

<!-- Include content from [../metadata.txt](../metadata.txt) -->

<a id="device-infiniband-device-conf:hwaddr"></a>
`hwaddr`

MAC address of the new interface

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#device-infiniband-device-conf:hwaddr)

| **Key:**      | `hwaddr`          |
|---------------|-------------------|
| **Type:**     | string            |
| **Default:**  | randomly assigned |
| **Required:** | no                |

You can specify either the full 20-byte variant or the short 8-byte variant (which will modify only the last 8 bytes of the parent device).

<a id="device-infiniband-device-conf:mtu"></a>
`mtu`

MTU of the new interface

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#device-infiniband-device-conf:mtu)

| **Key:**      | `mtu`      |
|---------------|------------|
| **Type:**     | integer    |
| **Default:**  | parent MTU |
| **Required:** | no         |

<a id="device-infiniband-device-conf:name"></a>
`name`

Name of the interface inside the instance

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#device-infiniband-device-conf:name)

| **Key:**      | `name`          |
|---------------|-----------------|
| **Type:**     | string          |
| **Default:**  | kernel assigned |
| **Required:** | no              |

<a id="device-infiniband-device-conf:nictype"></a>
`nictype`

Device type

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#device-infiniband-device-conf:nictype)

| **Key:**      | `nictype`   |
|---------------|-------------|
| **Type:**     | string      |
| **Required:** | yes         |

Possible values are `physical` and `sriov`.

<a id="device-infiniband-device-conf:parent"></a>
`parent`

The name of the host device or bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#device-infiniband-device-conf:parent)

| **Key:**      | `parent`   |
|---------------|------------|
| **Type:**     | string     |
| **Required:** | yes        |

## Configuration examples

Add a `physical` `infiniband` device to an instance:

```none
lxc config device add <instance_name> <device_name> infiniband nictype=physical parent=<device>
```

Add an `sriov` `infiniband` device to an instance:

```none
lxc config device add <instance_name> <device_name> infiniband nictype=sriov parent=<sriov_enabled_device>
```

See [Configure devices](https://canonical.com/lxd/docs/default/howto/instances_configure/index.html.md#instances-configure-devices) for more information.
