Fix VM test booting with kernels <= 3.9
This commit is contained in:
parent
bd99966902
commit
84bb988256
|
@ -275,7 +275,7 @@ in
|
||||||
# CIFS. Also use paravirtualised network and block devices for
|
# CIFS. Also use paravirtualised network and block devices for
|
||||||
# performance.
|
# performance.
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" ];
|
[ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ];
|
||||||
|
|
||||||
boot.initrd.supportedFilesystems = optional cfg.writableStore "unionfs-fuse";
|
boot.initrd.supportedFilesystems = optional cfg.writableStore "unionfs-fuse";
|
||||||
|
|
||||||
|
@ -345,22 +345,23 @@ in
|
||||||
# disregarded for the purpose of building a VM test image (since
|
# disregarded for the purpose of building a VM test image (since
|
||||||
# those filesystems don't exist in the VM).
|
# those filesystems don't exist in the VM).
|
||||||
fileSystems = mkOverride 10
|
fileSystems = mkOverride 10
|
||||||
|
(let mode = if builtins.compareVersions "3.5" config.boot.kernelPackages.kernel.version == 1 then "none" else "ntlm"; in
|
||||||
{ "/".device = "/dev/vda";
|
{ "/".device = "/dev/vda";
|
||||||
"/nix/store" =
|
"/nix/store" =
|
||||||
{ device = "//10.0.2.4/store";
|
{ device = "//10.0.2.4/store";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options = "guest,sec=none,noperm,noacl";
|
options = "guest,sec=${mode},noperm,noacl";
|
||||||
};
|
};
|
||||||
"/tmp/xchg" =
|
"/tmp/xchg" =
|
||||||
{ device = "//10.0.2.4/xchg";
|
{ device = "//10.0.2.4/xchg";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options = "guest,sec=none,noperm,noacl";
|
options = "guest,sec=${mode},noperm,noacl";
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
"/tmp/shared" =
|
"/tmp/shared" =
|
||||||
{ device = "//10.0.2.4/shared";
|
{ device = "//10.0.2.4/shared";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options = "guest,sec=none,noperm,noacl";
|
options = "guest,sec=${mode},noperm,noacl";
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
} // optionalAttrs cfg.useBootLoader
|
} // optionalAttrs cfg.useBootLoader
|
||||||
|
@ -370,7 +371,7 @@ in
|
||||||
options = "ro";
|
options = "ro";
|
||||||
noCheck = true; # fsck fails on a r/o filesystem
|
noCheck = true; # fsck fails on a r/o filesystem
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
|
|
||||||
swapDevices = mkOverride 50 [ ];
|
swapDevices = mkOverride 50 [ ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue