Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.61k stars 2.83k forks source link

API to auto-enable extensions after provisioning a VM #37413

Open lovettchris opened 1 month ago

lovettchris commented 1 month ago

Is your feature request related to a problem? Please describe.

I'm not sure why but when I create a VM from my ARM template the OmsAgentForLinux (and the AzurePolicyforWindows on windows VM's) come up disabled and then I have to go to the portal to enable it manually clicking this:

image

and for Windows VM's

image

Describe the solution you'd like

Is there an python API I can use to do this?

Describe alternatives you've considered

Manual is tedius.

Additional context

This is my Linux OS configuration:

          "linuxConfiguration": {
            "patchSettings": {
              "patchMode": "ImageDefault",
              "assessmentMode": "AutomaticByPlatform"
            },
            "disablePasswordAuthentication": false,
            "provisionVMAgent": true,
            "enableVMAgentPlatformUpdates": true
          }

and windows:

          "windowsConfiguration": {
            "enableAutomaticUpdates": true,
            "provisionVmAgent": true,
            "patchSettings": {
              "enableHotpatching": "[variables('enableHotpatching')]",
              "patchMode": "[variables('patchMode')]"
            },
            "enableVMAgentPlatformUpdates": true,
          }
github-actions[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @avirishuv @Drewm3.

GabstaMSFT commented 1 month ago

@lovettchris have you followed this doc for configuring VM Extension Auto Upgrade? https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-extension-upgrade?tabs=RestAPI1%2CRestAPI2

In your template for each extension the paramter ""enableAutomaticUpgrade": true," needs to be set.

github-actions[bot] commented 1 month ago

Hi @lovettchris. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] commented 1 month ago

Hi @lovettchris, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

lovettchris commented 1 month ago

Thanks for the link to the documentation on how to enable automatic upgrade on extensions, I will try this.

lovettchris commented 1 month ago

I see the VM setup is different than the VMSS setup. In the spirit of "secure by default" could you add a way to enable all this at the time of VM creation rather than having to do another update to the named extensions after the VM is created?

tanmaygore commented 1 week ago

@lovettchris, thanks for providing this feedback. We are already working on enabling this capability by default for all supported extension instances in the spirit of "secure by default". It will take us sometime time to gradually rollout this default so as to prevent any unnecessary outages but we are committed to delivering this feature.

lovettchris commented 1 week ago

fantastic!