I am currently setting up Mac mini 2012 as ESXi 5.5u2 host.
Mac minis are able to automatically start only after loss of power (http://www.virtuallyghetto.com/2013/02/enable-auto-startup-after-power-failure.html) or on schedule (every day at X:X PM). They can't automatically start when power is connected (after clean shudown -> power off).
I am dealing with this setup.
Our UPS are centrally managed by NUT (Network UPS Tools - Welcome). So when power goes out NUT server notifies all clients to shutdown. There is such client for ESXi (http://rene.margar.fr/2012/05/client-nut-pour-esxi-5-0/).
However If I want Mac mini to automatically start, it's power must be cut off.
In OS X there is halt -u command which does what I want.
-u The system is halted up until the point of removing system power,
but waits before removing power for 5 minutes so that an external
UPS (uninterruptible power supply) can forcibly remove power.
This simulates a dirty shutdown to permit a later automatic power
on. OS X uses this mode automatically with supported UPSs in
1) Halt OS
2) Wait for loss of power
3) When power is restored SMC automatically starts Mac mini
Is there a way to do the same in ESXi?
Desired scenario would look like this
1) NUT client on ESXi host gets notification of imininent power failure
2) Shudown all running VMs
3) HALT hypervisor
4) wait for powerloss
I found halt command in ESXi shell but it shutdowns Mac mini (complete power off).
I think this (short re-cycling power-off/power-on line to your Mac) is something you should configure in your UPS, whenever power is restored. Another option is to use "wake-up on lan" capability, but this must be supported by both nic and bios...
UPS is not directly connected to Mac. It is managed by NUT server.
Macs does only support wake-on LAN from sleep NOT from powered off state.
I suppose I could do this
1) NUT client gets notification saying power loss immintent
2) Shutdown ALL VMs
3) Let ESXi hypervisor die when power loss occurs
I am trying to find better way though 🙂 (halting system before power loss)
After discussion here -> http://www.virtuallyghetto.com/2013/02/enable-auto-startup-after-power-failure.html
I have two solutions available.
I am not sure if ESXi (after completion of shutdown.sh) is in state in which it can be allowed to die withou possible consequences
B) SMC schedule
Automatic poweron can be sheduled once a day on specific time.
This solution is NOT usable if you want to start Mac mini immidetialy after power comes back on