Firstly, that UPS is only 1000VA which is probably not going to give you enough runtime at 5 min plus time to suspend all VMs. The best thing to do would not be to suspend (which writes all memory contents to backend disk, and since this is a single host I'm guessing you only have local storage, right?) but to gracefully shutdown VMs. Using the PowerChute software that comes with this, you can have it do just that. Do some searches for blog posts that combine ESXi with PowerChute as there are lots. Keep in mind vMA does not work past 6.5 and has been deprecated.
ok thanks but what if i want to suspend anyway? How is it done?
You'd use PowerChute to configure all that. Keep in mind that in most cases (especially with under-performing storage), when you resume a VM it'll just have to be rebooted anyhow which is why shutdown tends to work better.
We can't guess what configuration your DL380 has, the PSU options run from 500W modules right up to 1600W. Assuming you're using 500W PSUs, then the 1000VA (That's a power rating Chip, not an stored energy figure like 1000mAh) should be OK. 1000VA is about 700W.
If they are 500W PSUs, that UPS should give a run-time of approximately 16 minutes.
I've used APCUPSD (apcupsd | A daemon for controlling APC UPSes) in projects in the past, but on looking just now I see this hasn't been maintained or updated since 2016.
The APCUPSD ran on one of the guests. The daemon runs named script files (or BAT files in Windows) depending on the reported UPS status. In our case we just used the BAT file ran when the UPS starts supplying power from its battery (ON-BAT).
This BAT file used shutdown command to shut down the other Windows guests. Once that was done it used PLINK (from PuTTY) to SSH into the ESXi host, where it deposited a shell script which waited 5 minutes and then ran SHUTDOWN.SH and POWEROFF.SH on the host. The script was set to run in back ground then the Windows guest disconnects from the SSH session and then shuts itself down. This is the reason for the 5 minute delay in the shell script. If we had been cleverer, the shell script could have monitored the status of the guest and known when it had shut itself down.
We had investigated the use of vMA and PowerCLI but found that some of the vMA commands and equivalent commandlets in PowerCLI were not licensed on an ESXi host running with the free install license key.
As mentioned, you can use PowerChute to correctly shutdown your ESXi server when there is a power outage. But remember that if you correctly shutdown the virtual machines, you might need them to start as well - either with auto start on the ESXi level or with some external script on some management station.
I had a similar problem and found the software OPMONis very helpful: https://opmonis.de/
You can run it on a Windows VM and it will trigger the shutdown of your VMs and host. It is really easy to use and not scripting is needed.
There is an older blog post about this software here: http://blog.thenetworknerd.com/2016/08/27/adventures-in-graceful-vm-shutdown/