Skip to content

Commit 55b28d0

Browse files
author
Shikha Jhala
committed
CNV-52860: Passt binding for primary UDNs
1 parent 288cefe commit 55b28d0

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-attaching-vm-to-primary-udn-web_{context}"]
7+
= 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.

modules/virt-attaching-vm-to-primary-udn.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ You can connect a virtual machine (VM) to the primary user-defined network (UDN)
1212
* You have installed the OpenShift CLI (`oc`).
1313
1414
.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:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc annotate hco kubevirt-hyperconverged -n kubevirt-hyperconverged hco.kubevirt.io/deployPasstNetworkBinding=true --overwrite
20+
----
21+
1522
. Edit the `VirtualMachine` manifest to add the UDN interface details, as in the following example:
1623
+
17-
.Example `VirtualMachine` manifest
24+
*Example `VirtualMachine` manifest*
1825
[source,yaml]
1926
----
2027
apiVersion: kubevirt.io/v1
@@ -39,7 +46,7 @@ spec:
3946
----
4047
<1> The namespace in which the VM is located. This value must match the namespace in which the UDN is defined.
4148
<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`.
4350
<4> The name of the network. This must match the value of the `spec.template.spec.domain.devices.interfaces.name` field.
4451

4552
. Apply the `VirtualMachine` manifest by running the following command:

virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="virt-connecting-vm-to-primary-udn"]
3-
= Connecting a virtual machine to a primary user-defined network
3+
= Connecting a virtual machine to a primary user-defined network
4+
45
include::_attributes/common-attributes.adoc[]
56
:context: virt-connecting-vm-to-primary-udn
67

@@ -26,7 +27,6 @@ You must consider the following limitations before implementing a primary UDN:
2627
* You cannot use the `virtctl ssh` command to configure SSH access to a VM.
2728
* You cannot use the `oc port-forward` command to forward ports to a VM.
2829
* You cannot use headless services to access a VM.
29-
* You cannot define readiness and liveness probes to configure VM health checks.
3030
3131
3232
[id="creating-primary-udn-web_{context}"]
@@ -59,7 +59,28 @@ include::modules/virt-creating-a-primary-cluster-udn.adoc[leveloffset=+2]
5959
.Next steps
6060
* 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]
6161

62-
include::modules/virt-attaching-vm-to-primary-udn.adoc[leveloffset=+1]
62+
[id="attaching-vm-to-primary-udn_{context}"]
63+
== 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
79+
include::snippets/technology-preview.adoc[]
80+
81+
include::modules/virt-attaching-vm-to-primary-udn.adoc[leveloffset=+2]
82+
83+
include::modules/virt-attaching-vm-to-primary-udn-web.adoc[leveloffset=+2]
6384

6485
//Excluding from ROSA because the Networking -> Multiple networks -> Primary networks section is not part of ROSA docs
6586
ifndef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]

0 commit comments

Comments
 (0)