Hello list,
Some host boot loaders, e.g. grub-bhyve when using the bhyve
driver, take commands on stdin. While there is the
<bootloader_args> tag to set arbitrary command line tags,
there is no <bootloader_stdin> or similar to provide standard
input to the boot loader.
Typical input could be something along the lines of e.g. the
following grub commands:
kernel (cd)/path/to/vmlinuz some-cmdline
initrd (root)/path/to/host/initrd
boot
Using e.g. the (root) device is especially useful on the bhyve
driver when creating diskless VMs.
Before I start implementing this, I’d appreciate some feedback
on the following two points:
1) should this be an attr on the <bootloader> tag, e.g.
<bootloader_stdin=“/path/to/file”>/path/to/bootloader</bootloader>
or rather, as there already exists a <bootloader_args> tag
a separate <bootloader_stdin> tag?
2) should the input be passed verbatim in the domain def,
e.g. using a CDATA block or from a file? Should this be
user-specified, e.g. in an attr?
<bootloader_stdin from=“/path/to/file”/>
<bootloader_stdin>
<![CDATA[
kernel (host)/path/to/kernel with cmdline
initrd (host)/path/to/ramdisk
boot
]]>
</bootloader_stdin>
Regards,
Fabian