nixos/tests/installer: Give eval failure on unsupported boot methods

(cherry picked from commit 3131daace1eed2b642ab56c5843fd2057fbbfde3)
release-18.03-flake
Tuomas Tynkkynen 2018-03-23 19:27:31 +02:00
parent 9d8c6c71c0
commit be44525d04
1 changed files with 3 additions and 2 deletions

View File

@ -80,8 +80,9 @@ let
+ optionalString isEfi (if pkgs.stdenv.isAarch64
then ''bios => "${pkgs.OVMF.fd}/FV/QEMU_EFI.fd", ''
else ''bios => "${pkgs.OVMF.fd}/FV/OVMF.fd", '');
in
''
in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
throw "Non-EFI boot methods are only supported on i686 / x86_64"
else ''
$machine->start;
# Make sure that we get a login prompt etc.