Skip to content

VM Scheduler

The VM Start/Stop scheduler manages the Pexip Infinity VMs (Management Node and Conference Node) by starting them during service hours and deallocating them outside of service hours. This reduces Azure compute costs by only running VMs when the Verify by Video service is available to citizens.

EnvironmentManagement NodeConference Node
Testvm-node-mgmt-testvm-node-conf-test
Productionvm-node-mgmt-corevm-node-conf-core

The scheduler runs 4 times per hour on a cron schedule:

55,35,25,5 * * * *

Each run determines the appropriate action based on service hours (sourced from the IAS /video/v2/service_hours endpoint):

  • Within service hours + VMs deallocated → Start VMs, then run the post-start script (seeds the VMR pool)
  • Outside service hours + VMs running → Deallocate VMs
  • No action needed → Skip
WorkflowEnvironmentTarget Resource Groups
vm-start-stop-test.ymltestrg-node-management-test, rg-node-conference-test
vm-start-stop-prod.ymlprodrg-node-management, rg-node-conference

During maintenance windows (e.g., Pexip upgrades, infrastructure changes), operators should pause the scheduler to prevent it from starting or stopping VMs unexpectedly.

  1. Navigate to the repository → Actions tab
  2. Select the workflow (e.g., “VM Start/Stop Scheduler (Production)”)
  3. Click the menu (top right of the workflow page)
  4. Select Disable workflow
Terminal window
# Disable the production scheduler
gh workflow disable "vm-start-stop-prod.yml" --repo Maximus-Canada/verify-by-video
# Disable the test scheduler
gh workflow disable "vm-start-stop-test.yml" --repo Maximus-Canada/verify-by-video
  1. Navigate to Actions → select the disabled workflow
  2. Click Enable workflow (banner at top of workflow page)
Terminal window
gh workflow enable "vm-start-stop-prod.yml" --repo Maximus-Canada/verify-by-video
  • Pexip upgrades - VMs must remain on during the upgrade process and not be deallocated by the scheduler
  • Infrastructure maintenance - any Azure operations that require VMs to be in a specific state
  • Troubleshooting - when investigating VM issues and you need to prevent state changes
  • Disabling a workflow prevents all triggers (schedule, manual dispatch, and any other). To run it one-off while disabled, re-enable it, run manually, then disable again.
  • Disabled workflows retain their run history - nothing is lost.
  • Anyone with write access to the repository can disable/enable workflows.
  • Consider notifying the team when disabling a scheduler so others know VMs may be in an unexpected state.

Both scheduler workflows support workflow_dispatch with override inputs to force specific actions regardless of the schedule:

InputEffect
runScaleDown: trueForce deallocate VMs (bypass schedule check)
runScaleUp: trueForce start VMs (bypass schedule check)
runPostStartScript: trueForce post-start script (bypass schedule check)

This is useful for manually starting VMs outside service hours (e.g., for evening maintenance) without needing to fully enable the scheduler.