Skip to content

Conversation

Vaishali-gif-rh
Copy link
Contributor

@Vaishali-gif-rh Vaishali-gif-rh commented Oct 13, 2025

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/CNV-67095

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:
This is a duplicate PR of #99158. The QA review for that issue has already been completed.

@openshift-ci-robot
Copy link

@Vaishali-gif-rh: No Jira issue with key 67095-2 exists in the tracker at https://issues.redhat.com/.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

In response to this:

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/CNV-67095

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:
This is a duplicate PR of #99158. The QA review for that issue has already been completed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

@Vaishali-gif-rh: No Jira issue with key 67095-2 exists in the tracker at https://issues.redhat.com/.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

In response to this:

Version(s):
4.20+

Issue:
https://issues.redhat.com/browse/CNV-67095

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:
This is a duplicate PR of #99158. The QA review for that issue has already been completed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 13, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Oct 13, 2025

Copy link
Contributor

@sjhala-ccs sjhala-ccs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the content and did an initial review. Please ping the peer review channel again after you have made the updates. Thanks!

+
.Example configuration file with mediated devices configured
.Example configuration
[%collapsible]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line and the next ==== because the code snippet is now smaller and the collapsible content does not render properly on docs.redhat

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [%collapsible] line still needs to be removed

Copy link

openshift-ci bot commented Oct 14, 2025

@Vaishali-gif-rh: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@ousleyp ousleyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Vaishali, there are some things to resolve before we can move this forward. Please feel free to reach out if you have questions. Thanks!

Comment on lines +14 to +16
* You have enabled the Input-Output Memory Management Unit (IOMMU) driver.
* If your hardware vendor provides drivers, you have installed them on the nodes where you want to create mediated devices.
** If you use NVIDIA cards, you have link:https://docs.nvidia.com/datacenter/cloud-native/openshift/latest/openshift-virtualization.html[installed the NVIDIA GRID driver].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you changed the simple past tense verbs (like "You enabled") to use "have" (like "You have enabled"), which is not consistent with our style guidelines. The ISG has a short section on tense, indicating that we use simple present tense for most things, and simple past or future tense when present tense doesn't make sense.


:_mod-docs-content-type: PROCEDURE
[id="virt-creating-exposing-mediated-devices_{context}"]
= Creating and exposing mediated devices

As an administrator, you can create mediated devices and expose them to the cluster by editing the `HyperConverged` custom resource (CR).
As an administrator, you can create mediated devices and expose them to the cluster by editing the `HyperConverged` custom resource (CR). The mediated device values that you supply can vary depending on the particular Graphics Processing Units (GPUs) you are using.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This additional sentence doesn't seem to add much for the reader. For conciseness, consider removing it, or you could shorten it to something like: "The values you add to the CR depend on your GPU model and vendor."

Comment on lines 34 to 56
@@ -43,81 +48,85 @@ spec:
- nvidia-233
nodeSelector:
kubernetes.io/hostname: node-11.redhat.com
permittedHostDevices:
mediatedDevices:
- mdevNameSelector: GRID T4-2Q
resourceName: nvidia.com/GRID_T4-2Q
- mdevNameSelector: GRID T4-8Q
resourceName: nvidia.com/GRID_T4-8Q
# ...
# ...
----
====

. Create mediated devices by adding them to the `spec.mediatedDevicesConfiguration` stanza:
Identify the name selector and resource name values for the devices that you want to expose to the cluster, as shown in the following example. You can use the same value for both, replacing any spaces in the name with an underscore.
+
.Example YAML snippet
[source,yaml]
[source,terminal]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section has some formatting issues that I've captured in a screenshot.

Image

+
.Example configuration file with mediated devices configured
.Example configuration
[%collapsible]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [%collapsible] line still needs to be removed

Comment on lines -30 to +35
[source,yaml,subs="attributes+"]

[source,yaml]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted to [source,yaml,subs="attributes+"] because the code block has an attribute in it ({CNVNamespace})


<mdevNameSelector>:: Specifies the mediated devices that map to this value on the host.

<resourceName>:: Specifies the matching resource name that is allocated on the node.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, you don't need to use the < > characters because the example doesn't contain them. You just need to put the parameters in backticks.

Suggested change
<resourceName>:: Specifies the matching resource name that is allocated on the node.
`mediatedDeviceTypes`:: Specifies global settings for the cluster and is required.
`nodeMediatedDeviceTypes`:: Specifies global configuration overrides for a specific node or group of nodes and is optional. Must be used with the global `mediatedDeviceTypes` configuration.
`mediatedDeviceTypes`:: Specifies an override to the global `mediatedDeviceTypes` configuration for the specified nodes. Required if you use `nodeMediatedDeviceTypes`.
`nodeSelector`:: Specifies the node selector and must include a `key:value` pair. Required if you use `nodeMediatedDeviceTypes`.
`mdevNameSelector`:: Specifies the mediated devices that map to this value on the host.
`resourceName`:: Specifies the matching resource name that is allocated on the node.

Comment on lines +89 to +103
spec:
mediatedDevicesConfiguration:
mediatedDeviceTypes:
- nvidia-745
nodeMediatedDeviceTypes:
- mediatedDeviceTypes:
- nvidia-746
nodeSelector:
kubernetes.io/hostname: node-11.redhat.com
permittedHostDevices:
mediatedDevices:
- mdevNameSelector: GRID A2-2Q
resourceName: nvidia.com/GRID_A2-2Q
- mdevNameSelector: GRID A2-4Q
resourceName: nvidia.com/GRID_A2-4Q
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is a snippet, you need to put # ... before and after the code itself.

Suggested change
spec:
mediatedDevicesConfiguration:
mediatedDeviceTypes:
- nvidia-745
nodeMediatedDeviceTypes:
- mediatedDeviceTypes:
- nvidia-746
nodeSelector:
kubernetes.io/hostname: node-11.redhat.com
permittedHostDevices:
mediatedDevices:
- mdevNameSelector: GRID A2-2Q
resourceName: nvidia.com/GRID_A2-2Q
- mdevNameSelector: GRID A2-4Q
resourceName: nvidia.com/GRID_A2-4Q
# ...
spec:
mediatedDevicesConfiguration:
mediatedDeviceTypes:
- nvidia-745
nodeMediatedDeviceTypes:
- mediatedDeviceTypes:
- nvidia-746
nodeSelector:
kubernetes.io/hostname: node-11.redhat.com
permittedHostDevices:
mediatedDevices:
- mdevNameSelector: GRID A2-2Q
resourceName: nvidia.com/GRID_A2-2Q
- mdevNameSelector: GRID A2-4Q
resourceName: nvidia.com/GRID_A2-4Q
# ...

. Identify the name selector and resource name values for the devices that you want to expose to the cluster. You will add these values to the `HyperConverged` CR in the next step.
.. Find the `resourceName` value by running the following command:
+
.Example output
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.Example output
Example output:
+

@@ -24,10 +29,10 @@ As an administrator, you can create mediated devices and expose them to the clus
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
----
+
.Example configuration file with mediated devices configured
*Example configuration*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Example configuration*
Example configuration file:
+

Comment on lines +18 to +21
[IMPORTANT]
====
Before {VirtProductName} 4.14, the `mediatedDeviceTypes` field was named `mediatedDevicesTypes`. Ensure that you use the correct field name when configuring mediated devices.
====
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we still need this :)

@ousleyp
Copy link
Member

ousleyp commented Oct 15, 2025

Per @nunzy1, I am taking over this story in the interest of time; I'm closing this PR and will open a different one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants