Blog Post

Running SAP Applications on the Microsoft Platform
7 MIN READ

Moving Linux and Windows from SCSI to NVMe with one easy command

phleiten's avatar
phleiten
Icon for Microsoft rankMicrosoft
Jun 30, 2025

Introduction

In the ever-evolving world of cloud computing, maximizing performance and efficiency is crucial for businesses leveraging virtual machines (VMs) on platforms like Microsoft Azure, especially for high I/O workloads like SAP on Azure or database applications. One significant upgrade that can yield substantial performance improvements is converting your Azure VM from a SCSI (Small Computer System Interface) disk setup to NVMe (Non-Volatile Memory Express) using Azure Boost. This blog post will guide you through the process of making this conversion and explore the numerous advantages of NVMe over SCSI.

In previous posts you had to prepare the OS yourself and it was a complex process for Linux and Windows. 

Now you can move to NVMe with just one simple easy command and the script will take care about everything including the preparation of your operating system.

 

Advantages of Azure Boost

Azure Boost is a powerful enhancement tool for Azure VMs, offering the following advantages:

  1. Accelerated Disk Performance: Azure Boost optimizes disk I/O operations, significantly increasing the speed and efficiency of your VM's storage.
  2. Seamless Integration: Easily integrates with existing Azure infrastructure, allowing for a smooth transition and immediate performance benefits.
  3. Cost-Effective Optimization: By enhancing the performance of existing VMs, Azure Boost helps reduce the need for more expensive hardware upgrades or additional resources.

What is changing for your VM?

Changing the host interface from SCSI to NVMe will not change the remote storage (OS disk or data disks), but change the way the operating systems sees the disks. The way the devices are shown depends on the varios VM size with v6 SKUs now also having up to 4 temporary disks using NVMe.

 

 SCSI enabled VMNVMe enabled VM (v5 and Mv3)NVMe enabled v6
OS disk/dev/sda/dev/nvme0n1/dev/nvme0n1
Temp Disk/dev/sdb/dev/sda/dev/nvme1n1
First Data Disk/dev/sdc/dev/nvme0n2/dev/nvme0n2

 

In the following sections, we'll provide a step-by-step guide to converting your Azure VM from SCSI to NVMe using Azure Boost, ensuring you can take full advantage of these performance improvements and maintain a competitive edge in the cloud computing landscape.

 

Preparing your virtual machine (VM) from SCSI to NVMe

To migrate from SCSI to NVMe and benefit from higher performance some prerequisites need to be in place:

  1. Your Azure VM Generation needs to be V2, you can check it using e.g. the portal on your VM
    Check VM generation on Azure Portal
  2. Windows
    1. On Windows 3rdparty software like Antivirus can influence the behavior after the migration, if you see a bluescreen please convert back to SCSI and try disabling your Antivirus/Security solution
    2. When you run e.g. a v6 VM you can get up to 4 tempdisks, all of them will be RAW and not preformated with NTFS
  3. Linux
    1. Previously you were able to identify the Data Disks using LUN IDs in /dev/disk/azure/scsi1/lunX, as we migrate to NVMe those udev rules are not valid anymore. You can install the azure-vm-utils package or manually deploy a udev rule available on GitHub
    2. When you run e.g. a v6 VM you can get up to 4 tempdisks, all of them will be RAW, you can use e.g. cloud-init to run initializtion of those disks everytime the operating system starts
IMPORTANT

Conversion from VMs with tempdisk (e.g. Standard_D4ds_v5) to Intel or AMD v6 SKUs (e.g. Standard_D4ds_v6) is currently not supported. The only possible migration is through disk snapshots.

You can convert VMs without tempdisk (e.g. Standard_D4s_v5) to v6 SKUs.

 

Prepare your environment (required for local PowerShell)

When running local PowerShell you need to make sure to have all the requirements installed and configured

Set-ExecutionPolicy Unrestricted

Install PowerShell modules for Azure

Install-Module Az -Force

Download the script:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/refs/heads/main/Azure-NVMe-Utils/Azure-NVMe-Conversion.ps1" -OutFile "Azure-NVMe-Conversion.ps1"

Logon to Azure and select the correct subscription

Connect-AzAccount
Select-azsubscription -Subscription [Your-Subscription-Id]

 

Migrate your VM

IMPORTANT

