From e4777ae2d84c5f38740b744fe85e305f1a2f0209 Mon Sep 17 00:00:00 2001 From: Ihor Antonov Date: Wed, 2 May 2018 11:13:13 -0400 Subject: [PATCH] Fix kernel panic on ec2 kvm instances caused by io timeout on nvme root volume --- nixos/maintainers/scripts/ec2/amazon-image.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 972c04453aef..5ab5d400e05c 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -8,6 +8,11 @@ in { imports = [ ../../../modules/virtualisation/amazon-image.nix ]; + # Required to avoid kernel panics on KVM instances where nvme volume availability can get delayed + # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes + # TODO change value to 4294967295 when kernel is updated to 4.15 or later + config.boot.kernelParams = [ "nvme_core.io_timeout=255" ]; + options.amazonImage = { name = mkOption { type = types.str;