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.
DescriptionDaniel Berrangé
2021-12-08 18:57:08 UTC
Description of problem:
If you call the 'virDomainGetLaunchSecurityInfo' method on a guest with SEV config that is shutoff, libvirt tries to use a NULL monitor resulting in
an error:
libvirt: QEMU Driver error : invalid argument: monitor must not be NULL
This can be demonstrated with:
$ cat sev.py
#!/usr/bin/python3
import libvirt
import sys
c = libvirt.open(None)
d = c.lookupByName(sys.argv[1])
print (d.launchSecurityInfo())
# python3 sev.py fedora34
libvirt: QEMU Driver error : invalid argument: monitor must not be NULL
Traceback (most recent call last):
File "sev.py", line 10, in <module>
print (d.launchSecurityInfo())
File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1749, in launchSecurityInfo
raise libvirtError('virDomainGetLaunchSecurityInfo() failed')
libvirt.libvirtError: invalid argument: monitor must not be NULL
Addressed in
https://listman.redhat.com/archives/libvir-list/2021-December/msg00233.html
Version-Release number of selected component (if applicable):
7.10.0-1.el8
How reproducible:
Always
Steps to Reproduce:
1. Configure a guest with SEV <launchSecurity>
2. Do NOT start the guest
3. Run the above python demo
Actual results:
Error about NULL monitor
Expected results:
Error that the guest is not running
Additional info:
Fixed upstream by:
commit 5842163910e8b8d320a896d9485b321d553bad3f
Author: Daniel P. Berrangé <berrange>
Date: Wed Dec 8 07:51:43 2021 -0500
qemu: report error querying launch params for inactive guest
Querying launch params on a inactive guest currently triggers
a warning about the monitor being NULL.
https://bugzilla.redhat.com/show_bug.cgi?id=2030437
Reviewed-by: Peter Krempa <pkrempa>
Signed-off-by: Daniel P. Berrangé <berrange>
v7.10.0-299-g5842163910
Verify this bug with libvirt-daemon-8.0.0-2.module+el8.6.0+14025+ca131e0a.x86_64:
1. prepare a inactive guest which enable SEV
# virsh list --all
Id Name State
-----------------------
- vm1 shut off
- vm2 shut off
2. use python launchSecurityInfo api get guest SEV related information:
# cat tmp.py
#!/usr/bin/python3
import libvirt
import sys
c = libvirt.open(None)
d = c.lookupByName(sys.argv[1])
print (d.launchSecurityInfo())
# python3 tmp.py vm1
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
Traceback (most recent call last):
File "tmp.py", line 10, in <module>
print (d.launchSecurityInfo())
File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1749, in launchSecurityInfo
raise libvirtError('virDomainGetLaunchSecurityInfo() failed')
libvirt.libvirtError: Requested operation is not valid: domain is not running
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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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-2022:1759
Description of problem: If you call the 'virDomainGetLaunchSecurityInfo' method on a guest with SEV config that is shutoff, libvirt tries to use a NULL monitor resulting in an error: libvirt: QEMU Driver error : invalid argument: monitor must not be NULL This can be demonstrated with: $ cat sev.py #!/usr/bin/python3 import libvirt import sys c = libvirt.open(None) d = c.lookupByName(sys.argv[1]) print (d.launchSecurityInfo()) # python3 sev.py fedora34 libvirt: QEMU Driver error : invalid argument: monitor must not be NULL Traceback (most recent call last): File "sev.py", line 10, in <module> print (d.launchSecurityInfo()) File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1749, in launchSecurityInfo raise libvirtError('virDomainGetLaunchSecurityInfo() failed') libvirt.libvirtError: invalid argument: monitor must not be NULL Addressed in https://listman.redhat.com/archives/libvir-list/2021-December/msg00233.html Version-Release number of selected component (if applicable): 7.10.0-1.el8 How reproducible: Always Steps to Reproduce: 1. Configure a guest with SEV <launchSecurity> 2. Do NOT start the guest 3. Run the above python demo Actual results: Error about NULL monitor Expected results: Error that the guest is not running Additional info: