Skip to main content

Azure Supported Services

NightOps supports automated start/stop management for the following Microsoft Azure services. These services can be safely turned off and restored without requiring manual reconfiguration.

Supported Services Overview

ServiceStop MethodStart MethodData PreservedConfig Preserved
Virtual MachinesDeallocateStart
Azure SQL DatabasePauseResume
Container AppsScale to 0Restore ReplicasN/A
AKS Node PoolsScale to 0Restore Count✅ (with PV)
VM Scale SetsScale to 0Restore CapacityN/A
Synapse SQL PoolsPauseResume

Virtual Machines

Azure Virtual Machines can be deallocated and started without losing configuration or managed disk data.

API Operations

OperationAPI CallDescription
ListVirtualMachines.ListAllList all VMs in subscription
StopVirtualMachines.DeallocateDeallocate a running VM
StartVirtualMachines.StartStart a deallocated VM
StatusVirtualMachines.InstanceViewCheck VM power state

What's Preserved

  • ✅ Managed disks and data
  • ✅ Network interfaces
  • ✅ Managed identity
  • ✅ Private IP address (static)
  • ✅ Tags and metadata
  • ✅ VM size configuration

Caveats

Dynamic Public IP

Dynamic public IPs are released on deallocation. Use static public IPs if a fixed IP is required.

Temp Disk

Temporary disk (D: drive on Windows, /dev/sdb on Linux) data is lost on deallocation.

Spot VMs

Spot VMs can be deallocated but may not restart if capacity is unavailable.

Deallocate vs Stop

Always use Deallocate (not Stop) to avoid compute charges. Stop keeps the VM allocated and still incurs costs.


Azure SQL Database

Azure SQL Database serverless tier can be auto-paused, or databases can be exported/deleted for complete cost savings.

API Operations

OperationAPI CallDescription
ListDatabases.ListByServerList all databases on a server
StopDatabases.PausePause a serverless database
StartDatabases.ResumeResume a paused database
StatusDatabases.GetCheck database status

What's Preserved

  • ✅ All data
  • ✅ Database configuration
  • ✅ Connection strings
  • ✅ Firewall rules (server-level)
  • ✅ Auditing configuration

Caveats

Serverless Tier Only

Manual pause/resume is only available for Serverless compute tier. Provisioned databases cannot be paused.

Auto-Resume

Paused databases auto-resume on any connection attempt. Ensure applications don't accidentally wake the database.

DTU-Based

DTU-based databases (Basic, Standard, Premium) cannot be paused. Consider serverless for dev/staging.


Container Apps

Azure Container Apps can be scaled to zero replicas and restored to their previous configuration.

API Operations

OperationAPI CallDescription
ListContainerApps.ListByResourceGroupList all container apps
StopContainerApps.Update (minReplicas: 0, maxReplicas: 0)Scale to zero
StartContainerApps.Update (restore min/max)Restore replica count
StatusContainerApps.GetCheck app status

What's Preserved

  • ✅ Container configuration
  • ✅ Environment variables
  • ✅ Secrets
  • ✅ Ingress configuration
  • ✅ Managed identity
  • ✅ Dapr configuration

Caveats

Cold Start

When scaled to zero, the first request after restoration will experience a cold start delay.

Scale Rules

NightOps stores the original scaling configuration before setting to zero.


AKS Node Pools

AKS user node pools can be scaled to zero nodes while preserving cluster configuration.

API Operations

OperationAPI CallDescription
ListAgentPools.ListList all node pools in a cluster
StopAgentPools.CreateOrUpdate (count: 0)Scale to zero nodes
StartAgentPools.CreateOrUpdate (restore count)Restore node count
StatusAgentPools.GetCheck node pool status

What's Preserved

  • ✅ Node pool configuration
  • ✅ VM size
  • ✅ Node labels and taints
  • ✅ Autoscaler configuration
  • ✅ OS configuration

Caveats

System Node Pool

The system node pool cannot be scaled to zero. At least one system pool must have nodes.

Control Plane

AKS control plane is free, but you still pay for the system node pool.

Scale-Up Time

Scale-up takes 3-5 minutes for nodes to become ready and pods to be scheduled.


VM Scale Sets

Virtual Machine Scale Sets can be scaled to zero instances and restored to previous capacity.

API Operations

OperationAPI CallDescription
ListVirtualMachineScaleSets.ListAllList all VMSS
StopVirtualMachineScaleSets.Update (capacity: 0)Scale to zero
StartVirtualMachineScaleSets.Update (restore capacity)Restore capacity
StatusVirtualMachineScaleSets.GetCheck VMSS status

What's Preserved

  • ✅ Scale set configuration
  • ✅ VM image
  • ✅ Network configuration
  • ✅ Load balancer rules
  • ✅ Autoscale settings
  • ✅ Extensions

Caveats

Instance Termination

All instances are deleted on scale to zero. New instances are created on scale-up.

Capacity Storage

NightOps stores original capacity for accurate restoration.


Synapse SQL Pools

Azure Synapse dedicated SQL pools can be paused and resumed, preserving all data.

API Operations

OperationAPI CallDescription
ListSqlPools.ListByWorkspaceList all SQL pools
StopSqlPools.PausePause a SQL pool
StartSqlPools.ResumeResume a SQL pool
StatusSqlPools.GetCheck pool status

What's Preserved

  • ✅ All data
  • ✅ Pool configuration
  • ✅ Security settings
  • ✅ Workload management

Caveats

Resume Time

Resume typically takes 5-10 minutes depending on pool size.

Active Queries

Pause waits for active queries to complete or times out after a period.


Unsupported Services

The following services cannot be safely automated without manual intervention:

ServiceReason
Azure Cache for RedisNo pause functionality; delete loses data
Cosmos DBNo pause; minimum throughput still costs
Azure Functions (Dedicated)App Service Plan cannot be paused
HDInsightCluster must be deleted and recreated
Azure DatabricksWorkspace always on; only clusters can stop

Resource Tagging

For NightOps to manage resources, apply these tags:

nightops-managed: true
nightops-schedule: <schedule-id>
nightops-environment: staging | development | testing

Tag-Based Filtering Example

// List only NightOps-managed VMs
const vms = await vmService.list({
managedOnly: true,
scheduleId: "schedule-123"
});

Multi-Subscription Support

NightOps supports managing resources across multiple Azure subscriptions using service principal authentication.

Architecture

┌─────────────────┐         ┌─────────────────┐
│ Hub Subscription│ │ Spoke Subscription│
│ (NightOps) │────────▶│ (Customer) │
│ │ RBAC │ │
└─────────────────┘ └─────────────────┘

Setup Requirements

  1. Register the NightOps application in Azure AD
  2. Create a service principal
  3. Assign required RBAC roles in each subscription (see Azure RBAC Reference)
// Cross-subscription access
const vmService = new VMService({
subscriptionId: "spoke-subscription-id",
credentials: defaultAzureCredential
});

Next Steps