Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✔️ Linux VMs ✔️ Windows VMs
The wave-based runbook covers the full modernization sequence. This page focuses on the tool that does the in-place work: a script that switches a VM's disk controller between SCSI and NVMe without a rebuild, so the existing OS disk is kept.
For the platform reference behind the conversion, how the disk controller type changes and how to verify the result, see Convert SCSI to NVMe for Linux and Windows VMs.
Warning
The conversion script is a community utility published by the SAP on Azure team in the Azure/SAP-on-Azure-Scripts-and-Utilities repository. Microsoft doesn't consider the script an officially supported product, service, or tool. The SAP on Azure team provides the script as-is. Review the script carefully, and test it in a non-production environment first. Pair it with the runbook sequence and the readiness assessment so you run it with a backup and a rollback already in hand.
Tip
This script is for no-temp-disk source VMs only, sizes without a d before the version suffix (for example, Standard_D4s_v5 or Standard_D8s_v5). VMs that already have a local temporary disk (for example, Standard_D4ds_v5) can convert in place to a v6 size as long as you enable the preview feature VMTempDiskResizePreview ; use the redeploy-from-image path instead. See the temporary-disk dependency row in the readiness assessment.
Before you run the conversion
Confirm the following on the source VM. Each one produces an unsupported result if you skip it:
- Generation 1 VM. Generation 1 VMs can't use NVMe. Redeploy from a Generation 2 image or convert the Generation 1 VM to Trusted Launch first.
- Azure Disk Encryption (ADE) for Linux. ADE for Linux isn't supported with NVMe, so converting an ADE-encrypted Linux VM produces an unsupported configuration. Check for ADE yourself and decrypt the VM first (or use the redeploy-from-image path). The current script doesn't detect ADE and can complete without warning, leaving the VM in an unsupported state.
Get the script
Pull the current version straight from the source repository:
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"
Caution
Older versions of the script can hit an HTTP 409 (PropertyChangeNotAllowed) error when Ultra Disk or Premium SSD v2 data disks are attached, because of IOPS/throughput properties in the VM PATCH payload. Always pull the current version as shown (the fix is upstream). This is most relevant for SAP and database workloads, which commonly attach these disk types.
Set up your session
Set-ExecutionPolicy Unrestricted -Scope Process
Connect-AzAccount
Select-AzSubscription -SubscriptionId "<your-subscription-id>"
Use a process-scoped execution policy so you don't loosen the policy for the whole machine.
Run the conversion
A typical NVMe conversion, starting the VM afterward and writing a log:
.\Azure-NVMe-Conversion.ps1 `
-ResourceGroupName "rg-prod-app" `
-VMName "vm-app-01" `
-NewControllerType "NVMe" `
-VMSize "Standard_D8s_v6" `
-StartVM `
-FixOperatingSystemSettings `
-WriteLogfile
Parameters that matter
| Parameter | What it does |
|---|---|
-NewControllerType |
Set to NVMe for the move to v6. Set to SCSI to revert a VM if validation fails. |
-VMSize |
The target size (for example, a _v6 size). The script resizes as part of the conversion. In the example, Standard_D8s_v6 is a non-d (no-temp-disk) size, chosen because the script doesn't support temp-disk source VMs. |
-FixOperatingSystemSettings |
Applies the OS-side changes NVMe needs so the VM boots cleanly on the new interface. |
-StartVM |
Starts the VM once the conversion completes, so you can move straight to validation. |
-IgnoreSKUCheck |
Skips the SKU compatibility guardrail. Use only when you know the target is valid and the check is too strict. |
-WriteLogfile |
Writes a log of the run. Keep it, it's your record of what changed and your first stop if something looks off. |
Verify the conversion
Before you hand the VM back, confirm it came up on NVMe. Convert SCSI to NVMe for Linux and Windows VMs walks through the full set of checks. The essentials:
- Confirm the target series presents NVMe disks. The Azure Boost availability table lists which sizes do.
- Check that the OS now sees the disks over NVMe. On Linux, list namespaces with
lsblkornvme listand confirm the OS disk is/dev/nvme0n1. On Windows, confirm the disks are healthy in Disk Management under the built-in NVMe controller. - Make sure mounts use stable identifiers,
/dev/disk/azure/*symlinks or UUIDs in/etc/fstab, because NVMe device numbers aren't stable across reboots.
If a check fails, revert with the script (see Revert the conversion) and retry after fixing the OS image.
Revert the conversion
If the converted VM doesn't validate, run the script again with -NewControllerType "SCSI" and the original size to switch the controller back. Because the disks are untouched, the revert is a controller and size change, not a restore. Even so, keep the backup from the checklist until validation passes.