Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions modules/virt-attaching-vm-to-primary-udn-web.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Module included in the following assemblies:
//
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-attaching-vm-to-primary-udn-web_{context}"]
= Attaching a virtual machine to the primary user-defined network by using the web console

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.

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.

:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
include::snippets/technology-preview.adoc[]

.Prerequisites
* You are logged in to the {product-title} web console.

.Procedure
. Follow these steps to enable the passt network binding plugin Technology Preview feature:

.. From the *Virtualization* perspective, click *Overview*.

.. On the *Virtualization* page, click the *Settings* tab.

.. Click *Preview features* and set *Enable Passt binding for primary user-defined networks* to on.

. From the *Virtualization* perspective, click *VirtualMachines*.

. Select a VM to open the *VirtualMachine details* page.

. Click the *Configuration* tab.

. Click *Network*.

. Click the Options menu {kebab} on the *Network interfaces* page and select *Edit*.

. In the *Edit network interface* dialog, select the default pod network attachment from the *Network* list.

. Expand *Advanced* and then select the *Passt* binding.

. Click *Save*.

. If your VM is running, restart it for the changes to take effect.
19 changes: 16 additions & 3 deletions modules/virt-attaching-vm-to-primary-udn.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
[id="virt-attaching-vm-to-primary-udn_{context}"]
= Attaching a virtual machine to the primary user-defined network by using the CLI

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

.Prerequisites
* You have installed the OpenShift CLI (`oc`).

.Procedure
. Edit the `VirtualMachine` manifest to add the UDN interface details, as in the following example:
+
.Example `VirtualMachine` manifest
Example `VirtualMachine` manifest:
+
[source,yaml]
----
apiVersion: kubevirt.io/v1
Expand All @@ -39,9 +40,21 @@ spec:
----
<1> The namespace in which the VM is located. This value must match the namespace in which the UDN is defined.
<2> The name of the user-defined network interface.
<3> The name of the binding plugin that is used to connect the interface to the VM. The required value is `l2bridge`.
<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`.
<4> The name of the network. This must match the value of the `spec.template.spec.domain.devices.interfaces.name` field.

. 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:
+
--
[source,terminal]
----
$ oc annotate hco kubevirt-hyperconverged -n kubevirt-hyperconverged hco.kubevirt.io/deployPasstNetworkBinding=true --overwrite
----

:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
include::snippets/technology-preview.adoc[]
--

. Apply the `VirtualMachine` manifest by running the following command:
+
[source,terminal]
Expand Down
27 changes: 24 additions & 3 deletions virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:_mod-docs-content-type: ASSEMBLY
[id="virt-connecting-vm-to-primary-udn"]
= Connecting a virtual machine to a primary user-defined network
= Connecting a virtual machine to a primary user-defined network

include::_attributes/common-attributes.adoc[]
:context: virt-connecting-vm-to-primary-udn

Expand All @@ -26,7 +27,6 @@ You must consider the following limitations before implementing a primary UDN:
* You cannot use the `virtctl ssh` command to configure SSH access to a VM.
* You cannot use the `oc port-forward` command to forward ports to a VM.
* You cannot use headless services to access a VM.
* You cannot define readiness and liveness probes to configure VM health checks.


[id="creating-primary-udn-web_{context}"]
Expand Down Expand Up @@ -59,7 +59,28 @@ include::modules/virt-creating-a-primary-cluster-udn.adoc[leveloffset=+2]
.Next steps
* 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]

include::modules/virt-attaching-vm-to-primary-udn.adoc[leveloffset=+1]
[id="attaching-vm-to-primary-udn_{context}"]
== Attaching a virtual machine to the primary user-defined network

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.

{VirtProductName} supports the following network binding plugins to connect the network interface to the VM:

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.

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.
+
Passt binding has the following benefits:

* You can define readiness and liveness HTTP probes to configure VM health checks.
* You can use Red Hat Advanced Cluster Security to monitor TCP traffic within the cluster with detailed insights.

:FeatureName: Using the passt binding plugin to attach a VM to the primary UDN
include::snippets/technology-preview.adoc[]

include::modules/virt-attaching-vm-to-primary-udn-web.adoc[leveloffset=+2]

include::modules/virt-attaching-vm-to-primary-udn.adoc[leveloffset=+2]

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