AWS NVMe drivers for Windows instances - Amazon Elastic Compute Cloud

AWS NVMe drivers for Windows instances

Amazon EBS volumes and instance store volumes are exposed as NVMe block devices on instances built on the AWS Nitro System. To fully utilize the performance and capabilities of Amazon EBS features for volumes exposed as NVMe block devices, the instance must have the AWS NVMe driver installed. All current generation AWS Windows AMIs come with the AWS NVMe driver installed by default.

For more information about EBS and NVMe, see Amazon EBS and NVMe in the Amazon EBS User Guide. For more information about SSD instance store and NVMe, see SSD instance store volumes for EC2 instances.

Install or upgrade AWS NVMe drivers using PowerShell

If you are not using the latest AWS Windows AMIs provided by Amazon, use the following procedure to install the current AWS NVMe driver. You should perform this update at a time when it is convenient to reboot your instance. Either the install script will reboot your instance or you must reboot it as the final step.

Prerequisites

PowerShell 3.0 or later

To download and install the latest AWS NVMe driver
  1. We recommend that you create an AMI as a backup as follows, in case you need to roll back your changes.

    1. When you stop an instance, the data on any instance store volumes is erased. Before you stop an instance, verify that you've copied any data that you need from your instance store volumes to persistent storage, such as Amazon EBS or Amazon S3.

    2. In the navigation pane, choose Instances.

    3. Select the instance that requires the driver upgrade, and choose Instance state, Stop instance.

    4. After the instance is stopped, select the instance, choose Actions, then Image and templates, and then choose Create image.

    5. Choose Instance state, Start instance.

  2. Connect to your instance and log in as the local administrator.

  3. Download and extract the drivers to your instance using one of the following options:

    • Using a browser:

      1. Download the latest driver package to the instance.

      2. Extract the zip archive.

    • Using PowerShell:

      Invoke-WebRequest https://s3.amazonaws.com/ec2-windows-drivers-downloads/NVMe/Latest/AWSNVMe.zip -outfile $env:USERPROFILE\nvme_driver.zip Expand-Archive $env:userprofile\nvme_driver.zip -DestinationPath $env:userprofile\nvme_driver
      Note

      If you receive an error when downloading the file, and you are using Windows Server 2016 or earlier, TLS 1.2 might need to be enabled for your PowerShell terminal. You can enable TLS 1.2 for the current PowerShell session with the following command and then try again:

      [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  4. Install the driver to your instance by running the install.ps1 PowerShell script from the nvme_driver directory (.\install.ps1). If you get an error, make sure you are using PowerShell 3.0 or later.

    1. (Optional) Starting with AWS NVMe version 1.5.0, Small Computer System Interface (SCSI) persistent reservations are supported for Windows Server 2016 and later. This feature adds support for Windows Server Failover Clustering with shared Amazon EBS storage. By default, this feature isn't enabled during installation.

      You can enable the feature when running the install.ps1 script to install the driver by specifying the EnableSCSIPersistentReservations parameter with a value of $true.

      PS C:\> .\install.ps1 -EnableSCSIPersistentReservations $true

      You can disable the feature when running the install.ps1 script to install the driver by specifying the EnableSCSIPersistentReservations parameter with a value of $false.

      PS C:\> .\install.ps1 -EnableSCSIPersistentReservations $false
    2. Starting with AWS NVMe 1.5.0, the install.ps1 script always installs the ebsnvme-id tool with the driver.

      (Optional) For versions 1.4.0, 1.4.1, and 1.4.2, the install.ps1 script allows you to specify whether the ebsnvme-id tool should be installed with the driver.

      1. To install the ebsnvme-id tool, specify InstallEBSNVMeIdTool ‘Yes’.

      2. If you don't want to install the tool, specify InstallEBSNVMeIdTool ‘No’.

        If you don't specify InstallEBSNVMeIdTool, and the tool is already present at C:\ProgramData\Amazon\Tools, the package will upgrade the tool by default. If the tool is not present, install.ps1 will not upgrade the tool by default.

        If you don't want to install the tool as part of the package, and want to install it later, you can find the latest version or the tool in the driver package. Alternatively, you can download version 1.0.0 from Amazon S3:

        Download the ebsnvme-id tool.

  5. If the installer does not reboot your instance, reboot the instance.

Install or upgrade AWS NVMe drivers with Distributor

You can use Distributor, a capability of AWS Systems Manager, to install the NVMe driver package one time or with scheduled updates.

  1. For the instructions for how to install the NVMe driver package using Distributor, see the procedures in Install or update packages in the Amazon EC2 Systems Manager User Guide.

  2. For Installation Type, select Uninstall and reinstall.

  3. For Name, choose AWSNVMe.

  4. (Optional) For Additional Arguments, you can customize the installation by specifying values. The values must be formatted using valid JSON syntax. For examples of how to pass additional arguments for the aws configure package, see the Amazon EC2 Systems Manager documentation.

    1. Starting with AWS NVMe 1.5.0, the driver supports SCSI persistent reservations for Windows Server 2016 and later. By default, this feature isn't enabled during installation.

      • To enable this feature, specify {"SSM_EnableSCSIPersistentReservations": "true"}.

      • If you don't want to enable this feature, specify {"SSM_EnableSCSIPersistentReservations": "false"}.

    2. Starting with AWS NVMe 1.5.0, the install.ps1 script will always install the ebsnvme-id tool.

      (Optional) For versions 1.4.0, 1.4.1, and 1.4.2, the install.ps1 script allows you to specify whether the ebsnvme-id tool should be installed with the driver.

      • To install the ebsnvme-id tool, specify {"SSM_InstallEBSNVMeIdTool": "Yes"}.

      • If you don't want to install the tool, specify {"SSM_InstallEBSNVMeIdTool": "No"}.

        If SSM_InstallEBSNVMeIdTool is not specified for Additional Arguments, and the tool is already present at C:\ProgramData\Amazon\Tools, the package will upgrade the tool by default. If the tool is not present, the package will not upgrade the tool by default.

        If you don't want to install the tool as part of the package, and want to install it later, you can find the latest version of the tool in the driver package. Alternatively, you can download version 1.0.0 from Amazon S3:

        Download the ebsnvme-id tool.

  5. If the installer does not reboot your instance, reboot the instance.

Configure SCSI persistent reservations

After AWS NVMe driver version 1.5.0 or later has been installed, you can enable or disable SCSI persistent reservations using the Windows registry for Windows Server 2016 and later. You must reboot the instance for these registry changes to take effect.

You can enable SCSI persistent reservations with the following command which sets the EnableSCSIPersistentReservations to a value of 1.

PS C:\> $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\AWSNVMe\Parameters\Device" Set-ItemProperty -Path $registryPath -Name EnableSCSIPersistentReservations -Value 1

You can disable SCSI persistent reservations with the following command which sets the EnableSCSIPersistentReservations to a value of 0.

PS C:\> $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\AWSNVMe\Parameters\Device" Set-ItemProperty -Path $registryPath -Name EnableSCSIPersistentReservations -Value 0