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 'pflash' device is instantiated by definig the -drive which is backing it. To allow snapshotting it along with the disks it would be beneficial to allow using -blockdev for it so that the same code can be reused.
Comment 2Markus Armbruster
2018-09-26 09:03:48 UTC
We configure pflash devices with -drive if=pflash,... Peter is looking for a way to configure them with -blockdev and -device. I'll look into it.
Comment 3Markus Armbruster
2019-03-13 13:26:31 UTC
Upstream merge commit eda1df0345f5a1e337e30367124dcb0e802bdfde provides -machine properties pflash0 and pflash1. Use like this:
-blockdev node-name=pflash0,driver=file,read-only=on,filename=OVMF_CODE.fd \
-blockdev node-name=pflash1,driver=raw,filename=OVMF_VARS.fd \
-machine pflash0=pflash0,pflash1=pflash1
Comment 4Markus Armbruster
2019-03-20 16:27:38 UTC
Fixed in upstream merge commit eda1df0345f5a1e337e30367124dcb0e802bdfde, will be in QEMU v4.0.
The fix supersedes the old way of configuring OVMF
-drive if=pflash,format=raw,unit=0,readonly,file=/usr/share/edk2/ovmf/OVMF_CODE.fd \
-drive if=pflash,format=raw,unit=1,file=copy-of-OVMF_VARS.fd
by
-blockdev node-name=pflash0,driver=file,read-only=on,filename=/usr/share/edk2/ovmf/OVMF_CODE.fd \
-blockdev node-name=pflash1,driver=file,filename=copy-of-OVMF_VARS.fd \
-machine pflash0=pflash0,pflash1=pflash1
Backport has quite a few patches, but most of them apply cleanly or with only trivial conflicts.
Comment 8Miroslav Rezanina
2019-05-17 15:47:13 UTC
Verified on qemu-kvm-rhev-2.12.0-29.el7.x86_64.
pflash works well with blockdev.
-blockdev node-name=pflash0,read-only=on,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd \
-blockdev node-name=pflash1,driver=file,filename=/home/kvm_autotest_root/images/rhel77-64-virtio-scsi.qcow2.fd \
-machine pflash0=pflash0,pflash1=pflash1 \
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:2553