diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index b18e4263c2db..6a7f559c3795 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -94,6 +94,10 @@ in system.upstartEnvironment.GCOV_PREFIX = "/tmp/xchg/coverage-data"; + system.requiredKernelConfig = with config.lib.kernelConfig; [ + (isYes "SERIAL_8250_CONSOLE") + (isYes "SERIAL_8250") + ]; }; } diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix index dd8b457d43c7..0e9804751bec 100644 --- a/modules/virtualisation/qemu-vm.nix +++ b/modules/virtualisation/qemu-vm.nix @@ -385,4 +385,9 @@ in # Wireless won't work in the VM. networking.wireless.enable = mkOverride 50 false; + + system.requiredKernelConfig = optional (!cfg.graphics) (with config.lib.kernelConfig; [ + (isYes "SERIAL_8250_CONSOLE") + (isYes "SERIAL_8250") + ]); }