Skip to content
Ask the community about this page

Create an Azure Virtual Machine Start/Stop package

Timextender Orchestration & Data Quality 23.3+Timextender Data Platform 26.3+cloud

An Azure Virtual Machine Start/Stop package starts, restarts or shuts down a VM when it runs. Its usual job is to have a machine running only while something needs it — a gateway VM that is required for the nightly load and idle for the other twenty hours.

Before you start

  • An Azure App Registration data provider in the workspace

The Azure App Registration whose service principal this package acts as. It decides which Azure resources you can choose below.

  • The principal able to enumerate resource groups in the subscription. This package finds its resource that way, so without it the resource list is empty and the package cannot be completed.
  • The principal needs permission to change the resource, not only read it. Listing it and scaling it are different rights.

How it works

You choose a data provider, then a virtual machine to act on, then what to do to it.

When the resource list is empty the editor says so explicitly, naming the scope it searched — No … were found in … this data provider can see. That is a permissions answer, not a fault.

Each of these packages performs one action. Scaling up before a load and back down afterwards is two packages, ordered in a process map or on a schedule — which is also what makes the saving visible in the execution log.

The action

What the package does to the machine when it runs. Shut down deallocates it, which is what stops compute billing; Restart cycles it in place.

That sentence contains the money. Shut down deallocates the machine, which is what stops you paying for compute. A VM merely stopped from inside the guest OS keeps billing. Restart cycles it in place and is for recovery, not for saving anything. Start brings a deallocated machine back online.

Storage keeps costing while the machine is deallocated. The saving is compute only.

Steps

Screenshots stop at the data provider

The images are real but end there: no service principal on our test environment can enumerate resource groups, so the resource and action steps have no screenshot yet. The prose comes from the product's own field help and validation.

1. Create the package

Orchestration → Packages → Create, then Azure Virtual Machine Start/Stop from the Azure area.

Azure Virtual Machine Start/Stop in the picker

A new Azure Virtual Machine Start/Stop package

2. Choose the data provider

The data provider list

3. Choose the resource, then the action

Both come from the selections above. The Action is Start, Restart or Shut down. If the resource list is empty, see Troubleshooting.

4. Save

Saves as a Draft.

A worked pattern

A pair of packages: Start at 22:00, and Shut down as the last step of the load's process map.

Best practices

Pair the packages. A scale-up with no matching scale-down is how a cost-optimisation exercise becomes a cost increase. Put both in the same process map.

Order them around the work, not on a clock. A scale-down scheduled for 06:00 will run whether or not the load finished. A scale-down that depends on the load step will not.

Make the down action the one that cannot be skipped. If the flow can fail between up and down, arrange for the down step to run anyway.

Give the principal least privilege, scoped to the specific resource rather than the subscription.

Check the cost model before assuming a saving. Not every action stops billing — the field help is explicit about which ones do.

Troubleshooting

The resource list is empty. The service principal cannot enumerate resource groups, or cannot see resources of this type. Grant subscription-level Reader or Microsoft.Resources/subscriptions/resourceGroups/read, then use the refresh button. The editor's own message names the scope it searched.

The resource lists but the action fails at run time. Read permission without write permission. The principal needs a role that can change the resource, not just see it.

The package succeeds but nothing changed. The resource was already in the target state. These actions are idempotent, which is usually what you want, but it means "succeeded" does not prove anything moved.

A resource that was renamed or deleted in Azure. The package stores the reference it was configured with. Reopen it, re-pick from the refreshed list, and save.

Reference

Fields

Field Required Notes
Data provider Yes Azure App Registration; decides which resources are selectable
Resource Yes Found via the subscription and resource group; has a refresh button
Action Yes Start, Restart, or Shut down
Advanced JSON No For settings the form does not expose

Validation: Please select a data provider, Please select a virtual machine, Please select an operation.

Discussed in the community

Looking for related questions…

Didn't find your answer? Ask the community about this page — questions are answered by Timextender experts, partners and other users.