You can always revert the migration back to SCSI

To migrate your VM you need to know some parameters

  • ResourceGroupName of the VM you want to convert
  • VMName of the VM you want to convert
  • NewControllerType will be SCSI or NVMe
  • VMSize is the new VM SKU, can also be the same SKU if it supports both Controller Types

Optional Parameters:

  • StartVM automatically starts withe VM after the migration
  • WriteLogFile stores the output in a local file
  • IgnoreSKUCheck does not check if the required VM Size is available in the region/zone
  • FixOperatingSystemSettings automatically prepares your Windows or Linux system using Azure RunCommands
  • IgnoreOSCheck does not run the OS check, the VM can be shutdown, you need to make sure your VM is prepared

 

Sample Command and Output

PS /home/philipp> ./NVMe-Conversion.ps1 -ResourceGroupName testrg -VMName testvm -NewControllerType NVMe -VMSize Standard_E4bds_v5 -StartVM -FixOperatingSystemSettings                                          
00:00 - INFO      - Starting script Azure-NVMe-Conversion.ps1
00:00 - INFO      - Script started at 06/27/2025 15:41:39
00:00 - INFO      - Script version: 2025062704
00:00 - INFO      - Script parameters:
00:00 - INFO      -   ResourceGroupName -> testrg
00:00 - INFO      -   VMName -> testvm
00:00 - INFO      -   NewControllerType -> NVMe
00:00 - INFO      -   VMSize -> Standard_E4bds_v5
00:00 - INFO      -   StartVM -> True
00:00 - INFO      -   FixOperatingSystemSettings -> True
00:00 - INFO      - Script Version 2025062704                                                                           
00:00 - INFO      - Module Az.Compute is installed and the version is correct.
00:00 - INFO      - Module Az.Accounts is installed and the version is correct.
00:00 - INFO      - Module Az.Resources is installed and the version is correct.
00:00 - INFO      - Connected to Azure subscription name: AG-GE-CE-PHLEITEN
00:00 - INFO      - Connected to Azure subscription ID: 232b6759-xxxx-yyyy-zzzz-757472230e6c
00:00 - INFO      - VM testvm found in Resource Group testrg
00:01 - INFO      - VM testvm is running
00:01 - INFO      - VM testvm is running Linux
00:01 - INFO      - VM testvm is running SCSI
00:02 - INFO      - Running in Azure Cloud Shell
00:02 - INFO      - Authentication token is a SecureString
00:02 - INFO      - Authentication token received
00:02 - INFO      - Getting available SKU resources
00:02 - INFO      - This might take a while ...
00:06 - INFO      - VM SKU Standard_E4bds_v5 is available in zone 1
00:06 - INFO      - Resource disk support matches between original VM size and new VM size.
00:06 - INFO      - Found VM SKU - Checking for Capabilities
00:06 - INFO      - VM SKU has supported capabilities
00:06 - INFO      - VM supports NVMe
00:06 - INFO      - Pre-Checks completed
00:06 - INFO      - Entering Linux OS section
00:37 - INFO      -    Script output: Enable succeeded: 
00:37 - INFO      -    Script output: [stdout]
00:37 - INFO      -    Script output: [INFO] Operating system detected: sles
00:37 - INFO      -    Script output: [INFO] Checking if NVMe driver is included in initrd/initramfs...
00:37 - INFO      -    Script output: [INFO] NVMe driver found in initrd/initramfs.
00:37 - INFO      -    Script output: [INFO] Checking nvme_core.io_timeout parameter...
00:37 - INFO      -    Script output: [INFO] nvme_core.io_timeout is set to 240.
00:37 - INFO      -    Script output: [INFO] Checking /etc/fstab for deprecated device names...
00:37 - INFO      -    Script output: [INFO] /etc/fstab does not contain deprecated device names.
00:37 - INFO      -    Script output: 
00:37 - INFO      -    Script output: [stderr]
00:37 - INFO      -    Script output: 
00:37 - INFO      - Errors: 0 - Warnings: 0 - Info: 7
00:37 - INFO      - Shutting down VM testvm
01:18 - INFO      - VM testvm stopped
01:18 - INFO      - Checking if VM is stopped and deallocated
01:19 - INFO      - Setting OS Disk capabilities for testvm_OsDisk_1_165411276cbe459097929b981eb9b3e2 to new Disk Controller Type to NVMe
01:19 - INFO      - generated URL for OS disk update:
01:19 - INFO      - https://management.azure.com/subscriptions/232b6759-xxxx-yyyy-zzzz-757472230e6c/resourceGroups/testrg/providers/Microsoft.Compute/disks/testvm_OsDisk_1_165411276cbe459097929b981eb9b3e2?api-version=2023-04-02
01:19 - INFO      - OS Disk updated
01:19 - INFO      - Setting new VM Size from Standard_E4s_v3 to Standard_E4bds_v5 and Controller to NVMe
01:19 - INFO      - Updating VM testvm
01:54 - INFO      - VM testvm updated
01:54 - INFO      - Start after update enabled for VM testvm
01:54 - INFO      - Waiting for 15 seconds before starting the VM
02:09 - INFO      - Starting VM testvm
03:31 - INFO      - VM testvm started
03:31 - INFO      - As the virtual machine got started using the script you can check the operating system now
03:31 - INFO      - If you have any issues after the conversion you can revert the changes by running the script with the old settings
03:31 - IMPORTANT - Here is the command to revert the changes:
03:31 - INFO      -    .\Azure-NVMe-Conversion.ps1 -ResourceGroupName testrg -VMName testvm -NewControllerType SCSI -VMSize Standard_E4s_v3 -StartVM
03:31 - INFO      - Script ended at 06/27/2025 15:45:11
03:31 - INFO      - Exiting
PS /home/philipp>

 

