What Is an Azure Virtual Machine? How to Run and Retire One

An Azure virtual machine (VM) is a software-defined computer running on Microsoft’s infrastructure. You choose a size and operating system, connect disks and networking, and install the software your workload needs. Microsoft operates the physical host. Your team operates the guest operating system and the software inside it unless another service or provider takes on those tasks for you.
A VM makes sense when the workload needs operating-system control. For instance, a vendor application might require a supported Windows service and administrator access to configure it. Before choosing a VM, ask a second question: can your team patch it, recover its data, and stop paying for it when the workload ends?
Table of Contents
What an Azure VM includes
| Part | What it does | What to verify |
|---|---|---|
| VM size | Determines available compute characteristics, including CPU and memory. | Confirm the app fits the size and check regional availability and quota. |
| OS and data disks | Store the operating system and application data in a typical managed-disk setup. | Record which volumes hold durable data and how each is protected. |
| Temporary disk, if present | Provides scratch space on some sizes. | Place only data you can regenerate here. Confirm mount points so the app cannot silently put durable data there. |
| Network interface and virtual network | Connect the VM to its intended clients and services. | Confirm management and user access from the approved network, with no unnecessary public route. |
See Microsoft’s Azure VM overview and managed disk reference. The example here uses a managed OS disk. An ephemeral OS disk has different persistence behavior and is a separate design choice.
Decide what must survive the VM
Consider a hypothetical trial for a legacy report generator. It reads a test dataset, builds reports overnight, and saves them for a reviewer. The team schedules five eight-hour runs a week and deallocates the VM between runs. It plans to remove the VM at the end of the trial. Its important work is deciding which data belongs on each volume before a shutdown or cleanup.
- OS disk: Store the OS and installed reporting software. Record the installer version and the configuration required to rebuild it.
- Persistent data disk: Store input files and reports until the approved copy is available elsewhere. Set the disk’s retention and recovery plan independently of the VM.
- Temporary space: Put reproducible intermediate files here. The job must be able to regenerate them if it starts with an empty directory.
For a recovery rehearsal, create a known input fixture and save the expected report outside the VM. Recover into a test environment, run the same fixture and compare the report totals. Confirm that the scheduler can run under the intended identity. A VM that boots successfully can still lack a data disk, configuration file, or permission the reporting job needs. Verify your configuration against the Azure VM Backup documentation.
Stopped, deallocated and deleted are different states
Shutting down from inside the operating system can leave the VM Stopped (Allocated). Azure still bills VM compute in that state. Stopped (Deallocated) releases the assigned compute capacity and stops the VM’s compute meter. Disks and other resources you retain may still incur charges, and separate purchase commitments can continue. Check the actual state and the resources still present rather than relying on what the shutdown command was intended to do. Microsoft documents the distinction in VM states and billing.
Suppose the team plans to run its trial VM for 40 hours in a seven-day week and deallocate it for the remaining 128. The model forecasts 40 running hours rather than 168, assuming the team actually deallocates it on schedule and the commercial terms allow usage-based savings. The difference is 128 compute hours. Persistent storage is still provisioned across the week, so that reduction does not apply to the entire bill. This example uses no Azure price, and no VM was deployed for the article.
Capture one row in the change record before and after deallocation: timestamp, observed power state, retained disk IDs, and expected ongoing charges. If the VM is still allocated, investigate the shutdown action before counting any compute savings. To confirm recovery, re-run the report fixture from the recovered environment rather than reading a report that was retained outside it.
At retirement, review the Azure delete options for each attached resource. Azure can delete or detach supported disks and network resources according to their configuration. Verify any copy that must survive before deleting the VM, then confirm which resources are still present and why. See Microsoft’s VM deletion guide.
Use a short operating checklist before you commit
- Write down the feature that requires guest OS control and confirm the app vendor supports it in Azure.
- Name an owner for guest patches, backup, and renewal of any licenses the workload needs.
- Write down which files persist, where they are stored, and how you will prove the recovery worked.
- Record the VM resource ID, planned operating hours, and actual Azure power state after shutdown. List each retained disk by resource ID and owner. Attach the recovered report totals and name the person who will check remaining charges after retirement.
If the application runs on a managed platform without the guest-level requirement, compare that option before taking on the upkeep of a VM. For the broader platform context, see our Microsoft Azure overview.
Related reading — Azure App Service vs Virtual Machine: What Requires OS Control?.
Recent articles
Our editorial approach
Clear explanations, practical guidance and responsible research.





