about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2024-02-09 10:24:27 +0100
committerfricklerhandwerk <valentin@fricklerhandwerk.de>2024-02-09 10:48:52 +0100
commitd9009e00284ffd8e1151733899522e3e19e1ca45 (patch)
treea502e3a1e7c3b32d3c74d7c6991c6c4c093a67c3 /nixos
parentf5b14da180ebaeb11d57b1c97e8fdf411bd86e1b (diff)
downloadnixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar.gz
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar.bz2
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar.lz
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar.xz
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.tar.zst
nixlib-d9009e00284ffd8e1151733899522e3e19e1ca45.zip
doc: expand on parameters passed to QEMU VMs
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix15
1 files changed, 11 insertions, 4 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 3d7f3ccb62f8..f5f89ece2423 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -809,14 +809,19 @@ in
           defaultText = "!cfg.useBootLoader";
           description =
             lib.mdDoc ''
-              If enabled, the virtual machine will boot directly into the kernel instead of through a bootloader. Other relevant parameters such as the initrd are also passed to QEMU.
+              If enabled, the virtual machine will boot directly into the kernel instead of through a bootloader.
+              Read more about this feature in the [QEMU documentation on Direct Linux Boot](https://qemu-project.gitlab.io/qemu/system/linuxboot.html)
 
+              This is enabled by default.
               If you want to test netboot, consider disabling this option.
+              Enable a bootloader with {option}`virtualisation.useBootLoader` if you need.
 
-              This will not boot / reboot correctly into a system that has switched to a different configuration on disk.
+              Relevant parameters such as those set in `boot.initrd` and `boot.kernelParams` are also passed to QEMU.
+              Additional parameters can be supplied on invocation through the environment variable `$QEMU_KERNEL_PARAMS`.
+              They are added to the `-append` option, see [QEMU User Documentation](https://www.qemu.org/docs/master/system/qemu-manpage) for details
+              For example, to let QEMU use the parent terminal as the serial console, set `QEMU_KERNEL_PARAMS="console=ttyS0"`.
 
-              This is enabled by default if you don't enable bootloaders, but you can still enable a bootloader if you need.
-              Read more about this feature: <https://qemu-project.gitlab.io/qemu/system/linuxboot.html>.
+              This will not (re-)boot correctly into a system that has switched to a different configuration on disk.
             '';
         };
       initrd =
@@ -846,6 +851,8 @@ in
 
             If disabled, the kernel and initrd are directly booted,
             forgoing any bootloader.
+
+            Check the documentation on {option}`virtualisation.directBoot.enable` for details.
           '';
       };