diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-03-30 16:52:56 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-03-30 16:53:23 +0200 |
commit | 1c192e1feac0572ecad7801d8b0311dbc7ecbdbc (patch) | |
tree | 088abe206afd0eab23069df6fc4a3821afa7f4c7 | |
parent | c394d4079d65d9af5145c7d253bb5d18e3c2a451 (diff) | |
download | nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar.gz nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar.bz2 nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar.lz nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar.xz nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.tar.zst nixpkgs-1c192e1feac0572ecad7801d8b0311dbc7ecbdbc.zip |
Another attempt to fix the installer test
http://hydra.nixos.org/build/9904133
-rw-r--r-- | nixos/modules/profiles/qemu-guest.nix | 10 | ||||
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 5 | ||||
-rw-r--r-- | 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" + <nixpkgs/nixos/modules/profiles/qemu-guest.nix> + <nixpkgs/nixos/modules/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"} ]; } |