Updating the image to the scaleset and that image is in different subscription

Varma 1,140 Reputation points
2024-03-20T06:54:33.1866667+00:00

can we update the scaleset image and that image is available in different subscription

If yes, could you please share me the command.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,146 questions
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.
347 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 2,915 Reputation points
    2024-03-20T22:09:36.1766667+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    Here are the commands you might use:

    az vmss update --name <vmss-name> --resource-group <resource-group-name> --set virtualMachineProfile.storageProfile.imageReference.id=<image-id>
    

    Ensure that the account used to authenticate has sufficient permissions in both subscriptions to read and update resources.

    Keep in mind that updating the VMSS image will trigger a rolling upgrade of the VM instances in the scale set, during which each instance will be updated with the new image. This may result in downtime for your application, depending on your configuration and update strategy. Therefore, it's essential to plan and execute this operation carefully, especially in production environments.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments