Bug 1422831

Summary: [RFE] Add support for passing files as firmware config blobs to QEMU
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Daniel Berrangé <berrange>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Meina Li <meili>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dyuan, hpopal, jsuchane, kchamart, lersek, marcandre.lureau, mprivozn, rbalakri, xuzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0Flags: hpopal: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-18 13:14:02 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Berrangé 2017-02-16 11:14:13 UTC
Description of problem:
As of QEMU 2.4.0 it is possible to pass arbitrary files to QEMU, which get stored in the fw_cfg tables. These are in turn exposed to the guest OS, and Linux >= 4.5 will expose the data in sysfs at /sys/firmware/qemu_fw_cfg

eg

$QEMU -fw_cfg name=opt/ks,file=/var/lib/libvirt/images/anaconda-ks.cfg

causes the contents of anaconda-ks.cfg to be visible in the file

  /sys/firmware/qemu_fw_cfg/by_name/opt/ks/raw

This facility is useful for providing data to the guest that is required during early boot when no userspace services are initialized (and thus no networking available for example).

In the context of cloud, this can be used to replace need to expose CDROM devices to the guest for cloud-init metadata, or to run a metadata service over a 2nd NIC.

Version-Release number of selected component (if applicable):
libvirt-3.0.0-1.el7

Comment 11 Jaroslav Suchanek 2020-02-18 13:14:02 UTC
This bug was closed deferred as a result of bug triage.

Please reopen if you disagree and provide justification why this bug should
get enough priority. Most important would be information about impact on
customer or layered product. Please indicate requested target release.

Comment 12 Michal Privoznik 2020-06-08 13:01:33 UTC
After some discussion and research we realized this is needed. New bug was filed though. I'm making this a duplicate of the new bug then.

*** This bug has been marked as a duplicate of bug 1837990 ***