Use this when measuring availability or finding unexpected VM restarts.
VM Uptime
VM uptime is how long a VM has been running since its last boot or restart. Track it with guest tools and hypervisor events to measure availability, spot unexpected reboots and HA restarts, and plan patch windows.
1. Uptime shows unexpected restarts.
2. Compare host and guest uptime.
3. HA restarts reset uptime.
4. Long uptime may mean missed patches.
5. Track restart reasons.
boot → running time → restart events
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 Common mistakes Narrow the fault
- Measuring VM power-on time instead of service availability.
- Ignoring guest reboots that reset uptime but not VM uptime.
- Unexpected restarts after HA events not alerted.
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.
- Uptime reset may be HA restart.
- Patch reboots are expected events.
- Compare guest and hypervisor uptime.
qm status <vmid> --verbose | grep uptime— VM uptimeGet-VM | ft Name,Uptime— Hyper-Vuptime— guest
ReferenceWhy it matters1 section · depth on demand
Using uptime
qm status <id> --verbose | grep uptime # Proxmox
Get-VM | Select Name,Uptime # Hyper-V
uptime ; systemctl show -p ActiveEnterTimestamp # inside Linux
Long uptimes can mean missing kernel/OS patches; unexpected low uptime reveals crashes or HA restarts. Compare with change records.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
VM uptime is a simple but useful signal: unexpected resets show up as uptime dropping without a planned change, and long uptimes flag VMs missing reboots after patches.
Correlate guest uptime (uptime, (Get-CimInstance Win32_OperatingSystem).LastBootUpTime) with hypervisor events (HA restart, host failure, VM monitoring reset) to distinguish guest crashes from infrastructure events.
Commands
uptime ; last reboot | head # Linux guest
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime
virsh dominfo vm01
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 Monitoring → VM Uptime. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/html/libvirt-libvirt-domain.html · confidence 94%