You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Attaching a virtual machine to an additional network in the CLI
8
8
9
-
Attach a virtual machine to a secondary network by adding a bridge interface and specifying a network attachment definition in the virtual machine configuration.
9
+
Attach a virtual machine to an additional network by adding a bridge interface and specifying a network attachment definition in the virtual machine configuration.
10
10
11
11
This procedure uses a YAML file to demonstrate editing the configuration and applying the updated file to the cluster. You can alternatively use the `oc edit <object> <name>` command to edit an existing virtual machine.
12
12
@@ -16,36 +16,37 @@ This procedure uses a YAML file to demonstrate editing the configuration and app
16
16
17
17
.Procedure
18
18
19
-
. Create or edit a virtual machine configuration that you want to connect to the bridge network. Add the bridge interface to the `spec.template.spec.domain.devices.interfaces` list and the network attachment definition to the `spec.template.spec.networks` list. The name of the `interfaces` entry must be the same as the `networks` entry. The following example adds a bridge interface called `bridge-net` that connects to the `a-bridge-network` network attachment definition:
19
+
. Create or edit a configuration of a virtual machine that you want to connect to the bridge network.
20
+
. Add the bridge interface to the `spec.template.spec.domain.devices.interfaces` list and the network attachment definition to the `spec.template.spec.networks` list. This example adds a bridge interface called `bridge-net` that connects to the `a-bridge-network` network attachment definition:
<2> The name of the network. This value must match the `name` value of the corresponding `spec.template.spec.domain.devices.interfaces` entry.
48
-
<3> The name of the network attachment definition, prefixed by the namespace where it exists. The namespace must be either the `default` namespace or the same namespace where the VM is to be created.
49
+
<3> The name of the network attachment definition, prefixed by the namespace where it exists. The namespace must be either the `default` namespace or the same namespace where the VM is to be created. In this case, `multus` is used. Multus is a cloud network interface (CNI) plug-in that allows multiple CNIs to exist so that a pod or virtual machine can use the interfaces it needs.
= Creating a Linux bridge network attachment definition in the CLI
8
8
9
-
As a network administrator, you can configure a network attachment definition of type `cnv-bridge` to provide Layer-2 networking to pods and virtual machines.
9
+
As a network administrator, you can configure a network attachment definition of type `cnv-bridge` to provide layer-2 networking to pods and virtual machines.
10
10
11
11
.Prerequisites
12
12
13
13
* The node must support nftables and the `nft` binary must be deployed to enable MAC spoof check.
14
14
15
15
.Procedure
16
16
17
-
. Create a network attachment definition manifest.
18
-
The manifest must have the following contents, modified to match your configuration:
17
+
. Create a network attachment definition in the same namespace as the virtual machine.
18
+
19
+
. Add the virtual machine to the network attachment definition, as in the following example:
<5> The name of the Linux bridge configured on the node.
43
44
<6> Optional: Flag to enable MAC spoof check. When set to `true`, you cannot change the MAC address of the pod or guest interface. This attribute provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
44
45
<7> Optional: The VLAN tag. No additional VLAN configuration is required on the node network configuration policy.
46
+
+
47
+
[NOTE]
48
+
====
49
+
A Linux bridge network attachment definition is the most efficient method for connecting a virtual machine to a VLAN.
* Verify that the network attachment definition is created by running either `oc get network-attachment-definition <name>` or `oc get net-attach-def <name>`. For example:
62
+
* Verify that the network attachment definition was created by running the following command:
57
63
+
58
64
[source,terminal]
59
65
----
60
-
$ oc get network-attachment-definition <a-bridge-network> <1>
66
+
$ oc get network-attachment-definition <bridge-network>
61
67
----
62
-
<1> Where `<a-bridge-network>` is the name specified in the network attachment definition config.
= Creating a Linux bridge network attachment definition in the web console
10
9
11
10
Network administrators can create network attachment definitions to provide layer-2 networking to pods and virtual machines.
12
11
13
12
.Procedure
14
13
15
14
. In the web console, click *Networking*->*Network Attachment Definitions*.
16
-
. Click *Create Network Attachment Definition* .
15
+
. Click *Create Network Attachment Definition*.
16
+
+
17
+
[NOTE]
18
+
====
19
+
The network attachment definition must be in the same namespace as the pod or virtual machine.
20
+
====
21
+
+
17
22
. Enter a unique *Name* and optional *Description*.
18
23
. Click the *Network Type* list and select *CNV Linux bridge*.
19
24
. Enter the name of the bridge in the *Bridge Name* field.
20
25
. Optional: If the resource has VLAN IDs configured, enter the ID numbers in the *VLAN Tag Number* field.
21
-
. Optional: Select the *MAC Spoof Check* checkbox to enable MAC spoof filtering. This feature provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
26
+
. Optional: Select *MAC Spoof Check* to enable MAC spoof filtering. This feature provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
22
27
. Click *Create*.
28
+
+
29
+
[NOTE]
30
+
====
31
+
A Linux bridge network attachment definition is the most efficient method for connecting a virtual machine to a VLAN.
= Creating a Linux bridge using a node network configuration policy
6
+
[id="virt-creating-linux-bridge-nncp_{context}"]
8
7
9
-
As a network administrator, you can create a Linux bridge interface on nodes in the cluster by applying a `NodeNetworkConfigurationPolicy` manifest to the cluster.
8
+
= Creating a Linux bridge node network configuration policy
10
9
11
-
.Procedure
10
+
Use a `NodeNetworkConfigurationPolicy` manifest YAML file to create the Linux bridge.
12
11
13
-
. Create the `NodeNetworkConfigurationPolicy` manifest. This YAML file is an example of a manifest for a Linux bridge interface.
14
-
It includes samples values that you must replace with your own information.
12
+
.Procedure
15
13
14
+
* Create the `NodeNetworkConfigurationPolicy` manifest. This example includes sample values that you must replace with your own information.
15
+
+
16
16
[source,yaml]
17
17
----
18
18
apiVersion: nmstate.io/v1
@@ -40,6 +40,6 @@ spec:
40
40
<3> Optional: Human-readable description of the interface.
41
41
<4> The type of interface. This example creates a bridge.
42
42
<5> The requested state for the interface after creation.
Copy file name to clipboardExpand all lines: virt/live_migration/virt-migrating-vm-on-secondary-network.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
:_content-type: ASSEMBLY
2
2
[id="virt-migrating-vm-on-secondary-network"]
3
-
= Migrating a virtual machine over a dedicated secondary network
3
+
= Migrating a virtual machine over a dedicated additional network
4
4
include::_attributes/common-attributes.adoc[]
5
5
:context: virt-migrating-vm-on-secondary-network
6
6
7
7
toc::[]
8
8
9
-
You can configure a dedicated xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[secondary Multus network] for live migration. A dedicated network minimizes disruption to tenant workloads due to network saturation when virtual machine live migration is triggered.
9
+
You can configure a dedicated xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[Multus network] for live migration. A dedicated network minimizes the effects of network saturation on tenant workloads during live migration.
Copy file name to clipboardExpand all lines: virt/virt-learn-more-about-openshift-virtualization.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Use the following tables to find content to help you learn about and use {VirtPr
46
46
|Learn |Deploy |Manage |Use
47
47
48
48
| xref:../virt/about-virt.adoc#about-virt[Learn about {VirtProductName}]
49
-
| Connecting virtual machines to the xref:../virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc#virt-using-the-default-pod-network-with-virt[default pod network for virtual machines] and xref:../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[multiple networks]
49
+
| Connecting virtual machines to the xref:../virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc#virt-using-the-default-pod-network-with-virt[default pod network for virtual machines] and xref:../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[external networks]
50
50
| xref:../virt/install/virt-enabling-virtctl.adoc#virt-enabling-virtctl[Enabling the `virtctl` client]
51
51
| xref:../migration_toolkit_for_containers/about-mtc.adoc#about-mtc[Importing virtual machines with the Migration Toolkit for containers]
Copy file name to clipboardExpand all lines: virt/virtual_machines/advanced_vm_management/virt-configuring-pxe-booting.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,12 @@ image from a PXE server when deploying a new host.
14
14
15
15
== Prerequisites
16
16
17
-
* A Linux bridge must be xref:../../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[connected].
17
+
* A Linux bridge must be xref:../../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[connected].
18
18
19
19
* The PXE server must be connected to the same VLAN as the bridge.
0 commit comments