5.4. Postinstallation network configuration
By default, OpenShift Virtualization uses a single internal pod network after installation.
After you install OpenShift Virtualization, you can install networking Operators and configure additional networks.
- You must install the Kubernetes NMState Operator to configure a Linux bridge network for live migration or external access to virtual machines (VMs).
- You can install the SR-IOV Operator to manage SR-IOV network devices and network attachments.
- You can add the MetalLB Operator to manage the lifecycle for an instance of MetalLB on your cluster.
5.4.1. Create a Linux bridge node network configuration policy 링크 복사링크가 클립보드에 복사되었습니다!
You can configure a Linux bridge network for live migration or external access to virtual machines (VMs) by creating a NodeNetworkConfigurationPolicy (NNCP) manifest.
Prerequisites
- You have installed the Kubernetes NMState Operator.
Procedure
Configure the
NNCPmanifest. This example includes sample values that you must replace with your own information.apiVersion: nmstate.io/v1 kind: NodeNetworkConfigurationPolicy metadata: name: br1-eth1-policy spec: desiredState: interfaces: - name: br1 description: Linux bridge with eth1 as a port type: linux-bridge state: up ipv4: enabled: false bridge: options: stp: enabled: false port: - name: eth1-
metadata.name: Defines the name of the node network configuration policy. -
spec.desiredState.interfaces.name: Defines the name of the new Linux bridge. -
spec.desiredState.interfaces.description: Optional field that can be used to define a human-readable description for the bridge. -
spec.desiredState.interfaces.type: Defines the interface type. In this example, the type is a Linux bridge. -
spec.desiredState.interfaces.state: Defines the requested state for the interface after creation. -
spec.desiredState.interfaces.ipv4.enabled: Defines whether the ipv4 protocol is active. Setting this tofalsedisables IPv4 addressing on this bridge. -
spec.desiredState.interfaces.bridge.options.stp.enabled: Defines whether Spanning Tree Protocol (STP) is active. Setting this tofalsedisables STP on this bridge. spec.desiredState.interfaces.bridge.port.name: Defines the node NIC that the bridge is attached to.참고To create the NNCP manifest for a Linux bridge using Open Systems Adapter (OSA) with IBM Z®, you must disable VLAN filtering by the setting the
rx-vlan-filtertofalsein theNodeNetworkConfigurationPolicymanifest.Alternatively, if you have SSH access to the node, you can disable VLAN filtering by running the following command:
$ sudo ethtool -K <osa-interface-name> rx-vlan-filter off
-
Create the
NNCPmanifest:$ oc apply -f linux-bridge-nncp.yaml