10.8.3. Connecting a virtual machine to an SR-IOV network by using the CLI


You can connect the virtual machine (VM) to the SR-IOV network by including the network details in the VM configuration.

Prerequisites

  • You have installed the OpenShift CLI (oc).

Procedure

  1. Add the SR-IOV network details to the spec.domain.devices.interfaces and spec.networks stanzas of the VM configuration as in the following example:

    apiVersion: kubevirt.io/v1
    kind: VirtualMachine
    metadata:
      name: example-vm
    spec:
      domain:
        devices:
          interfaces:
          - name: nic1
            sriov: {}
      networks:
      - name: nic1
        multus:
            networkName: sriov-network
    # ...
    • spec.template.spec.domain.devices.interfaces.name specifies a unique name for the SR-IOV interface.
    • spec.template.spec.networks.name specifies the name of the SR-IOV interface. This must be the same as the interfaces.name that you defined earlier.
    • spec.template.spec.networks.multus.networkName specifies the name of the SR-IOV network attachment definition.
  2. Apply the virtual machine configuration:

    $ oc apply -f <vm_sriov>.yaml

    where:

    <vm_sriov>
    Specifies the name of the virtual machine YAML file.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る