diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index c1dbfe305dd..f37bbd0246d 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -88,10 +88,6 @@ let kernel = config.boot.kernelPackages.kernel; in boot.consoleLogLevel = 7; - # Make sure we don't hit page allocation failures if the VM's memory is - # heavily fragmented. - boot.kernel.sysctl."vm.min_free_kbytes" = 16384; - # Prevent tests from accessing the Internet. networking.defaultGateway = mkOverride 150 ""; networking.nameservers = mkOverride 150 [ ]; diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index b1f36cf3264..e90e319a36b 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -76,14 +76,14 @@ let -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \ -virtfs local,path=''${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared \ ${if cfg.useBootLoader then '' - -drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=writeback,werror=report \ + -drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=none,werror=report \ -drive index=1,id=drive2,file=$TMPDIR/disk.img,media=disk \ ${if cfg.useEFIBoot then '' -pflash $TMPDIR/bios.bin \ '' else '' ''} '' else '' - -drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=writeback,werror=report \ + -drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=${cfg.qemu.diskInterface},cache=none,werror=report \ -kernel ${config.system.build.toplevel}/kernel \ -initrd ${config.system.build.toplevel}/initrd \ -append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo} ${kernelConsole} $QEMU_KERNEL_PARAMS" \ @@ -426,19 +426,19 @@ in ${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} = { device = "store"; fsType = "9p"; - options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose"; + options = "trans=virtio,version=9p2000.L,cache=loose"; neededForBoot = true; }; "/tmp/xchg" = { device = "xchg"; fsType = "9p"; - options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose"; + options = "trans=virtio,version=9p2000.L,cache=loose"; neededForBoot = true; }; "/tmp/shared" = { device = "shared"; fsType = "9p"; - options = "trans=virtio,version=9p2000.L,msize=1048576"; + options = "trans=virtio,version=9p2000.L"; neededForBoot = true; }; } // optionalAttrs cfg.writableStore diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 250f2b0fbce..ebcbf8c87b5 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -118,7 +118,7 @@ rec { echo "mounting Nix store..." mkdir -p /fs/nix/store - mount -t 9p store /fs/nix/store -o trans=virtio,version=9p2000.L,msize=262144,cache=loose + mount -t 9p store /fs/nix/store -o trans=virtio,version=9p2000.L,cache=loose mkdir -p /fs/tmp /fs/run /fs/var mount -t tmpfs -o "mode=1777" none /fs/tmp @@ -127,7 +127,7 @@ rec { echo "mounting host's temporary directory..." mkdir -p /fs/tmp/xchg - mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,msize=262144,cache=loose + mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose mkdir -p /fs/proc mount -t proc none /fs/proc diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix index 0beaf401758..1c8e6af83b8 100644 --- a/pkgs/build-support/vm/windows/controller/default.nix +++ b/pkgs/build-support/vm/windows/controller/default.nix @@ -48,11 +48,11 @@ let mount -t proc none /fs/proc mount -t 9p \ - -o trans=virtio,version=9p2000.L,msize=262144,cache=loose \ + -o trans=virtio,version=9p2000.L,cache=loose \ store /fs/nix/store mount -t 9p \ - -o trans=virtio,version=9p2000.L,msize=262144,cache=loose \ + -o trans=virtio,version=9p2000.L,cache=loose \ xchg /fs/xchg echo root:x:0:0::/root:/bin/false > /fs/etc/passwd