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 1667025

Summary: Cannot modify guest's name on uefi firmware when creating new vm on rhel 8
Product: Red Hat Enterprise Linux 8 Reporter: zonglin jiang <zjiang>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: crobinso, juzhou, mxie, mzhan, tzheng, xiaodwan, zili
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-2.2.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1667308 (view as bug list) Environment:
Last Closed: 2019-11-05 21:19:40 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:

Description zonglin jiang 2019-01-17 09:29:22 UTC
Version-Release number of selected component (if applicable):
virt-manager-2.0.0-2.el8.noarch
qemu-kvm-2.12.0-51.module+el8+2608+a17c4bfe.x86_64
libvirt-4.5.0-17.module+el8+2625+db702f9d.x86_64
python3-libvirt-4.5.0-1.module+el8+2529+a9686a4d.x86_64
kernel-4.18.0-56.el8.x86_64

How reproducible
100%

Steps to Reproduce
1.Launch virt-manager, create a new vm
2.In the last step, check customize configuration before install 
3.Click overview, for "firmware" choose "uefi", click apply
4.Modify name to a legal one, click apply

Actual results:
After step 4,Error pops up
Error apply changes: expected str, bytes or os.PathLike object, not NoneType

Expected results:
No errors pop up and the name can be modified successfully.

Additionally info:
Thishappens on both rhel7 and rhel8
virt-manager --debug shows:
[Wed, 16 Jan 2019 17:38:38 virt-manager 15225] DEBUG (error:83) error dialog message:
summary=Error apply changes: expected str, bytes or os.PathLike object, not NoneType
details=Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1888, in config_apply
    ret = self.config_overview_apply()
  File "/usr/share/virt-manager/virtManager/details.py", line 1984, in config_overview_apply
    self.vm.rename_domain(self.widget("overview-name").get_text())
  File "/usr/share/virt-manager/virtManager/domain.py", line 444, in rename_domain
    new_nvram, old_nvram = self._copy_nvram_file(new_name)
  File "/usr/share/virt-manager/virtManager/domain.py", line 419, in _copy_nvram_file
    nvram_dir = os.path.dirname(old_nvram.path)
  File "/usr/lib64/python3.6/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Comment 1 Cole Robinson 2019-06-15 01:51:08 UTC
Thanks for the report. I couldn't reproduce the issue but I spotted what might be the culprit. Fixed upstream now:

commit 5eb5913f345ae267d26d30d0b45443eae006d5f5 (HEAD -> master)
Author: Cole Robinson <crobinso>
Date:   Fri Jun 14 21:50:08 2019 -0400

    domain: Ensure nvram path before trying to access it
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1667025

Comment 3 zhoujunqin 2019-07-25 10:41:24 UTC
I can reproduce this issue with package:
virt-manager-2.0.0-5.el8.noarch

Then try to verify this bug with new build:
virt-install-2.2.1-1.el8.noarch
virt-manager-2.2.1-1.el8.noarch
libvirt-4.5.0-24.module+el8.1.0+3205+41ff0a42.x86_64
qemu-kvm-2.12.0-77.module+el8.1.0+3382+49219945.x86_64
edk2-ovmf-20190308git89910a39dcfd-4.el8.noarch

Steps:
1.Launch virt-manager, and click 'Create a new virtual machine' button
2.In the last step, check customize configuration before install 
3.Click overview, for "firmware" choose "uefi", click apply
4.Modify name to a legal one, click apply.

Result:
The name can be modified successfully.
So I move this bug from ON_QA to VERIFIED.

Comment 5 errata-xmlrpc 2019-11-05 21:19:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3464