Mahesh Kava
Mahesh Kava

Reputation: 791

The Image type for a Virtual Machine Scale Set may not be changed

I already have a VMSS provisioned with a base setup of Centos OS on linux. I created an image with my custom image setup (software, applications,etc) and I am run ARM script to update the VMSS, however it fails with

"error": {
"code": "OperationNotAllowed",
"message": "The Image type for a Virtual Machine Scale Set may not be changed."

}

Is it possible to update the image without deleting the VMSS and recreating?

Upvotes: 0

Views: 3356

Answers (3)

Benyamin Famili
Benyamin Famili

Reputation: 119

You can reimage from your custom image1 to the custom image2 as long as images have same publisher and the same offer

Upvotes: 2

Joy Wang
Joy Wang

Reputation: 42063

The Image reference publisher and offer properties just could be set when it be created, they could not be modified.

See: Properties with restrictions on modification

If you use the custom image, you can update the image by updating the imageReference ID, also can use REST API, Powershell and CLI.

Upvotes: 0

4c74356b41
4c74356b41

Reputation: 72171

Basically what Joy Wang pointed out in the comments, some properties can only be set at creation time:

  1. Availability Zones
  2. Image reference publisher
  3. Image reference offer
  4. Managed OS disk storage account type

there are several other quirks, you should read this article: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set#create-time-properties

Upvotes: 1

Related Questions