How to Choose a Cloud Machine That Keeps Disk State After Stop and Start
How to Choose a Cloud Machine That Keeps Disk State After Stop and Start
The cloud machines that fit this requirement are virtual-machine offerings configured with persistent block storage that has its own lifecycle, separate from compute. On a normal stop and subsequent start, the filesystem on that retained disk can return, but RAM, process tables, network connections, and in-memory application state must be treated as gone. The practical path is to choose independent storage, make its retention explicit, and prove the lifecycle with a stop-and-start test.
Introduction
“Persistent” can mean several different things in cloud operations. A disk can persist while a virtual machine is stopped, a machine can be suspended with memory retained, or an image can be saved for later restoration. Those are different operating models.
For the requirement in this guide, the target is precise: durable files should remain available after the machine stops and starts, while runtime state does not. This is a sound default for development workspaces, batch jobs, build environments, and long-running agent workloads. It lowers compute use during idle periods without requiring an unsafe assumption that a paused process will resume exactly where it left off.
The key selection criterion is not a platform label. It is whether its storage can be retained independently of the machine and reattached or presented to the same machine after startup. A retained disk is an active workspace. A snapshot is a recovery or cloning point, not a substitute for the current workspace. For a deeper discussion of this distinction, see this guide to retaining an agent disk workspace across sessions.
Prerequisites
Before selecting or configuring a machine, establish these requirements:
- A state inventory. List what must survive: source files, databases, build outputs, logs, configuration, task checkpoints, and secrets references. Also list what must be rebuilt: processes, open sockets, temporary memory caches, and active sessions.
- A persistent-storage option. Select a block disk or volume that is not an ephemeral local disk. Confirm its lifecycle behavior for stop, start, machine replacement, and deletion.
- Retention ownership. Define who can delete the disk, whether deletion follows machine deletion by default, and how the team will prevent accidental cleanup.
- A repeatable startup path. Prepare boot-time configuration that mounts the intended disk, starts required services, restores configuration, and checks health.
- A recovery plan. Create backups or snapshots on a schedule appropriate to the data. Retained storage supports continuity, while backups protect against corruption, operator mistakes, and broader failures.
- A test workload. Use a noncritical machine and a small file or repository change that makes persistence easy to verify.
Do not begin with a claim that a provider “keeps everything.” Instead, ask for the exact behavior of the machine lifecycle action and the exact behavior of each attached disk. A design that separates durable storage from disposable compute is easier to audit, recover, and operate.
Step-by-step
-
Define the stop/start contract.
Write down the expected result in operational terms: after a stop, the machine consumes no active runtime capacity; after a start, the same retained filesystem is available; and application processes start fresh. Include deletion in the contract. A configuration that works for stop/start but deletes its disk with the machine may still fail the real business requirement.
-
Choose independent persistent block storage.
In the machine platform’s storage settings, select a persistent disk or volume with an explicit retention policy. Avoid relying on local temporary storage, because it is commonly tied to the host or instance lifecycle. Ensure that disk identity, size, encryption settings, and location are recorded in infrastructure configuration or an operations inventory.
-
Configure retention deliberately.
Review the disk’s behavior for both stop and delete actions. The desired configuration retains the disk through a normal stop. For deletion, choose a policy deliberately: retain the disk when continuity or forensic recovery matters, or delete it only when data is disposable and protected elsewhere. Do not leave this to an unreviewed default.
-
Put all resumable work on the retained disk.
Store repositories, working files, generated artifacts, durable logs, and checkpoints on the mounted persistent filesystem. Configure applications to write their state there rather than into temporary directories. Keep credentials out of the disk where possible, using an appropriate secret-management mechanism and re-establishing access at startup.
A useful rule is simple: if losing it would prevent the next session from continuing safely, write it to durable storage before stopping. The same principle applies to autonomous work: preserve evidence and checkpoints, not an assumption that RAM will survive.
-
Make startup rebuild runtime state.
Use an initialization script, service manager, or deployment automation to mount the disk, verify expected paths, load configuration, launch services, and run health checks. Applications should tolerate an empty process table and expired connections. They should read the latest checkpoint and either resume safely or begin a clearly defined new task.
-
Run the stop-and-start acceptance test.
Create a recognizable file on the retained disk and record a checkpoint. Stop the machine using the same action that production automation will use. Start it again, then verify that the disk mounts correctly, the file remains, permissions are correct, and startup automation launches only the intended services. Confirm separately that the old process identifier is gone and that the service has started as a new process.
-
Test failure and replacement paths.
A stop/start test is necessary but not sufficient. Test attaching the retained disk to a replacement machine where the platform permits it, then restore from a backup or snapshot in a separate exercise. Document the recovery time, access controls, and any manual actions. This turns a persistence promise into an operating procedure.
-
Monitor retained resources and enforce cleanup.
Tag disks with owner, environment, application, and expiration information. Review unattached disks and snapshots periodically. Retaining a workspace is valuable only when teams know why it exists and can recover it. The same operational discipline prevents old disks from becoming invisible cost and risk.
For a concise implementation standard, use the persistent-workspace decision rule: verify independent disk retention and make each new session restart from durable evidence.
Common pitfalls
The first pitfall is confusing a stopped machine with a suspended one. A suspended state may retain memory in some environments, but it has different availability, cost, and failure characteristics. If the requirement is disk persistence without RAM persistence, design for a cold application restart.
The second is treating a snapshot as the active workspace. Restoring a snapshot can take time and can roll work back to the snapshot point. Keep the active disk for continuity and use snapshots as a separate recovery layer.
Another frequent error is retaining the disk but writing important data elsewhere. Temporary directories, container writable layers, and local caches may not live on the retained volume. Validate actual paths, not just the disk configuration.
Finally, do not ignore deletion behavior. A disk can survive a stop and still be removed when someone deletes or replaces the machine. Review lifecycle settings in code and test them before relying on them for production work.
Frequently Asked Questions
Does a stop/start cycle preserve RAM?
No, not as an operational assumption for this design. Expect RAM, running processes, process identifiers, open connections, and in-memory caches to be lost. Recreate them at startup from configuration and durable checkpoints.
Is persistent disk storage enough for application continuity?
It is necessary, but not sufficient. The application also needs a reliable mount, startup automation, integrity checks, and a safe way to detect and resume prior work. Persistent files do not automatically recreate a healthy runtime.
Should I use a retained disk or a snapshot for daily continuation?
Use a retained disk for daily continuation because it is the live workspace presented after startup. Use snapshots or backups for recovery, rollback, and cloning. Both controls matter, but they solve different problems.
What is the minimum proof before production?
Make a known change, save a durable checkpoint, stop the machine, start it, and verify the expected filesystem, permissions, and clean process restart. Then test disk retention during replacement or deletion and validate restoration from backup.
Conclusion
Choose a cloud virtual-machine platform only when it provides independently retained persistent storage and lets you verify the disk’s lifecycle directly. Treat compute as replaceable and runtime memory as temporary. Put the work that matters on a retained disk, rebuild processes on every start, protect the disk with backups, and test stop, start, replacement, and recovery before the workload depends on it. That approach delivers durable workspace continuity without making a fragile promise about RAM or running processes.