From 54da9cc944ee871517162a0918e9e3a24e17bce5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 9 Nov 2017 17:47:29 +0100 Subject: [PATCH] Amazon image: Add NVMe support to the initrd This is required by the new c5.* instance types. Note that this changes disk names from /dev/xvd* to /dev/nvme0n*. Amazon Linux has a udev rule that calls a Python script named "ec2nvme-nsid" to create compatibility symlinks. We could use that, but it would mean adding Python to the AMI closure... --- nixos/modules/virtualisation/amazon-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix index 3e47710361a8..1eb3ca707afd 100644 --- a/nixos/modules/virtualisation/amazon-image.nix +++ b/nixos/modules/virtualisation/amazon-image.nix @@ -33,7 +33,7 @@ let cfg = config.ec2; in config.boot.kernelPackages.ena ]; boot.initrd.kernelModules = [ "xen-blkfront" "xen-netfront" ]; - boot.initrd.availableKernelModules = [ "ixgbevf" "ena" ]; + boot.initrd.availableKernelModules = [ "ixgbevf" "ena" "nvme" ]; boot.kernelParams = mkIf cfg.hvm [ "console=ttyS0" ]; # Prevent the nouveau kernel module from being loaded, as it