Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2026985

Summary: [virt-manager] vm installation fails when adding mdev hostdev
Product: Red Hat Enterprise Linux 8 Reporter: smitterl
Component: virt-managerAssignee: Jonathon Jongsma <jjongsma>
Status: CLOSED UPSTREAM QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact: Jiri Herrmann <jherrman>
Priority: unspecified    
Version: 8.6CC: hongzliu, jherrman, jjongsma, juzhou, lmanasko, thuth, tyan, tzheng, virt-maint, virt-qe-z
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
.Attaching mediated devices to virtual machines in `virt-manager` in some cases fails The `virt-manager` application is currently able to detect mediated devices, but cannot recognize whether the device is active. As a consequence, attempting to attach an inactive mediated device to a running virtual machine (VM) using `virt-manager` fails. Similarly, attempting to create a new VM that uses an inactive mediated device fails with a `device not found` error. To work around this issue, use the `virsh nodedev-start` or `mdevctl start` commands to activate the mediated device before using it in `virt-manager`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-28 18:33:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
error screenshot
none
mdev list view none

Description smitterl 2021-11-26 18:07:14 UTC
Description of problem:

Installing a new machine remotely with an attached mdev hostdev will fail although virt-manager offers the mdev in customization process.

The customer can't fix this via virt-manager, might also not be aware that the device '$uuid' is the actual mediated device by the selected nodedev, and would have to log into the libvirt host to find out the mdev is not running and start it manually.


Version-Release number of selected component (if applicable):
virt-manager-3.2.0-1.el8.noarch

How reproducible:
100%


Steps to Reproduce:
1. Have a $remote_server with a defined mdev $stopped_mdev that is not running
2. Connect virt-manager to $remote_server
3. Create a new VM (e.g. import image)
4. In Step 4 of 4 select "Customize configuration before install"
5. Select "Add Hardware"
6. Select "MDEV Host Device"
==> $stopped_mdev is listed
7. Add $stopped_mdev and Begin Installation

Actual results:
Error "Unable to install: 'device not found: mediated device '$uuid' not found'"

Expected results:
A) The device is not listed
OR
B) The device is tentatively started
OR
C) There's a way to manage devices on remote host through virt-manager GUI.

Comment 1 smitterl 2021-11-26 18:09:51 UTC
Created attachment 1843757 [details]
error screenshot

Comment 2 smitterl 2021-11-26 18:10:31 UTC
Created attachment 1843758 [details]
mdev list view

Comment 11 Jonathon Jongsma 2022-04-28 18:33:16 UTC
Since Jiri has added the documentation to the release notes and I have opened a bug upstream, I'm going to close this bug for now. 

See https://github.com/virt-manager/virt-manager/issues/392