Skip to main content

Start Virtual Machine & Stop Virtual Machine

These actions start or stop all virtual machines in the selected resource groups and resources.

They support AWS, Azure, Google Cloud, and IBM Cloud virtual machines. Other resources, including on-premises machines onboarded with SSM hybrid mode, are not supported and fail with Only AWS, Azure, GC and IBM instances are supported.

What happens when a virtual machine starts​

The Start Virtual Machine action asks the cloud provider to start the virtual machine and waits for the provider's response:

  • AWS: waits up to 14 minutes for the instance to reach the running state. If it does not, the action fails.
  • Azure: checks the power state for up to 5 minutes. If the virtual machine has not reached PowerState/running by then, the action still succeeds. current_status in the action log shows the last state that was observed.
  • Google Cloud: waits up to 14 minutes for the start operation to complete. If the operation does not complete in time, the action fails.
  • IBM Cloud: checks the state for up to 5 minutes. If the virtual machine has not reached the running state, the action fails.

The Stop Virtual Machine action waits in the same provider-specific way for the virtual machine to stop. On Azure, it waits for the virtual machine to be deallocated.

If the Action Window Duration ends before the provider responds, the action ends with Timeout status for that resource.

The virtual machine may not be ready yet

A successful Start Virtual Machine action does not mean the virtual machine is ready to run the next action. Fleet Control does not wait for the operating system to finish booting, for the SSM Agent to connect, or for the resource status in Fleet Control to update.

If the next action runs before the SSM Agent is connected, it can fail on that resource.

To give the virtual machines time to boot, do one of the following after the Start Virtual Machine action:

  • Add a Delay action.
  • Set the Skip Window of the Start Virtual Machine action to Never. The next action then starts only when the Start Virtual Machine action's Action Window Duration ends.

Inside an Action Batch, each action starts on a resource as soon as the previous action on that resource finishes. Delay actions and Skip Window settings cannot add a wait between actions inside a batch. To give virtual machines time to boot, run the Start Virtual Machine action as a separate plan step before the batch, followed by a Delay action or with its Skip Window set to Never.

See Actions fail right after Start Virtual Machine for more details.

Already running or stopped virtual machines and Stop Only Started​

Both actions are designed to be idempotent, meaning they will not fail if the virtual machine is already running or stopped.

The Stop Virtual Machine action is integrated with the Start Virtual Machine action and features a functionality, which when enabled, makes it stop only these virtual machines that the Start Virtual Machine action started during a particular plan execution. This feature is Stop Only Started, you can find it in Advanced Action Settings.

The diagram below shows the Start Virtual Machine action operation with the Stop Only Started feature deactivated and activated. When you deactivate the option, the action stops all virtual machines. When you enable the option, the virtual machines running before executing the Start Virtual Machine action do not stop. Only the one that started during the plan execution stops again.

caution

If a plan doesn't have the Start Virtual Machine action set up, or if the Start Virtual Machine action doesn't precede the Stop Virtual Machine action in the action list, the Stop Only Started feature will not stop any virtual machines.

info

For Azure machines, the stop action requests deallocation rather than powering off the virtual machine.