Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1686552 - allow backing of pflash via -blockdev
Summary: allow backing of pflash via -blockdev
Status: POST
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Markus Armbruster
QA Contact: CongLi
Depends On: 1546084 1624009
Blocks: 1605127
TreeView+ depends on / blocked
Reported: 2019-03-07 16:59 UTC by Ademar Reis
Modified: 2019-04-16 09:36 UTC (History)
18 users (show)

Fixed In Version: qemu-4.0
Doc Type: Enhancement
Doc Text:
Clone Of: 1624009
Last Closed:
Type: Feature Request
Target Upstream Version:

Attachments (Terms of Use)

Description Ademar Reis 2019-03-07 16:59:54 UTC
+++ This bug was initially created as a clone of Bug #1624009 +++

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.

--- Additional comment from Markus Armbruster on 2018-09-26 05:03:48 EDT ---

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-20 15:43:56 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


    -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

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