P
phleiten
This is the Windows version of the blog article on converting Azure virtual machines from SCSI to NVMe.
The Linux version can be found here.
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.
Azure Boost is a powerful enhancement tool for Azure VMs, offering the following advantages:
To learn more about Azure Boost visit our documentation or the announcement blog.
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. Windows will present the OS disk and the remote storage as "Virtual_Disk NVMe Premium" devices.
To migrate from SCSI to NVMe and benefit from higher performance some steps need to be followed:
The supported virtual machine SKUs to support NVMe attached disks is available in our documentation and in the table below.
If your VM type is not listed below change the VM type.
As the list of supported VM families may change over time, please check the up-to-date documentation.
The operating system needs to support NVMe devices, Microsoft supports running Windows Server 2019 and newer with NVMe devices on Azure. Please make sure to have all updates installed before converting the VM. Older releases than Windows Server 2019 are NOT supporting NVMe devices. DO NOT APPLY THE PROCEDURES DESCRIBED IN THE ARTICLE TO WINDOWS SERVER 2016 OR OLDER WINDOWS SERVER RELEASES.
PS C:\Users\user1> $vm = Get-AzVM -name nvme-win2022
PS C:\Users\user1> $vm.StorageProfile.DiskControllerType
SCSI
PS C:\Users\user1>
$ az vm show --name nvme-win2022 --resource-group nvme-win2022
{
"additionalCapabilities": {
...
"storageProfile": {
...
"diskControllerType": "SCSI",
...
To make Windows Server 2019 and newer ready for the conversion you need to delete a registry key. This is required as Windows Setup, when initially deploying the OS, marks the required drivers for the OS Disk. This means that only the storport driver for SCSI is loaded early during boot. While the NVMe driver is installed in all operating systems, it is not loaded early enough for the OS to start.
To make NVMe driver be part of the early start you need to run this command or delete the registry key path in regedit.
PS C:\Users\azureuser> reg delete HKLM\SYSTEM\CurrentControlSet\Services\stornvme\StartOverride /f
The operation completed successfully.
PS C:\Users\azureuser>
Next step is to shutdown windows and convert the Virtual Machine.
To convert the operating system multiple steps are required.
To download the PowerShell script from the GitHub repo use the following command:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/A...NVMe-Preflight-Check/azure-nvme-VM-update.ps1" -OutFile ".\azure-nvme-VM-update.ps1"
To convert run the script, detailed documentation is also available on the GitHub repository.
You can decide if e.g. the VM should automatically be started after the reconfiguration.
PS D:\TEMP> .\azure-nvme-VM-update.ps1 -subscription_id 232XXXXX-XXXX-XXXX-88c0-75747223XXXX -resource_group_name NVMe-win2022 -vm_name NVMe-win2022 -disk_controller_change_to NVMe -start_vm_after_update $true -vm_size_change_to Standard_E4bds_v5
INFO - OS Disk found
INFO - Access token generated
INFO - Getting VM info
INFO - Getting all VM SKUs available in Region swedencentral
INFO - This will take about a minute ...
INFO - Checking for TrustedLaunch
INFO - Checking if VM is stopped and deallocated
INFO - Stopping VM
Tenant: 72f988bf-86f1-41af-91ab-2d7cd011db47
SubscriptionName SubscriptionId Account Environment
---------------- -------------- ------- -----------
XX-XX-XX-XXXXXXX 232bXXXX-XXXX-XXXX-XXXX-75747223XXXX xyz@microsoft.com AzureCloud
OperationId : 60bffc73-54a9-4d10-8246-881c506f23ee
Status : Succeeded
StartTime : 15.07.2024 17:23:47
EndTime : 15.07.2024 17:23:59
Error :
Name :
INFO - Setting OS Disk to SCSI/NVMe
INFO - Getting VM config to prepare new config
INFO - Setting new VM size
INFO - Setting disk controller for VM
INFO - Updating the VM configuration
RequestId :
IsSuccessStatusCode : True
StatusCode : OK
ReasonPhrase :
INFO - Waiting for 1 min before starting up
INFO - Starting VM
OperationId : aaedaa1d-968a-4e85-a795-979acddb7f83
Status : Succeeded
StartTime : 15.07.2024 17:25:35
EndTime : 15.07.2024 17:25:47
Error :
Name :
PS D:\TEMP>
PS C:\Users> $vm = Get-AzVM -name nvme-win2022
PS C:\Users> $vm.StorageProfile.DiskControllerType
NVMe
PS C:\Users>
As a last step check your operating system and all the connected drives. Any existing file system will be available after the migration.
In Windows Device Manager you will see the new device specification. If your Azure Virtual Machine has a temporary disk/resource disk assigned, you will see one "Microsoft Virtual Disk" as those are still presented through the SCSI protocol. This is by design of Azure and can't be changed.
Continue reading...
The Linux version can be found here.
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.
Advantages of Azure Boost
Azure Boost is a powerful enhancement tool for Azure VMs, offering the following advantages:
- Accelerated Disk Performance: Azure Boost optimizes disk I/O operations, significantly increasing the speed and efficiency of your VM's storage.
- Seamless Integration: Easily integrates with existing Azure infrastructure, allowing for a smooth transition and immediate performance benefits.
- Cost-Effective Optimization: By enhancing the performance of existing VMs, Azure Boost helps reduce the need for more expensive hardware upgrades or additional resources.
To learn more about Azure Boost visit our documentation or the announcement blog.
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. Windows will present the OS disk and the remote storage as "Virtual_Disk NVMe Premium" devices.
Migrate your virtual machine (VM) from SCSI to NVMe
To migrate from SCSI to NVMe and benefit from higher performance some steps need to be followed:
- Check if your virtual machine series supports NVMe
- Check your operating system for NVMe readiness
- Convert your virtual machine to NVMe
- Check your operating system
1. Check if your virtual machine series supports NVMe
The supported virtual machine SKUs to support NVMe attached disks is available in our documentation and in the table below.
If your VM type is not listed below change the VM type.
Size Series | Series Type | Deployment Status |
---|---|---|
Dalsv6 | General Purpose | Preview |
Easv6 | Memory Optimized | Preview |
DCesv5 | General Purpose | Preview |
ECesv5 | Memory Optimized | Preview |
Mv3 Medium Memory | High Memory to CPU Optimized | Production |
Falsv6/Famsv6 | Compute Optimized | Preview |
Dlsv5 | General Purpose | Production |
Dsv5 | General Purpose | Production |
Esv5 | Memory Optimized | Production |
Ebsv5 | Managed disks optimized | Production |
Lsv3 | Local storage optimized | Production |
Dplsv5 | General Purpose | Production |
Dpsv5 | General Purpose | Production |
Epsv5 | Memory Optimized | Production |
Nvadsv5 | GPU/AI workload optimized | Production |
HBv4 | High Performance Compute (HPC) | Production |
HX | High Performance Compute (HPC) | Production |
As the list of supported VM families may change over time, please check the up-to-date documentation.
2. Check your operating system for NVMe readiness
The operating system needs to support NVMe devices, Microsoft supports running Windows Server 2019 and newer with NVMe devices on Azure. Please make sure to have all updates installed before converting the VM. Older releases than Windows Server 2019 are NOT supporting NVMe devices. DO NOT APPLY THE PROCEDURES DESCRIBED IN THE ARTICLE TO WINDOWS SERVER 2016 OR OLDER WINDOWS SERVER RELEASES.
2.1 Check Controller Type of VM
2.1.1 Check Controller Type using PowerShell
PS C:\Users\user1> $vm = Get-AzVM -name nvme-win2022
PS C:\Users\user1> $vm.StorageProfile.DiskControllerType
SCSI
PS C:\Users\user1>
2.1.2 Check Controller Type using Azure CLI
$ az vm show --name nvme-win2022 --resource-group nvme-win2022
{
"additionalCapabilities": {
...
"storageProfile": {
...
"diskControllerType": "SCSI",
...
2.1.3 Check Controller Type using Azure Portal
2.2 Prepare Windows
To make Windows Server 2019 and newer ready for the conversion you need to delete a registry key. This is required as Windows Setup, when initially deploying the OS, marks the required drivers for the OS Disk. This means that only the storport driver for SCSI is loaded early during boot. While the NVMe driver is installed in all operating systems, it is not loaded early enough for the OS to start.
To make NVMe driver be part of the early start you need to run this command or delete the registry key path in regedit.
2.2.1 Delete the registry path using reg command
PS C:\Users\azureuser> reg delete HKLM\SYSTEM\CurrentControlSet\Services\stornvme\StartOverride /f
The operation completed successfully.
PS C:\Users\azureuser>
2.2.2. Manually delete the registry path
2.3. Shutdown Windows
Next step is to shutdown windows and convert the Virtual Machine.
3. VM SCSI to NVMe conversion
To convert the operating system multiple steps are required.
- Change the metadata of the OS disk to include NVMe capabilities
- Change the SCSI controller to NVMe
3.1 Download the PowerShell script
To download the PowerShell script from the GitHub repo use the following command:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/A...NVMe-Preflight-Check/azure-nvme-VM-update.ps1" -OutFile ".\azure-nvme-VM-update.ps1"
3.2. Convert the Virtual Machine
To convert run the script, detailed documentation is also available on the GitHub repository.
You can decide if e.g. the VM should automatically be started after the reconfiguration.
PS D:\TEMP> .\azure-nvme-VM-update.ps1 -subscription_id 232XXXXX-XXXX-XXXX-88c0-75747223XXXX -resource_group_name NVMe-win2022 -vm_name NVMe-win2022 -disk_controller_change_to NVMe -start_vm_after_update $true -vm_size_change_to Standard_E4bds_v5
INFO - OS Disk found
INFO - Access token generated
INFO - Getting VM info
INFO - Getting all VM SKUs available in Region swedencentral
INFO - This will take about a minute ...
INFO - Checking for TrustedLaunch
INFO - Checking if VM is stopped and deallocated
INFO - Stopping VM
Tenant: 72f988bf-86f1-41af-91ab-2d7cd011db47
SubscriptionName SubscriptionId Account Environment
---------------- -------------- ------- -----------
XX-XX-XX-XXXXXXX 232bXXXX-XXXX-XXXX-XXXX-75747223XXXX xyz@microsoft.com AzureCloud
OperationId : 60bffc73-54a9-4d10-8246-881c506f23ee
Status : Succeeded
StartTime : 15.07.2024 17:23:47
EndTime : 15.07.2024 17:23:59
Error :
Name :
INFO - Setting OS Disk to SCSI/NVMe
INFO - Getting VM config to prepare new config
INFO - Setting new VM size
INFO - Setting disk controller for VM
INFO - Updating the VM configuration
RequestId :
IsSuccessStatusCode : True
StatusCode : OK
ReasonPhrase :
INFO - Waiting for 1 min before starting up
INFO - Starting VM
OperationId : aaedaa1d-968a-4e85-a795-979acddb7f83
Status : Succeeded
StartTime : 15.07.2024 17:25:35
EndTime : 15.07.2024 17:25:47
Error :
Name :
PS D:\TEMP>
3.3 Check the result
3.3.1 Check result in Azure Portal
3.3.2 Check result in PowerShell
PS C:\Users> $vm = Get-AzVM -name nvme-win2022
PS C:\Users> $vm.StorageProfile.DiskControllerType
NVMe
PS C:\Users>
4. Check your operating system
As a last step check your operating system and all the connected drives. Any existing file system will be available after the migration.
In Windows Device Manager you will see the new device specification. If your Azure Virtual Machine has a temporary disk/resource disk assigned, you will see one "Microsoft Virtual Disk" as those are still presented through the SCSI protocol. This is by design of Azure and can't be changed.
Continue reading...