* Panic on out-of-memory.

svn path=/nixos/trunk/; revision=19200
This commit is contained in:
Eelco Dolstra 2010-01-04 09:51:57 +00:00
parent 7707ceaddf
commit 13878cb78d
2 changed files with 13 additions and 2 deletions

View File

@ -24,6 +24,14 @@ with pkgs.lib;
boot.postBootCommands =
''
# Panic on out-of-memory conditions rather than letting the
# OOM killer randomly get rid of processes, since this leads
# to failures that are hard to diagnose.
echo 2 > /proc/sys/vm/panic_on_oom
# Coverage data is written into /tmp/coverage-data. Symlink
# it to the host filesystem so that we don't need to copy it
# on shutdown.
( eval $(cat /proc/cmdline)
mkdir /hostfs/$hostTmpDir/coverage-data
ln -s /hostfs/$hostTmpDir/coverage-data /tmp/coverage-data

View File

@ -16,6 +16,7 @@ let
vmName = config.networking.hostName;
options = {
virtualisation.memorySize =
mkOption {
default = 384;
@ -24,6 +25,7 @@ let
Memory size (M) of virtual machine.
'';
};
virtualisation.diskImage =
mkOption {
default = "./${vmName}.qcow2";
@ -34,6 +36,7 @@ let
exist.
'';
};
virtualisation.graphics =
mkOption {
default = true;
@ -48,8 +51,8 @@ let
cfg = config.virtualisation;
qemuGraphics = if (cfg.graphics) then "" else "-nographic";
kernelConsole = if (cfg.graphics) then "" else "console=ttyS0";
qemuGraphics = if cfg.graphics then "" else "-nographic";
kernelConsole = if cfg.graphics then "" else "console=ttyS0";
ttys = [ "tty1" "tty2" "tty3" "tty4" "tty5" "tty6" ];
# Shell script to start the VM.