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.
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:
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
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
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: