Skip to content

Commit d1ff529

Browse files
authored
Merge pull request #100075 from sjhala-ccs/cnv-52860
CNV-52860: Passt binding for primary UDNs
2 parents ee307be + 44fd449 commit d1ff529

File tree

3 files changed

+84
-6
lines changed

3 files changed

+84
-6
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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. VMs that are created in a namespace where the primary UDN is configured are automatically attached to the UDN with the Layer 2 bridge network binding plugin.
10+
11+
To attach a VM to the primary UDN by using the Plug a Simple Socket Transport (passt) binding, enable the plugin and configure the VM network interface in the web console.
12+
13+
:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
14+
include::snippets/technology-preview.adoc[]
15+
16+
.Prerequisites
17+
* You are logged in to the {product-title} web console.
18+
19+
.Procedure
20+
. Follow these steps to enable the passt network binding plugin Technology Preview feature:
21+
22+
.. From the *Virtualization* perspective, click *Overview*.
23+
24+
.. On the *Virtualization* page, click the *Settings* tab.
25+
26+
.. Click *Preview features* and set *Enable Passt binding for primary user-defined networks* to on.
27+
28+
. From the *Virtualization* perspective, click *VirtualMachines*.
29+
30+
. Select a VM to open the *VirtualMachine details* page.
31+
32+
. Click the *Configuration* tab.
33+
34+
. Click *Network*.
35+
36+
. Click the Options menu {kebab} on the *Network interfaces* page and select *Edit*.
37+
38+
. In the *Edit network interface* dialog, select the default pod network attachment from the *Network* list.
39+
40+
. Expand *Advanced* and then select the *Passt* binding.
41+
42+
. Click *Save*.
43+
44+
. If your VM is running, restart it for the changes to take effect.

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
[id="virt-attaching-vm-to-primary-udn_{context}"]
77
= Attaching a virtual machine to the primary user-defined network by using the CLI
88

9-
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.
9+
You can connect a virtual machine (VM) to the primary user-defined network (UDN) by using the CLI.
1010

1111
.Prerequisites
1212
* You have installed the OpenShift CLI (`oc`).
1313
1414
.Procedure
1515
. Edit the `VirtualMachine` manifest to add the UDN interface details, as in the following example:
1616
+
17-
.Example `VirtualMachine` manifest
17+
Example `VirtualMachine` manifest:
18+
+
1819
[source,yaml]
1920
----
2021
apiVersion: kubevirt.io/v1
@@ -39,9 +40,21 @@ spec:
3940
----
4041
<1> The namespace in which the VM is located. This value must match the namespace in which the UDN is defined.
4142
<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`.
43+
<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`.
4344
<4> The name of the network. This must match the value of the `spec.template.spec.domain.devices.interfaces.name` field.
4445

46+
. Optional: If you are using 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:
47+
+
48+
--
49+
[source,terminal]
50+
----
51+
$ oc annotate hco kubevirt-hyperconverged -n kubevirt-hyperconverged hco.kubevirt.io/deployPasstNetworkBinding=true --overwrite
52+
----
53+
54+
:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
55+
include::snippets/technology-preview.adoc[]
56+
--
57+
4558
. Apply the `VirtualMachine` manifest by running the following command:
4659
+
4760
[source,terminal]

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+
Layer 2 bridge:: The Layer 2 bridge binding creates a direct Layer 2 connection between the VM's virtual interface and the virtual switch of the UDN.
70+
71+
Passt:: The Plug a Simple Socket Transport (passt) binding provides a user-space networking solution that integrates seamlessly with the pod network, providing better integration with the {product-title} networking ecosystem.
72+
+
73+
Passt binding has the following benefits:
74+
75+
* You can define readiness and liveness HTTP probes to configure VM health checks.
76+
* You can use Red Hat Advanced Cluster Security to monitor TCP traffic within the cluster with detailed insights.
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-web.adoc[leveloffset=+2]
82+
83+
include::modules/virt-attaching-vm-to-primary-udn.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)