While normally data is passed to linuxrc (including an AutoYaST profile), modern auto-install tools like Ignition from CoreOS support a very interesting method: the QEMU Firmware Config device.

This allows to read from inside the VM a blob by reading /sys/firmware/qemu_fw_cfg/by_name/opt/keyname. The driver is included in recent Linux kernels.

In order to populate the key, one pass the data via the qemu command line: -fw_cfg name=opt/keyname,file=somedata.txt

This would allow to pass an AutoYaST profile directly if running qemu where the profile is located, and for libvirt or the terraform libvirt provider, the volume where the profile is uploaded before passed does not need to be attached to the machine.

The idea is to implement this in Linuxrc by:

  • url_read_file_anywhere()
  • Also check user-defined schemes, like /scripts/url/hmc
  • Choose a good URL scheme like the ones already available for AutoYaST](https://doc.opensuse.org/projects/autoyast/#Commandline.ay), eg: qemu://key
  • Allow to specify autoyast=qemu://key, or just look by default in a key like opt/suse/autoinst/raw
  • Take care of loading the module and including it in linuxrc.

This project is related to "Implement kernel cmdline and/or autoyast/kickstart support in terraform-provider-libvirt ".

Outcome

Looking for mad skills in:

autoyast yast linuxrc terraform

This project is part of:

Hack Week 16

Activity

  • over 1 year ago: dmacvicar joined Implement QEMU Firmware Config device support in Linuxrc/AutoYaST
  • over 1 year ago: mbrugger liked Implement QEMU Firmware Config device support in Linuxrc/AutoYaST
  • over 1 year ago: michalnowak liked Implement QEMU Firmware Config device support in Linuxrc/AutoYaST
  • over 1 year ago: hsehic liked Implement QEMU Firmware Config device support in Linuxrc/AutoYaST
  • over 1 year ago: hsehic started Implement QEMU Firmware Config device support in Linuxrc/AutoYaST
  • Show History

    Comments

    • snwint
      over 1 year ago by snwint | Reply

      The qemu driver is actually already in TW. Here's a proof-of-concept implementation:

      https://github.com/openSUSE/installation-images/pull/211

      Notes: - it's actually not trivial to make it nicer (without the by_name and raw) - it would require to go to a direct linuxrc implementation - those user defined url schemes already work in sle12(-sp3, at least) - to create a test iso, use mksusecd

    Similar Projects

    YaST2 code reorganization by ancorgs

    YaST code organization is a mess at many levels...


    Better support for Chromebooks by suntorytimed

    Better support for Chromebooks

    Chromeboo...


    rewrite YaST2 AppArmor by cboltz

    The YaST2 AppArmor module is still based on the...


    Integrate AutoYaST with software configuration management systems by IGonzalezSosa

    FATE#319830, [F...


    Controlling and Testing the YaST UI Remotely (for Integration Tests, openQA) by lslezak

    Hackweek 17 Update

    During Hackweek 17 I di...