diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-12-15 12:38:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 12:38:29 +0100 |
commit | 705829b29ad5c4ac453015b8af265f0956517216 (patch) | |
tree | fe50eb7d1a961a675081f5349d9d6240cc64ecca /nixos/modules | |
parent | 067171a61f2e106ca0b567dcd41ac203f90fc54a (diff) | |
parent | 6cfb3b636418526d1c49d14316a127133cf09c9d (diff) | |
download | nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar.gz nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar.bz2 nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar.lz nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar.xz nixlib-705829b29ad5c4ac453015b8af265f0956517216.tar.zst nixlib-705829b29ad5c4ac453015b8af265f0956517216.zip |
Merge pull request #20500 from aszlig/qemu-patched-for-nixos-tests
nixos/tests: Use a patched QEMU for testing
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/testing/test-instrumentation.nix | 3 | ||||
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index e216351b4347..373bf7665240 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -110,6 +110,9 @@ let kernel = config.boot.kernelPackages.kernel; in networking.usePredictableInterfaceNames = false; + # Make sure we use a patched QEMU that ignores file ownership. + virtualisation.qemu.program = "${pkgs.qemu_test}/bin/qemu-kvm"; + # Make it easy to log in as root when running the test interactively. users.extraUsers.root.initialHashedPassword = mkOverride 150 ""; diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 777ee31e4dcc..263bbf785833 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -70,7 +70,7 @@ let '')} # Start QEMU. - exec ${pkgs.qemu_kvm}/bin/qemu-kvm \ + exec ${cfg.qemu.program} \ -name ${vmName} \ -m ${toString config.virtualisation.memorySize} \ ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \ @@ -299,6 +299,14 @@ in }; virtualisation.qemu = { + program = mkOption { + type = types.path; + default = "${pkgs.qemu_kvm}/bin/qemu-kvm"; + defaultText = "\${pkgs.qemu_kvm}/bin/qemu-kvm"; + example = literalExample "\${pkgs.qemu_test}/bin/qemu-kvm"; + description = "The QEMU variant used to start the VM."; + }; + options = mkOption { type = types.listOf types.unspecified; |