Use this when stopping a VM cleanly through guest tools or ACPI, or when a shutdown hangs.
Shutdown
Shutting down a VM asks the guest OS to stop cleanly through guest tools or an ACPI power button event, so services and file systems close properly. It fails if the guest has no tools or ignores ACPI.
1. Graceful shutdown asks the guest OS to stop.
2. Needs ACPI or guest agent.
3. Use timeouts, then escalate.
4. Host shutdown should shut down VMs in order.
5. Check guest logs if it hangs.
shutdown request → guest agent/ACPI → OS stops → process exits
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 If shutdown hangs Verify boundary
- Check that the guest agent/ACPI is working.
- Look inside the guest for a service blocking shutdown.
- Wait for the timeout, then use a hard stop and check file systems on next boot.
Step 2 Common mistakes Narrow the fault
- Host shutdown without configured VM shutdown actions — VMs get powered off.
- Timeouts too short for database servers.
Step 3 Things to know Narrow the fault
- Needs guest tools or ACPI support in the guest; otherwise nothing happens.
- Set a timeout and fall back to stop if the guest hangs.
- Host shutdown order: configure VM auto-stop settings so guests shut down cleanly.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Needs guest tools or ACPI.
- May hang on stuck services.
- Use timeout then power off.
virsh shutdown <vm>— ACPI/agent shutdown (libvirt)qm shutdown <vmid> --timeout 120— graceful shutdown (Proxmox)Stop-VM <vm>— graceful shutdown via integration services (Hyper-V)
ReferenceImportant terms & boundaries2 sections · depth on demand
Commands
| Platform | Graceful shutdown |
|---|---|
| KVM/libvirt | virsh shutdown vm01 |
| Proxmox | qm shutdown 101 --timeout 120 |
| Hyper-V | Stop-VM vm01 (uses integration services) |
| vSphere | Shutdown-VMGuest vm01 |
In depth
Shutdown asks the guest OS to shut down cleanly through ACPI power button or the guest agent, then waits for it to power off.
qm shutdown 120 --timeout 180
virsh shutdown vm1 --mode agent
Stop-VM vm1 # graceful via integration services
vim-cmd vmsvc/power.shutdown <vmid>
If shutdowns hang: the guest ignores ACPI (no agent/tools, Windows "shutdown without logon" policy), a service blocks, or an update is installing. Set host-level timeouts so host maintenance does not stall forever.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Virtual Machine Lifecycle → Shutdown. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%