How to shutdown ESXi 5 in N minutes

busyboxcommand-line-interfacevmware-esxi

On the VmWare commandline, I can shutdown the box using the halt command

~ # halt --help
BusyBox v1.9.1-VMware-visor-6030 (2011-02-15 14:57:41 PST) multi-call binary

Usage: halt [-d delay] [-n] [-f]

Halt the system

Options:
        -d      Delay interval for halting
        -n      No call to sync()
        -f      Force halt (don't go through init)

Is the delay in minutes (like with the linux shutdown otpion) or in seconds? I could not find this in the docs, I tried googling and did not find the answer. I have no spare vmware box at hand currently to try out by myself.

(I found http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013193
and also this PDF http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-command-line-management-for-service-console-users.pdflanguage=en_US&cmd=displayKC&externalId=1013193 but there was no answer to this in them)

Best Answer

The current source code for busybox halt indicates the delay is in seconds. If you wanted to test it explicitly, you could run with a delay of 300, and if the system hasn't halted after 5 minutes, you know it's measured in minutes instead of seconds.