Update image is faling in the existing scale set

sns 9,246 Reputation points

I have image is below and name of the image is "WebServer"

and you can also "scaleset" details.

User's image

and scaleset:

User's image

although I execute correct command, giving following error: Please suggest

User's image

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
332 questions
{count} votes

2 answers

Sort by: Most helpful
  1. vipullag-MSFT 23,491 Reputation points Microsoft Employee

    Hello sns

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Based on the error screenshot shared, because the specified image is not available in the "East US" region, where your virtual machine scale set (VMSS) is located. However, the screenshot shared shows the Image and VMSS are in East US region only. That is weird.

    Try to troubleshoot this by verifying the image and VMSS locations. Try VMSS update with another image to check the exact issue.

    Confirm that the image you want to use for updating the VMSS is available in the "East US" region using the Azure CLI or PowerShell commands.

    Ex for Azure CLI:

    az vm image list --location eastus --publisher <publisher_name> --offer <offer_name> --sku <sku_name> --all

    If the image is not available in the "East US" region, consider using an alternative image that is available in the same region.

    Once you have confirmed that the desired image is available in the "East US" region, retrieve the correct ImageReferenceId for that image. The ImageReferenceId should be in the format: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/images/{image-name}.

    Try to update VMSS with the correct image reference and see if that helps.

    Hope that helps.

    0 comments No comments

  2. TP 66,161 Reputation points


    Based on your screenshots it appears you are using incorrect ImageReferenceId. Please test below powershell command:

    Update-AzVmss `
    -ResourceGroupName VMSSRG `
    -VMScaleSetName VMScalSet `
    -ImageReferenceId /subscriptions/9304842d-2d0f-44cc-b12c-4df25a3c5ff5/resourceGroups/VMSSRG/providers/Microsoft.Compute/galleries/GalleryInstance/images/WebServer

    Please click Accept Answer if the above was helpful.