Hello, @Leandro Grupozani !
I received an email saying that workloads are running on images scheduled for deprecation. What should I do?
The virtual machine documentation has a complete guide for what to do if your VM image has been scheduled for deprecation (including migration):
https://learn.microsoft.com/en-us/azure/virtual-machines/deprecated-images
Before the scheduled deprecation date, you can continue to deploy new VM or scale set instances up until the deprecation date.
After the scheduled deprecation date, you won't be able to deploy new instances using the affected images. If the plan is scheduled for deprecation, all image versions within the plan will no longer be available. If the entire offer is scheduled for deprecation, all plans within the offer will no longer be available following deprecation.
- Active VM instances won't be impacted.
- New VM instances can't be created from any of the impacted images.
- Existing virtual machine scale sets deployments can't be scaled out if configured with any of the impacted images. When a plan or offer is being deprecated, all existing scale sets deployments pinned to any image within the plan or offer respectively can't be scaled out.
Identifying affected VMs (and VMSS):
You can use Azure Resource Graph, Azure CLI, and Azure PowerShell to list the affected images. These are the steps using Azure CLI:
List VM with deprecated image at Plan/SKU level.
az vm show --resource-group $rgName --name $vmName --query "storageProfile.imageReference.exactVersion
az vm list --query "[?storageProfile.imageReference.sku=='2016-Datacenter'].{VM:id, imageOffer:storageProfile.imageReference.offer, imagePublisher:StorageProfile.imageReference.publisher, imageSku: storageProfile.imageReference.sku, imageVersion:storageProfile.imageReference.version}"
List VM with deprecated image at version level.
(Get-AzVM -ResourceGroupName $rgname -Name $vmname).StorageProfile.ImageReference.ExactVersion
You can migrate to another offer, plan, or version using Azure CLI and Azure PowerShell. Here are the steps for Azure CLI:
To migrate to another offer:
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer"
To migrate to another Plan:
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer"
To migrate to another version:
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer" --sku "2019-Datacenter-with-Containers" --all"
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!