[pve-devel] [PATCH qemu-server docs manager] Implement support for fw_cfg

Leo Nunner l.nunner at proxmox.com
Wed Mar 1 10:12:25 CET 2023


This patch introduces an interface for passing values to a guest via the
fw_cfg parameter. Settings are in the format

    opt/$key=$value

Where $key should start with a rfqdn (but doesn't need to). Both plain
strings and files (only from the snippets directory) can be passed through.
An example application for this parameter is for provisioning CoreOS
systems [1].

Files are currently passed through if the user specifies the value as
"storage:snippets/file", there is no implicit file flag.

[1] https://coreos.github.io/ignition/

qemu-server:

Leo Nunner (2):
  fix #4068: implement support for fw_cfg
  test: add cfg2cmd tests for fw_cfg

 PVE/API2/Qemu.pm                     | 14 +++++++++++
 PVE/QemuServer.pm                    | 35 ++++++++++++++++++++++++++++
 test/cfg2cmd/fw_cfg-files.conf       | 15 ++++++++++++
 test/cfg2cmd/fw_cfg-files.conf.cmd   | 30 ++++++++++++++++++++++++
 test/cfg2cmd/fw_cfg-strings.conf     | 15 ++++++++++++
 test/cfg2cmd/fw_cfg-strings.conf.cmd | 30 ++++++++++++++++++++++++
 6 files changed, 139 insertions(+)
 create mode 100644 test/cfg2cmd/fw_cfg-files.conf
 create mode 100644 test/cfg2cmd/fw_cfg-files.conf.cmd
 create mode 100644 test/cfg2cmd/fw_cfg-strings.conf
 create mode 100644 test/cfg2cmd/fw_cfg-strings.conf.cmd

docs:

Leo Nunner (1):
  fix #4068: document fw_cfg parameter

 qm.adoc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

manager:

Leo Nunner (1):
  fix #4068: expose fw_cfg through the GUI

 www/manager6/Makefile                |   1 +
 www/manager6/qemu/FirmwareCfgEdit.js | 224 +++++++++++++++++++++++++++
 www/manager6/qemu/Options.js         |   6 +
 3 files changed, 231 insertions(+)
 create mode 100644 www/manager6/qemu/FirmwareCfgEdit.js

-- 
2.30.2






More information about the pve-devel mailing list