Skip to content

Execution of CSE during VM upgrade or VM reimage #198

@hendrik-schaffer

Description

@hendrik-schaffer

I hope this is the right place to ask for our question.

We are currently running the following setup: We have configured a VMSS with a Linux custom script extension that contains a short lived access token. Upon VM creation the custom script extension is run and authenticates with this token against an external API.

As the token expires every hour, we are updating the VMSS via a cron job with a new valid token. Once the VMSS is updated, we also need to update the VMs to the latest model. What we have seen is that when running an "VM upgrade" the CSE is only executed sometimes. Do you know what triggers the execution in case of a "VM upgrade"?

Additionally, we need to reset the VM to its inital state and therefore we are using "VM reimage" command. Is there a possibility to Upgrade the VM and Reimage the VM at the same time? We are currently first doing a "VM upgrade" and then a "VM reimage". However, this sometimes leads to a duplicate execution of the CSE which is not what we want.

Looking forward for any ideas or suggestions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions