Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update custom images? #16899

Closed
mail4mohit opened this issue Oct 16, 2018 — with docs.microsoft.com · 14 comments
Closed

How to update custom images? #16899

mail4mohit opened this issue Oct 16, 2018 — with docs.microsoft.com · 14 comments

Comments

Copy link

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)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@jakaruna-MSFT
Copy link
Contributor

Thanks for the feedback! We are currently investigating and will update you shortly.

@fiftin
Copy link

fiftin commented Oct 16, 2018

@jakaruna-MSFT Is it possible to update custom image for VMSS? I can't find any information about it.

@fiftin
Copy link

fiftin commented Oct 16, 2018

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?

@jakaruna-MSFT
Copy link
Contributor

@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.

@jakaruna-MSFT
Copy link
Contributor

@mail4mohit @fiftin I will assign the issue to the content author to fix the broken link.

Copy link
Author

@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)."

@jakaruna-MSFT
Copy link
Contributor

@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.

@gatneil
Copy link
Contributor

gatneil commented Oct 21, 2018

@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.

  1. 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.

  2. 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

@jakaruna-MSFT
Copy link
Contributor

@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.

@jakaruna-MSFT jakaruna-MSFT removed their assignment Oct 23, 2018
@mail4mohit
Copy link
Author

@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!

@zr-msft
Copy link
Contributor

zr-msft commented Nov 2, 2018

I have a fix for this issue and I'll add it to the docs soon.

#please-close

@Karishma-Tiwari-MSFT
Copy link
Member

@zr-msft Is the fix out yet? Please let me know. Thanks. :)

@zr-msft
Copy link
Contributor

zr-msft commented Mar 1, 2019

@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

@Karishma-Tiwari-MSFT
Copy link
Member

Thanks @zr-msft :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants