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 the primary user-defined network by using the web console
8
+
9
+
You can connect a virtual machine (VM) to the primary user-defined network (UDN) by using the {product-title} web console.
10
+
11
+
.Prerequisites
12
+
* You are logged into the {product-title} web console.
13
+
14
+
.Procedure
15
+
. Optional: If you want to use the Plug a Simple Socket Transport (passt) network binding plugin, follow these steps to enable the Technology Preview feature:
16
+
17
+
.. From the *Virtualization* perspective, click *Overview*.
18
+
19
+
.. On the *Virtualization* page, click the *Settings* tab.
20
+
21
+
.. Click *Preview features* and set *Enable Passt binding for primary user-defined networks* to on.
22
+
23
+
. From the *Virtualization* perspective, click *VirtualMachines*.
24
+
25
+
. Select a VM to open the *VirtualMachine details* page.
26
+
27
+
. Click the *Configuration* tab.
28
+
29
+
. Click *Network*.
30
+
31
+
. Click the Options menu {kebab} on the *Network interfaces* page and select *Edit*.
32
+
33
+
. In the *Edit network interface* dialog, select the default pod network attachment from the *Network* list.
34
+
35
+
. Expand *Advanced* and then select the *Passt* binding.
36
+
37
+
. Click *Save*.
38
+
39
+
. If your VM is running, restart it for the changes to take effect.
Copy file name to clipboardExpand all lines: modules/virt-attaching-vm-to-primary-udn.adoc
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,16 @@ You can connect a virtual machine (VM) to the primary user-defined network (UDN)
12
12
* You have installed the OpenShift CLI (`oc`).
13
13
14
14
.Procedure
15
+
. Optional: If you want to use the Plug a Simple Socket Transport (passt) network binding plugin, set the `hco.kubevirt.io/deployPasstNetworkBinding` annotation to `true` in the `HyperConverged` custom resource (CR) by running the following command:
. Edit the `VirtualMachine` manifest to add the UDN interface details, as in the following example:
16
23
+
17
-
.Example `VirtualMachine` manifest
24
+
*Example `VirtualMachine` manifest*
18
25
[source,yaml]
19
26
----
20
27
apiVersion: kubevirt.io/v1
@@ -39,7 +46,7 @@ spec:
39
46
----
40
47
<1> The namespace in which the VM is located. This value must match the namespace in which the UDN is defined.
41
48
<2> The name of the user-defined network interface.
42
-
<3> The name of the binding plugin that is used to connect the interface to the VM. The required value is `l2bridge`.
49
+
<3> The name of the binding plugin that is used to connect the interface to the VM. The possible values are `l2bridge` and `passt`. The default value is `l2bridge`.
43
50
<4> The name of the network. This must match the value of the `spec.template.spec.domain.devices.interfaces.name` field.
44
51
45
52
. Apply the `VirtualMachine` manifest by running the following command:
* xref:../../virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc#virt-creating-udn-namespace-cli_virt-connecting-vm-to-primary-udn[Create namespaces that are associated with the cluster-scoped UDN]
== Attaching a virtual machine to the primary user-defined network
64
+
65
+
You can connect a virtual machine (VM) to the primary user-defined network (UDN) by requesting the pod network attachment, and configuring the interface binding.
66
+
67
+
{VirtProductName} supports the following network binding plugins to connect the network interface to the VM:
68
+
69
+
`l2bridge`:: The Layer 2 bridge binding creates a direct Layer 2 connection between the VM's virtual network and the host's virtual switch, which is then attached to a physical interface or a VLAN. This binding places the VM on the same network as the host, allowing it to obtain an IP address from the same DHCP server and share the host's physical network connection.
70
+
71
+
`passt`:: The Plug a Simple Socket Transport (passt) binding translates Layer 2 network frames from a VM into Layer 4 sockets on the host machine. It provides a user-space networking solution that avoids needing special privileges for VMs that need network access but should not be directly exposed to the host network's Layer 2.
72
+
+
73
+
Passt binding has the following benefits:
74
+
75
+
* You can define readiness and liveness probes to configure VM health checks.
76
+
* You can use Red Hat Advanced Cluster Security to monitor TCP traffic within the cluster.
77
+
78
+
:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
0 commit comments