|
| 1 | +### YamlMime:FAQ |
| 2 | +metadata: |
| 3 | + title: Deprecated Azure Marketplace images |
| 4 | + description: "Learn about how the deprecation of Marketplace images can affect your deployment." |
| 5 | + author: cynthn |
| 6 | + ms.service: virtual-machines |
| 7 | + ms.topic: faq |
| 8 | + ms.subservice: imaging |
| 9 | + ms.date: 09/27/2022 |
| 10 | + ms.author: cynthn |
| 11 | + ms.reviewer: edewe |
| 12 | + |
| 13 | +title: Deprecated Image FAQ |
| 14 | +summary: This article answers commonly asked questions about what happens when images in the Azure Marketplace are deprecated. |
| 15 | + |
| 16 | + |
| 17 | +sections: |
| 18 | + - name: Ignored |
| 19 | + questions: |
| 20 | + - question: I got an email that my image is scheduled for deprecation, what does this mean? |
| 21 | + answer: | |
| 22 | + You might have received an email telling you that your Virtual machine is running on images that are scheduled for deprecation or already deprecated. There are several reasons an image can be deprecated by the publisher, which might be due to security issues or the image reaching end of life. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + An image can be deprecated on the version, plan or offer level: |
| 27 | + - Deprecation of an image version - the removal of an individual VM image version |
| 28 | + - Deprecation of a plan or SKU - the removal of a plan or SKU and all images within the plan |
| 29 | + - Deprecation of an offer - the removal of an entire VM offer, including all plans within the offer and all images within each plan. |
| 30 | + |
| 31 | + - question: I received an email that my workloads are running on images that are scheduled for deprecation. What does this mean and does deprecation impact my existing workloads? |
| 32 | + answer: | |
| 33 | + Before the scheduled deprecation date, you can continue to deploy new VM or scale set instances up until the deprecation date. |
| 34 | + |
| 35 | + 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. |
| 36 | + |
| 37 | + - Active VM instances won't be impacted. |
| 38 | + - New VM instances can't be created from any of the impacted images. |
| 39 | + - 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. |
| 40 | + |
| 41 | + |
| 42 | + **What do I need to do?** |
| 43 | +
|
| 44 | + If you want your scale set to scale out after the deprecation date, you'll need to identify the scale set running on the deprecated image, and then migrate your workload to a supported image. If you want to remain on the image after deprecation, you can create your own custom image and migrate to it (Steps outlined below). If you already have auto updates configured for your VM or scale set, you'll only be impacted when an Offer or plan version is deprecated (No impact on image version deprecation). |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + - question: How can I identify the VMs and scale sets in my subscription that are running on images that are scheduled for deprecation? |
| 49 | + answer: | |
| 50 | + You can search for the scheduled or deprecated image in your subscription in the following ways: |
| 51 | + |
| 52 | + |
| 53 | + If you are notified that an image is deprecated on only the Offer or plan (SKU) level, you can search for all virtual machines from the search bar in the Azure Portal. Edit the columns to include Publisher, Offer, and Plan. This will not give the version information, only up to the Plan information. |
| 54 | + |
| 55 | + |
| 56 | + If you are notified that an image is deprecated on the offer, plan (SKU) or version level, you can use Azure Resource Graph Explorer on the Azure portal to find the specific version for images in your subscription that your VM or scale set is running on. |
| 57 | + |
| 58 | +
|
| 59 | + Run the queries below in the Azure Resource Graph explorer query window and uncomment the optional filters (delete the “//” to uncomment a line) to the Offer, Plan (SKU) or version level you are looking for. |
| 60 | + |
| 61 | +
|
| 62 | + To find the details of the image versions that are being used by VMs: |
| 63 | + |
| 64 | + ``` |
| 65 | + Resources |
| 66 | + |where type == "microsoft.compute/virtualmachines" |
| 67 | + //| where properties.storageProfile.imageReference.publisher =~ 'Windows' //optional filter, uncomment this line to filter for a specific publisher. |
| 68 | + //| where properties.storageProfile.imageReference.sku =~ '2016-Datacenter' //optional filter, uncomment this line to filter for a specific deprecated SKU (Plan). |
| 69 | + //| where properties.storageProfile.imageReference.version == '14393.4467.2106061537' //optional filter, uncomment this line to filter for a specific deprecated version. |
| 70 | + |project name, subscriptionId, resourceGroup, ImagePublisher=properties.virtualMachineProfile.storageProfile.imageReference.publisher,ImageOffer=properties.virtualMachineProfile.storageProfile.imageReference.offer,imageSku=properties.virtualMachineProfile.storageProfile.imageReference.sku, imageVersion=properties.virtualMachineProfile.storageProfile.imageReference.version |
| 71 | + ``` |
| 72 | + |
| 73 | + |
| 74 | + To find details of the image versions that are being used by a scale set: |
| 75 | + |
| 76 | + ``` |
| 77 | + Resources |
| 78 | + |where type == "microsoft.compute/virtualmachinescalesets" |
| 79 | + //| where properties.virtualMachineProfile.storageProfile.imageReference.publisher =~ 'Windows' //optional filter, uncomment this line to filter for a specific publisher. |
| 80 | + //| where properties.virtualMachineProfile.storageProfile.imageReference.sku =~ '2016-Datacenter' //optional filter, uncomment this line to filter for a specific deprecated SKU (Plan). |
| 81 | + //| where properties.virtualMachineProfile.storageProfile.imageReference.version == '14393.4467.2106061537' //optional filter, uncomment this line to filter for a specific deprecated version. |
| 82 | + //| where properties.virtualMachineProfile.storageProfile.imageReference.version != "latest" //optional filter, uncomment this line to filter out scale sets that are not using "latest version" in the model. |
| 83 | + |project name, subscriptionId, resourceGroup, ImagePublisher=properties.virtualMachineProfile.storageProfile.imageReference.publisher,ImageOffer=properties.virtualMachineProfile.storageProfile.imageReference.offer,imageSku=properties.virtualMachineProfile.storageProfile.imageReference.sku, imageVersion=properties.virtualMachineProfile.storageProfile.imageReference.version |
| 84 | + ``` |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + **Using Azure CLI:** |
| 89 | +
|
| 90 | +
|
| 91 | + List VM with deprecated image at Plan/SKU level. |
| 92 | + |
| 93 | + ```azurecli |
| 94 | + az vm show --resource-group $rgName --name $vmName --query "storageProfile.imageReference.exactVersion |
| 95 | + 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}" |
| 96 | + ``` |
| 97 | + |
| 98 | + List VM with deprecated image at version level. |
| 99 | + |
| 100 | + ```azurecli |
| 101 | + az vm list --query "[?storageProfile.imageReference.version=='14393.4402.2105052108'].{VM:id, imageOffer:storageProfile.imageReference.offer, imagePublisher:StorageProfile.imageReference.publisher, imageSku: storageProfile.imageReference.sku, imageVersion:storageProfile.imageReference.version}" |
| 102 | + ``` |
| 103 | + |
| 104 | + |
| 105 | + **Using PowerShell:** |
| 106 | + |
| 107 | + List VM with deprecated images at version level. |
| 108 | + |
| 109 | + ```powershell |
| 110 | + (Get-AzVM -ResourceGroupName $rgname -Name $vmname).StorageProfile.ImageReference.ExactVersion |
| 111 | + ``` |
| 112 | + |
| 113 | + To find scale set using a deprecated version. |
| 114 | + |
| 115 | + ```powershell |
| 116 | + $vmsslist = Get-AzVmss |
| 117 | + $vmsslist | where {$_.virtualMachineProfile.storageProfile.imageReference.Version -eq '14393.4402.2105052108'} | Select-Object -Property ResourceGroupName, Name, @{label='imageOffer'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Offer}}, @{label='imagePublisher'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Publisher}}, @{label='imageSKU'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Sku}}, @{label='imageVersion'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Version}} |
| 118 | + ``` |
| 119 | + |
| 120 | + List scale sets with deprecated images at plan/SKU level. |
| 121 | + |
| 122 | + ```powershell |
| 123 | + $vmsslist = Get-AzVmss |
| 124 | + $vmsslist | where {$_.virtualMachineProfile.storageProfile.imageReference.Sku -eq '2016-Datacenter'} | Select-Object -Property ResourceGroupName, Name, @{label='imageOffer'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Offer}}, @{label='imagePublisher'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Publisher}}, @{label='imageSKU'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Sku}}, @{label='imageVersion'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Version}} |
| 125 | + ``` |
| 126 | + |
| 127 | + When an image is deprecated, there is no impact on existing VMs and no action is required. You can choose to migrate your workloads to a new image if you have a specific concern. |
| 128 | + |
| 129 | + - question: How do I migrate my workloads to another image? |
| 130 | + answer: | |
| 131 | + You might want to keep using an image that is scheduled for deprecation for specific reasons or you might want to migrate your workloads to another Offer/Plan/Version. |
| 132 | + |
| 133 | + If you want to keep using an image that is scheduled for deprecation, generalize the VM, deallocate the VM, then create a custom image for your VM or scale set. Then change the VM or scale set deployment to point to the custom image. For more information, see [Capture an image of a VM in the portal](capture-image-portal.md). |
| 134 | + |
| 135 | + We recommend that you create custom images from free Marketplace images, that do not have Plan Info, that are scheduled for deprecation. For Paid Marketplace images, we suggest you create custom images from the latest version of the image. Workloads running on custom images created from a deprecated paid image will no longer work after the paid image is deprecated. |
| 136 | + |
| 137 | + **You want to migrate to another offer/plan/version:** |
| 138 | +
|
| 139 | +
|
| 140 | + First, search for other offers, plans, or versions from the same publisher. |
| 141 | + |
| 142 | + **To migrate to another offer:** |
| 143 | +
|
| 144 | + Using the Azure CLI: |
| 145 | + |
| 146 | + ```azurecli |
| 147 | + az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" |
| 148 | + ``` |
| 149 | +
|
| 150 | + |
| 151 | + Using PowerShell: |
| 152 | + |
| 153 | + ```powershell |
| 154 | + Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer” |
| 155 | + ``` |
| 156 | + |
| 157 | + |
| 158 | + **To migrate to another Plan:** |
| 159 | + |
| 160 | + Search for other plans under the same offer and then migrate to that plan. |
| 161 | + |
| 162 | + |
| 163 | + Azure CLI: |
| 164 | + |
| 165 | + azurecli |
| 166 | + az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer" |
| 167 | + ``` |
| 168 | + |
| 169 | + PowerShell: |
| 170 | + |
| 171 | + ```powershell |
| 172 | + Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer” -Offer “WindowsServer” |
| 173 | + ``` |
| 174 | +
|
| 175 | +
|
| 176 | + **To migrate to another version:** |
| 177 | + |
| 178 | + Search for another version. We suggest migrating to the latest version. |
| 179 | + |
| 180 | + |
| 181 | + Azure CLI: |
| 182 | + |
| 183 | + ```azurecli |
| 184 | + az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer" --sku "2019-Datacenter-with-Containers" --all" |
| 185 | + ``` |
| 186 | + |
| 187 | + PowerShell: |
| 188 | + |
| 189 | + ```powershell |
| 190 | + Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer” -Offer “WindowsServer” -Skus "2019-Datacenter-with-Containers" |
| 191 | + ``` |
| 192 | + |
| 193 | + You need to verify that your workloads are supported and will run properly on the new image before migrating your workloads to the new image. |
| 194 | + |
| 195 | + Scale sets, in general, support [image reference replacement](../virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set.md#os-updates) but VMs do not. |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + **Migrating scale set workloads to newer image with minimal downtime** |
| 200 | + |
| 201 | + Scale set, suggestions for updating the version should include: |
| 202 | + - To avoid downtime, ensure the upgrade policy is set to manual or rolling. |
| 203 | + - If set to manual, existing instances won’t be reimaged until it’s manually upgraded. |
| 204 | + - If set to rolling, existing instances will be automatically upgraded and reimaged by batch. |
| 205 | + - Update image reference using the steps in [Modify an Azure virtual machine scale set](/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set.md). |
| 206 | + - Ensure that all existing instances are upgraded and on the latest model. You can also scale out and migrate workload to the new instances then delete the old instances, instead of upgrading the existing instances. |
| 207 | + - Once the existing instances are all upgraded to the new image, change the upgrade policy back to what it was if needed. |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + - question: Are all image versions lower than the indicated version also deprecated? |
| 212 | + answer: | |
| 213 | + Generally, yes. However, it is recommended to confirm against the list of valid versions in a Plan using [Virtual Machine Images - List](/rest/api/compute/virtual-machine-images/list?tabs=HTTP). |
| 214 | + |
| 215 | + - question: How can I check if a specific image is deprecated or scheduled for deprecation? |
| 216 | + answer: | |
| 217 | + You can check if an image is deprecated or scheduled for deprecation using the [REST API](/rest/api/compute/virtual-machine-images/get?tabs=HTTP). |
| 218 | + |
| 219 | +
|
| 220 | + If the image is deprecated, you'll get a **VM Image is Deprecated** response. If the image is scheduled for deprecation, the response would show the date of the scheduled deprecation. |
| 221 | + |
| 222 | + |
| 223 | + The response indicates that this is deprecated: |
| 224 | + |
| 225 | + ```json |
| 226 | + { |
| 227 | + "error": { |
| 228 | + "code": "ImageVersionDeprecated", |
| 229 | + "message": "VM Image from publisher: MicrosoftWindowsServer with - Offer: WindowsServer, Sku: 2016-Datacenter, Version: 14393.4169.2101090332 is deprecated." |
| 230 | + } |
| 231 | + } |
| 232 | + ``` |
| 233 | + |
| 234 | + |
0 commit comments