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 2007659 - The description of --nvram and --keep-nvram should update in 'virsh help undefine'
Summary: The description of --nvram and --keep-nvram should update in 'virsh help unde...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-24 13:57 UTC by yafu
Modified: 2022-05-17 13:04 UTC (History)
7 users (show)

Fixed In Version: libvirt-7.9.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 12:45:32 UTC
Type: Bug
Target Upstream Version: 7.9.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-98213 0 None None None 2021-09-27 03:49:29 UTC
Red Hat Product Errata RHBA-2022:2390 0 None None None 2022-05-17 12:45:58 UTC

Description yafu 2021-09-24 13:57:22 UTC
Description of problem:
The description of --nvram and --keep-nvram should update in 'virsh help undefine'

Version-Release number of selected component (if applicable):
libvirt-7.7.0-3.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Define and start a guest:
#virsh dumpxml avocado-vt-vm1
...
 <os>
    <type arch='x86_64' machine='pc-q35-rhel8.5.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
    <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/avocado-vt-vm1_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
...

2.Check the nvram file
# ll /var/lib/libvirt/qemu/nvram/
total 532
-rw-------. 1 qemu qemu 540672 Sep 24 09:41 avocado-vt-vm1_VARS.fd


3.undefine the guest with --nvram
#virsh undefine avocdao-vt-vm1 --nvram

4.Check the nvram file again:
# ll /var/lib/libvirt/qemu/nvram/
total 0

5.Check the guest status:
# virsh list
 Id   Name             State
--------------------------------
 5    avocado-vt-vm1   running

Actual results:
--nvram and --keep-nvram works regardless of the guest status

Expected results:
# virsh help undefine
...
--nvram          remove nvram file, ***if inactive***
--keep-nvram     keep nvram file, ***if inactive***



Additional info:

Comment 1 Michal Privoznik 2021-10-05 07:01:22 UTC
Merged upstream:

commit 3ad069001510666e1880ec788401518f6179bcd2
Author:     Michal Prívozník <mprivozn>
AuthorDate: Thu Sep 30 16:32:19 2021 +0200
Commit:     Michal Prívozník <mprivozn>
CommitDate: Tue Oct 5 08:54:32 2021 +0200

    virsh: Fix --nvram and --keep-nvram help strings
    
    The --nvram and --keep-nvram options of the undefine command can
    be used regardless of the domain status (the only consumer so far
    - qemuDomainUndefineFlags() doesn't care about the domain
    status). Yet, their corresponding help strings say something
    about inactive domains while manpage says nothing. Remove the
    reference to domain state.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2007659
    Signed-off-by: Michal Privoznik <mprivozn>
    Reviewed-by: Andrea Bolognani <abologna>

v7.8.0-38-g3ad0690015

Comment 2 Meina Li 2021-10-27 07:35:12 UTC
Test Version:
libvirt-7.9.0-1.fc34.x86_64
qemu-kvm-5.2.0-8.fc34.x86_64

Test Result:
# virsh undefine --help
  NAME
    undefine - undefine a domain
...
    --nvram          remove nvram file
    --keep-nvram     keep nvram file

Comment 6 Meina Li 2021-11-16 09:41:13 UTC
Verified Version:
libvirt-7.9.0-1.el9.x86_64
qemu-kvm-6.1.0-6.el9.x86_64

Verified Steps:
# virsh undefine --help
  NAME
    undefine - undefine a domain
......
    --nvram          remove nvram file
    --keep-nvram     keep nvram file

Comment 8 errata-xmlrpc 2022-05-17 12:45:32 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 (new packages: libvirt), 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/RHBA-2022:2390


Note You need to log in before you can comment on or make changes to this bug.