247-IT Guide
Restarting after a power outage
The orderly shutdown is set up, but do servers, storage and VMs start again on their own afterwards? Often they do not. Why that is, and which settings in BIOS, UPS and Hyper-V make sure everything comes back.
When servers start on their own after a power outage
The shutdown is usually carefully planned, the startup rarely. Whether servers and VMs run again on their own after a power outage depends on when power returns:
| Case | What happens | Do the servers start on their own? |
|---|---|---|
| A: power returns before the shutdown | Monitoring cancels, nothing is shut down. | not needed |
| B: power stays off, battery runs flat | The UPS switches its output off and back on when power returns. | yes, if the servers are set to power on when AC returns |
| C: power returns after the servers are off | The UPS still had battery; its output was never off. | no, the servers stay off |
Case C is more common than you would think. The shutdown deliberately triggers with a reserve so that every VM shuts down safely. If the outage lasts 20 minutes and the UPS would have held for 30, the servers are off while the UPS keeps running. From the servers' point of view there was no power outage, so they do not switch back on.
Power on when AC returns, in BIOS or BMC
For case B to work, every server must be set to switch on when power is applied. The setting lives in the BIOS or in the management controller (BMC):
| Vendor | Setting | Correct value |
|---|---|---|
| Dell (iDRAC) | AC Power Recovery, plus AC Power Recovery Delay | On |
| HPE (iLO, BIOS) | Server Automatic Power-On, plus Power-On Delay | Always Power On |
| Lenovo (XClarity) | Power Restore Policy | Always On |
| Fujitsu (iRMC) | Power Restore Policy | Always power on |
| Supermicro and standard boards | Restore on AC Power Loss | Power On |
Be careful with “last state” (Last State, Restore): after an orderly shutdown the last state was “off”, so the server stays off. For servers that go through a UPS shutdown, “always on” is the right choice.
Use the delay for the order: storage systems immediately, Hyper-V hosts one to two minutes later. It also spreads the inrush current when many devices share one UPS.
Case C: letting the UPS switch its output off
There are two ways to solve case C. The first: the UPS switches its output off once all servers are down and back on when power returns. Case C then becomes case B.
- NUT — the primary NUT client shuts down as the last system and tells the UPS to switch its output off after a delay and back on when power returns. That is NUT's standard sequence, provided the driver supports it for your UPS.
- UPS network card — the cards have settings for when the output comes back after a shutdown: a return delay and a minimum battery charge. The minimum charge prevents servers from starting on an almost empty battery and going down hard at the next outage.
A switched-off output also hits everything that was not shut down, though: switches, firewall, phone system, NAS. Check what is connected to the UPS before letting it switch the output. The UPS Hyper-V Shutdown Monitor leaves the UPS output on. For case C you use the second way with it.
Case C: powering servers on via the BMC
The second way: after power returns, the servers are switched on through their management controller, by hand in the web interface or by script. With Redfish this works across vendors on current servers (PowerShell 7):
$cred = Get-Credential # BMC account allowed to power the server on
$body = @{ ResetType = 'On' } | ConvertTo-Json
# System ID: Dell iDRAC "System.Embedded.1", HPE iLO and Lenovo XCC usually "1"
# -SkipCertificateCheck only for a self-signed BMC certificate
Invoke-RestMethod -Method Post -Credential $cred -Authentication Basic -SkipCertificateCheck `
-Uri 'https://bmc-hv01/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset' `
-ContentType 'application/json' -Body $body
Older servers without Redfish can be powered on via IPMI:
# Password from the IPMI_PASSWORD environment variable, not on the command line
ipmitool -I lanplus -H bmc-hv01 -U admin -E chassis power on
The script has to run on a device that survived the outage, such as a small management computer or a server on a separate power supply. Wake-on-LAN is an alternative, but not every server supports it from the powered-off state, and it must be enabled in the BIOS and on the network card.
If the UPS Hyper-V Shutdown Monitor keeps running after the shutdown, it reports the return of power by email and, from the Pro edition, via Teams or webhook. A webhook can trigger such a power-on script.
The order in which everything starts again
- Network — switches and firewall. They usually start by themselves as soon as power is applied.
- Storage systems — SAN or NAS, until the volumes are ready. Hosts that start earlier will not find their VM storage.
- Hyper-V hosts — staggered using the power-on delay in BIOS or BMC.
- Domain controllers — as the first VMs, so sign-in and DNS are available for all others.
- Database and mail servers, then file and application servers.
Hyper-V starts the VMs through the automatic start action. There is a common
trap here: the default “Automatically start if it was running when the service stopped”
(StartIfRunning) does not apply when a tool shuts down the VMs before the host. When
the Hyper-V service stopped, the VMs were already off, and they stay off. For VMs that should run
again after a UPS shutdown, set Start with a delay:
Set-VM -Name "DC01" -AutomaticStartAction Start -AutomaticStartDelay 0
Set-VM -Name "SQL01" -AutomaticStartAction Start -AutomaticStartDelay 120
Set-VM -Name "APP01" -AutomaticStartAction Start -AutomaticStartDelay 240
Set-VM -Name "TEST01" -AutomaticStartAction Nothing
# Check
Get-VM | Select-Object Name, State, AutomaticStartAction, AutomaticStartDelay
In failover clusters the cluster starts the VMs by their priority; the VM's start action plays no role there. Details are in the guide Hyper-V failover cluster power outage, the shutdown order in the guide Shutting down Hyper-V VMs in a power outage.
Restart checklist
- BIOS or BMC — every server set to “always on”, not “last state”, with a staggered delay.
- Case C solved — the UPS switches its output off and on again, or a script or a person powers the servers on via the BMC.
- Minimum charge — the UPS only restores its output once the battery is sufficiently charged.
- VM start action —
Startwith a delay instead ofStartIfRunning, test VMs set toNothing. - Storage before hosts — the SAN or NAS is ready before the hosts start their VMs.
- Test in a maintenance window — unplug the UPS, wait for the shutdown, restore power before the battery is empty and check that everything runs again.
Frequently asked questions
Why don't my servers start on their own after the power outage?
Usually power returned after the servers had shut down while the UPS still had battery. Its output was never off, so the servers never saw power return. Fix: let the UPS switch its output off, or power the servers on via the BMC.
Which BIOS setting is right for power outages?
“Always on” (Always On, Power On). “Last state” leaves a server off after an orderly shutdown, because its last state was “off”.
Why don't the VMs start although the Hyper-V host is running?
The start action “Automatically start if it was running when the service stopped” does not apply when the VMs were shut down before the host. Set the start action to Start and define a delay.
Can the UPS switch the servers on?
Not directly. The UPS can only switch its output on and off. Whether a server then starts is decided by its BIOS or BMC setting for power restoration.
More guides
Replacing UPS batteries
Ageing, warning signs and swapping without a protection gap.
Hyper-V on Server Core
Protecting hosts without a desktop via WinRM or a web interface.
Eaton IPM alternative for Hyper-V
Node licensing, editions and Hyper-V integration compared.
Shutting down Hyper-V VMs in a power outage
Stop action, shutdown order and time budget for an orderly shutdown.
SNMPv3 on a UPS network card
authPriv with SHA and AES instead of a plain-text community.
NUT on Windows
Query a UPS via Network UPS Tools from a NAS or Linux server.
Hyper-V failover cluster power outage
Coordinating quorum, CSV and live migration.
Active Directory & power outages
The USN rollback myth and the real risks for domain controllers.
SQL Server & Exchange on Hyper-V
Protecting databases during a power outage.
Calculating UPS runtime
Why the datasheet runtime rarely holds.
PowerChute alternative for Hyper-V
UPS shutdown without vendor lock-in.
Monitoring UPS units from multiple vendors
One tool instead of several silos.
Test shutdown and restart together
30 days free, every feature included. With test mode, a cancel window for brief power returns and a notification as soon as power is back.