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 1624009 - allow backing of pflash via -blockdev
Summary: allow backing of pflash via -blockdev
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: CongLi
URL:
Whiteboard:
Depends On:
Blocks: 1436245 1605127 1686552 1717155
TreeView+ depends on / blocked
 
Reported: 2018-08-30 16:24 UTC by Peter Krempa
Modified: 2019-08-22 09:20 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-29.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1686552 1717155 (view as bug list)
Environment:
Last Closed: 2019-08-22 09:18:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2553 0 None None None 2019-08-22 09:20:10 UTC

Description Peter Krempa 2018-08-30 16:24:27 UTC
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 2 Markus 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 3 Markus 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 4 Markus 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 8 Miroslav Rezanina 2019-05-17 15:47:13 UTC
Fix included in qemu-kvm-rhev-2.12.0-29.el7

Comment 10 CongLi 2019-05-20 10:14:46 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  \

Comment 12 errata-xmlrpc 2019-08-22 09:18:48 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:2553


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