# Scheduling Azure Virtual Machine

> ZopNight always deallocates an Azure VM rather than issuing a guest-OS shutdown. A powered-off but still allocated VM keeps billing for compute, which is why shutting down from inside the VM saves nothing at all. Deallocation releases the compute reservation.

Source: https://zop.dev/integrations/azure/vm/schedule
Updated: 2026-08-19

---

## Stopped and deallocated are different states

This is the Azure-specific trap, and it costs real money.

**Stopped** means the guest OS is shut down. The VM still holds its compute allocation on the
host, and Azure still bills for it. Shutting down from inside the VM, or with
`Stop-Computer`, produces this state.

**Stopped (deallocated)** means the compute reservation is released. Billing for compute stops.
This is what the portal's Stop button does, and what ZopNight's schedules do.

A team that automates shutdown with a script inside the VM sees the machine turn off every night
and no change whatsoever on the invoice.

## What deallocation costs you

The VM loses its dynamic IP address on deallocation. If anything depends on that address, use a
static IP, which itself carries a small charge but survives the deallocate/allocate cycle.

Ephemeral OS disks are destroyed on deallocation. VMs using them cannot be deallocated without
losing the OS disk, so they are not schedulable in any useful sense.

## What keeps billing

Managed disks, at their full provisioned rate, including the OS disk. A deallocated VM with a
1 TB premium SSD keeps paying for that SSD.

Any static public IP also continues to bill.

## Capacity is not guaranteed on restart

Deallocation releases the host allocation, and starting again requests fresh capacity in that
region and size. For common sizes this is invisible. For constrained SKUs, large GPU VMs in
particular, a start can fail with a capacity error at 8am.

If a workload cannot tolerate that, Capacity Reservations hold the allocation, at a cost that
usually defeats the point of scheduling.

## Reserved Instances again

An Azure Reserved VM Instance bills regardless of state. Deallocating a reserved VM saves
nothing.
