Skip to content

Concepts

Sleep and wake

What happens to a machine when it stops and starts, how idle sleep puts it to sleep, how long stops move down the snapshot tiers, and how to wake it.

On this page

Stop and start

A machine runs until you stop it, auto-stop stops it, idle sleep finds it idle, or the organization's balance runs out.

  • Stopping ends metering. Nothing is billed while a machine is stopped.
  • Files in /work are kept while the machine is stopped.
  • Starting brings the same machine back with the same ID and name. Its port URLs keep their label, so a URL never points at another machine.
sh
vy stop dev --wait
vy start dev --wait

On KVM hosts a stop is a hot snapshot: memory, device state, and disk stay on the machine's host, and start resumes its processes where they were. Docker development hosts pause the machine instead. Even so, write what you need to keep to /work, and be ready to start services again with a background command: a restore from a cold snapshot boots fresh from the disk. A setup script runs only once, after the first start.

Long stops move down the tiers

A background policy pushes machines that stay stopped to the snapshot store: a warm snapshot after 6 hours and a cold one after 7 days, by default, on KVM machines. It changes nothing about how you start the machine; it makes a long-stopped machine restorable on any host. See Snapshots and tiers.

Idle cost

A running machine is billed whether it is busy or idle. Turn on idle sleep to stop a machine once it has done nothing for a while, set a short auto-stop for development machines, and stop machines when your agent or job finishes.