VM sequencing defines the order that the VMs in an environment start and stop.
VM sequencing lets you stagger power-state changes for the VMs in an environment by organizing them into stages:
- When you Run (or resume) the environment, the VMs start according to their staged sequence, including any delays that you have specified between stages.
- When you Suspend, Shut down, or Power off your environment, the VM power states are applied in the reverse order: Final Stage > Stage 3 > Stage 2 > Stage 1.
- You can also set a delay between stages, which can be useful for making sure some VMs are fully running before other VMs (for example, start a database server before you start an application server that needs the database server). These delays can also help make sure that a power-state action for a large group of VMs doesn’t cause capacity-induced delays.
The Suspend action is available only for x86 The most common CPU architecture. x86 CPUs support Windows and Linux VMs in Skytap Cloud. VMs. Power A CPU architecture that supports IBM i, AIX, and Linux (on Power) in Skytap Cloud. VMs won’t suspend.
Setting the VM start and stop order
VM sequencing is available in all environments. By default, all VMs start and stop at the same time—in the final stage, which means VM sequencing is off.
Enable VM sequencing by adding VMs to other stages. A sequence runs every time you start or stop the environment. If you save the environment as a template, the VM sequencing settings are saved with the template and used in any environments created from that template.
To set a VM sequence for your environment
- Navigate to the environment you want to edit.
- From the environment details page, click VM sequencing.
- Organize your VMs into stages. You can use some or all of the stages. Stage 1 starts first and stops last. By default, all VMs are in the Final Stage.
- Set a delay of 0 to 60 minutes between each of the stages you are using.
- Click Save.
You can click Bottom and Top to quickly navigate to the bottom or top of the VM Sequencing page. This is useful for large environments with many VMs.
Running the VM sequence
If you set a VM sequence for an environment, the sequence runs every time you start or stop the environment. While the sequence runs, the environment is busy until the sequence finishes.
Starting the VMs in order
When you Run the environment:
- The VMs in Stage 1 start.
- The Delay After stage 1 elapses.
- The VMs in Stage 2 start.
- The Delay After stage 2 elapses.
- The VMs in Stage 3 start.
- The Delay After stage 3 elapses.
- The VMs in the Final Stage start.
The sequence skips any stage with no VMs or where the VMs are already running. If a stage is skipped, the delay after it is also skipped.
VMs set to Do not run don’t start. To start them manually, click (Run) on the individual VM in the environment details page.
Stopping the VMs in order
When you stop an environment with Suspend, Shut Down, or Power Off:
The same stop process (Suspend, Shut Down, or Power Off) is applied to all VMs in the sequence.
- All VMs in Final Stage stop.
- All VMs in Stage 3 stop.
- All VMs in Stage 2 stop.
- All VMs in Stage 1 stop.
VM sequencing skips delays during the stop process. The sequence skips any stage with no VMs or where the VMs are already stopped.
Canceling a running sequence
To cancel a running VM start-up sequence, click Cancel. As soon as any in-progress actions complete, the rest of the sequence is halted.
The sequence panel is only displayed during start up sequences. This panel is not displayed during suspend, shut down, or power off sequences.
Turning off VM sequencing
To turn off VM sequencing, move all of the VMs to the final stage by clicking All in the Final Stage.
To eliminate pauses between start-up times but preserve a VM sequence, set the delay between stages to 0 minutes. VM sequencing is still on, but there is no timed delay between each group.
Reviewing an example VM sequence
If you have a web server in Stage 1, a three-minute delay, a business logic server in Stage 2, a ten-minute delay, and a database server in Stage 3, here’s what happens to the environment when you click Run:
- The web server begins to start up.
- When the web server is running, three minutes elapses.
- The business logic server begins to start up.
- When the business logic server is running, ten minutes elapses.
- The database server begins to start up.
When you click Shut down on the environment:
- The database server begins to shut down.
- After the database server has shut down, the business logic server begins to shut down.
- After the business logic server has shut down, the web server begins to shut down.
Advanced use FAQ
Who can edit VM sequences?
Anyone who can edit the environment also has permission to edit the VM sequence. This includes the user who created the environment, other users with permission over the environment through projects, and the account administrator.
When does VM sequencing use delays?
During a start up sequence, there is a separate delay after each of the first three stages. Each delay can be between 0 and 60 minutes. After all of the VMs in a stage have started, the delay after that stage begins.
Can I leave some machines out of the sequence?
You can omit machines from the sequence by setting them to Do not run.
VMs set to Do not run don’t start. To manually start them, click (Run) on the individual VM in the environment details page.
What happens if a VM encounters an error?
- If a VM has an error while starting up, the VM sequence is canceled. All of the VMs in the current stage continue to start up but VMs in later stages do not start. Troubleshoot the error, and then resume the sequence by clicking Run again. The VM sequence begins at the next stage (for example, if a VM experienced an error in stage 2, the VM sequence resumes from stage 3).
- An error while a VM tries to suspend, shut down, or power off in sequence affects only the VM with the error. The VM sequence does not stop. The remaining VMs transition to their new state in the appropriate stage.
How does VM sequencing treat an empty stage?
The sequence skips any stage with no VMs or where the VMs are already started, shut down, suspended, or powered off. For start-up sequences, the delay after an empty stage is skipped.
Does VM sequencing work if I run some, but not all, of the VMs in my environment?
Yes. The VM sequence applies to the selected VMs, which start in their staged order. VM sequencing ignores any unselected VMs, and any empty stages.
If I save my environment as a template, are VM sequencing settings saved to the template?
Yes. If you save your environment as a template, the VM sequencing settings are saved with the template and used in any environments created from that template.
What happens if I save a running environment as a template? Do the VMs suspend in order?
If you save a running environment as a template, all of your VMs suspend at the same time. VM sequencing does not affect the suspend order of the machines during this specific action.
What happens to the VM sequence if I merge environments and templates?
- When a template with saved sequencing is merged into an existing environment, the sequencing of the template is merged with that of the existing environment. Stage 1 of the template is combined with the Stage 1 of the environment, Stage 2 of the template is combined with Stage 2 of the environment, and so on. If both the environment and template have delays, the longest delay is used. If the template has delays and the environment does not, the template delays are used.
- If the template does not have a saved sequence but the environment does, the VMs are added to the last stage in the environment.
Do sharing portals recognize VM sequencing?
Yes. If you run, suspend, shut down, or power off an environment from a sharing portal, VM sequencing is used. If you have access to only some of the VMs within the environment, the VM sequence applies only to the VMs that you have access to run, suspend, shut down, or power off.
When does auto-suspend take effect?
If auto-suspend is enabled, the auto-suspend timer starts when the entire VM sequence completes or is canceled.
How are Metered RAM hours calculated for VM sequences?
Metered RAM hours A unit of measurement that corresponds to the total number of hours that your account has run VMs, translated into their Metered RAM equivalents. 1 Metered RAM hour is equivalent to 1 GM of Metered RAM running for 1 hour. To learn more, see How usage is calculated. are counted as soon as a VM begins running. During a start-up sequence, pending stages are not yet running and do not contribute to runtime.
What happens if I run out of resources during a VM sequence?
If you reach your resource limit during a VM sequence, the VM sequence stops with an error. All VMs successfully launched remain running.