How to update custom images? I created custom image from a VM but they do not have a URI whereas scale sets update seem to need a URI.
The article talks about providing an example of updating a scale set using a custom image but never provides that. There is a link to "REST API Documentation" that is supposed to provide some details but that link does not work (https://docs.microsoft.com/rest/api/compute/virtualmachinescalesets/createorupdate)
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback! We are currently investigating and will update you shortly.
@jakaruna-MSFT Is it possible to update custom image for VMSS? I can't find any information about it.
Oh, I found this post: https://social.msdn.microsoft.com/Forums/en-US/352d03c3-52d9-4fa8-a370-270731889fab/auto-scale-set-change-image-operationnotallowed?forum=AzureStack
Answer of MSFT specialist: Unfortunately, Updating the image in a Scale-Set and Auto Scale-Sets are not yet supported in ASDK. Is it true?
@fiftin We can use a custom image while creating a scale set. But changing the scale set image after creating is not supported. The list of properties which can be set only during create and not allowed to change(updating) are documented in the same article. Please find that here.
@mail4mohit @fiftin I will assign the issue to the content author to fix the broken link.
@jakaruna-MSFT You mention in response to @fiftin above that updating custom images is not supported but this article mentions multiple times that custom images are supported.
Reference-1
"It's also common for applications to be deployed through a custom image. This scenario is covered in the following section."
Reference-2
"If you use custom images, you can update the image by updating the imageReference ID (more information, see the REST API documentation)."
@mail4mohit I meant updating as removing the old image and adding a new image altogether. Thats why i shared this creation time properties.
I got the link which has to be in plcae of the broken link which you have pointed out.
Try out and check if the new link works. Meanwhile I will check about upgrading the image version.
@mail4mohit @jakaruna-MSFT there are lots of separate things making this more confusing than it should be :).
1) Updating which custom image your scale set is using is supported. Specifically, somewhere in our ARM template (or CLI/PS script), you specify an image ID like this:
"storageProfile": {
"imageReference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
},
When you have a new image, you need to change this property to point to your new image.
2) The "URI" you're referring to is an old way of doing custom images. It's still supported (which is why it still shows up in the documentation), but you don't want to do it this way unless you really, really need to.
3) In the MSDN thread above, the poster tried to change from a platform image to a custom image. This is not supported, which is why they got the error they did.
Hope this helps! :)
-Neil
@cynthn @zr-msft In the document image is mentioned as a parameter which we cant change after creation. But looks like we can change. Please review that document and update as needed.
@gatneil - thanks a lot for your clarification - I agree there were a number of different items making this more confusing than it is. A colleague at my work place was also hinting about using image id - we changed our strategy to use custom scripts to update VM for now but I can see now how this should work. Thanks again for bringing clarity!
I have a fix for this issue and I'll add it to the docs soon.
@zr-msft Is the fix out yet? Please let me know. Thanks. :)
@Karishma-Tiwari-MSFT fixed here: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set#update-the-os-image-for-your-scale-set
Thanks @zr-msft :)
Most helpful comment
@mail4mohit @jakaruna-MSFT there are lots of separate things making this more confusing than it should be :).
1) Updating which custom image your scale set is using is supported. Specifically, somewhere in our ARM template (or CLI/PS script), you specify an image ID like this:
"storageProfile": {
"imageReference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
},
When you have a new image, you need to change this property to point to your new image.
2) The "URI" you're referring to is an old way of doing custom images. It's still supported (which is why it still shows up in the documentation), but you don't want to do it this way unless you really, really need to.
3) In the MSDN thread above, the poster tried to change from a platform image to a custom image. This is not supported, which is why they got the error they did.
Hope this helps! :)
-Neil