From 1c192e1feac0572ecad7801d8b0311dbc7ecbdbc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 30 Mar 2014 16:52:56 +0200 Subject: Another attempt to fix the installer test http://hydra.nixos.org/build/9904133 --- nixos/modules/profiles/qemu-guest.nix | 10 +++++++++- nixos/modules/virtualisation/qemu-vm.nix | 5 ----- nixos/tests/installer.nix | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/nixos/modules/profiles/qemu-guest.nix b/nixos/modules/profiles/qemu-guest.nix index c8e6fd4aa76..0a92b7ace50 100644 --- a/nixos/modules/profiles/qemu-guest.nix +++ b/nixos/modules/profiles/qemu-guest.nix @@ -5,5 +5,13 @@ { boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_blk" "9p" "9pnet_virtio" ]; - boot.kernelModules = [ "virtio_balloon" "virtio_console" ]; + boot.initrd.kernelModules = [ "virtio_balloon" "virtio_console" ]; + + boot.initrd.postDeviceCommands = + '' + # Set the system time from the hardware clock to work around a + # bug in qemu-kvm > 1.5.2 (where the VM clock is initialised + # to the *boot time* of the host). + hwclock -s + ''; } diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 80bc71bbb8c..a866b513f0f 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -291,11 +291,6 @@ in if test -z "$FSTYPE"; then mke2fs -t ext4 /dev/vda fi - - # Set the system time from the hardware clock to work around a - # bug in qemu-kvm > 1.5.2 (where the VM clock is initialised - # to the *boot time* of the host). - hwclock -s ''; boot.initrd.postMountCommands = diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index b32012ea034..7929ef872b5 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -39,7 +39,8 @@ let { imports = [ ./hardware-configuration.nix - "''${modulesPath}/testing/test-instrumentation.nix" + + ]; boot.loader.grub.version = ${toString grubVersion}; @@ -48,7 +49,6 @@ let ''} boot.loader.grub.device = "${grubDevice}"; boot.loader.grub.extraConfig = "serial; terminal_output.serial"; - boot.initrd.kernelModules = [ "virtio_console" ]; environment.systemPackages = [ ${optionalString testChannel "pkgs.rlwrap"} ]; } -- cgit 1.4.1