Reverting back

The output shows a PowerShell command that will revert back your VM to SCSI at the end of the script:

.\Azure-NVMe-Conversion.ps1 -ResourceGroupName testvg -VMName testvm -NewControllerType SCSI -VMSize Standard_E4s_v3 -StartVM

 

Manually preparing Windows

To manually prepare Windows you just need to run one command. It will set the NVMe driver back to early start.

IMPORTANT

Everytime you boot Windows will evaluate the required drivers. If you set NVMe driver to the correct state, reboot and then check again, it will be started later during boot.

sc.exe config stornvme start=boot

 

Manually preparing Linux

To manually prepare Linux you need to make sure that

  • NVMe drivers are part of initrd/initramfs
  • have the NVMe I/O timeout set to 240 seconds (nvme_core.io_timeout=240) in grub
  • check /etc/fstab for any references to device names (e.g. /dev/sda) or old udev rule entries (e.g. /dev/disk/azure/scsi1/lun0)

Please refer to your Linux providers documentation how to adjust the required settings.

Published Jun 30, 2025
Version 1.0

4 Comments

  • G_Jongeneel's avatar
    G_Jongeneel
    Brass Contributor

    Hi phleiten​ I was really glad to discover this script which would enable us to convert a current AVD Windows 11 multi-session VM (and image) from Standard D8as v5 (SCSI) to Standard D8as v6 (NVMe). More disk power and speed for almost the same money. However, when we run the script, it always results in a blue screen (INACCESSIBLE BOOT DEVICE) afterwards. The script itself runs successfully and without any error. We can convert back to the original size Standard D8as v5 and that will boot (again). The changes within the registry have been checked and they are there.

     

    • Gorttokk's avatar
      Gorttokk
      Copper Contributor

      Hey, we are currently in the same boat. Were you able to get any further the last couple of weeks?

      • G_Jongeneel's avatar
        G_Jongeneel
        Brass Contributor

        Hi Gorttokk​ Not really. However, my use case is focused on AVD and I noticed this blog (credit Marcel Meurer): https://blog.itprocloud.de/Use-v6-session-hosts-in-AVD-and-simple-migrate-to-NVME/. It almost seems to be too easy and I still need to test this. But it looks promising, at least for my use case. 

  • jvanwyk's avatar
    jvanwyk
    Copper Contributor

    Hi, I have a Server 2019 Datacenter running full SAP B1 on Azure. I used your script to convert to NVMe and it runs successfully, but I then get a “INACCESSIBLE_BOOT_DEVICE” when the VM starts up after conversion. I am doing the conversion on a test VM so I am converting from a Standard_D2as_v5 with a SCSI controller to a Standard_E2bs_v5. I did the 3 registry keys, ran the "sc.exe config stornvme start=boot" command and shut the VM down from inside the OS. Do you have any advice please? Thank you