Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Resource icon

Configuring UPS support for single or multiple FreeNAS servers

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
1,939
Spearfoot submitted a new resource:

Configuring UPS support for single or multiple FreeNAS servers - Details on configuring the NUT UPS tools for use with FreeNAS servers connected to a UPS

If you are running a FreeNAS server you definitely need to connect it to a UPS.

Standalone Configuration

The official FreeNAS 9.10 UPS service documentation is available at doc.freenas.org and you should read it before proceeding.

Configuring a standalone FreeNAS server is fairly simple, provided your UPS is supported by the Network UPS Tools driver used by FreeNAS. You may consult networkupstools.org's...
Read more about this resource...
 
Joined
Jun 5, 2018
Messages
6
I agree - great resource! Is there any documentation on how to set up multiple UPSs, in the case where there is a server with redundant power supplies, each plugged into its own UPS?
 

jp83

Newbie
Joined
Mar 31, 2017
Messages
23
Trying to set this up myself. Spearfoot's guide "ssh root@esxihost poweroff" and neb50's "ssh root@ipaddress /sbin/poweroff" both seem to Power Off VMs as opposed to Shutdown Guest (using VM Tools for a safe shutdown). I was watching the tasks at the bottom. I also looked in the config in the esxi NUT client and it appears to use the poweroff command as well. Sounds like permissions issues prevent a wrapper script from working, so how are you safely shutting down ESXi VMs?

Cross-post link: https://forums.freenas.org/index.php?threads/ups-shutdown-esxi-6-5.63211/#post-486371
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
1,939
Trying to set this up myself. Spearfoot's guide "ssh root@esxihost poweroff" and neb50's "ssh root@ipaddress /sbin/poweroff" both seem to Power Off VMs as opposed to Shutdown Guest (using VM Tools for a safe shutdown). I was watching the tasks at the bottom. I also looked in the config in the esxi NUT client and it appears to use the poweroff command as well. Sounds like permissions issues prevent a wrapper script from working, so how are you safely shutting down ESXi VMs?

Cross-post link: https://forums.freenas.org/index.php?threads/ups-shutdown-esxi-6-5.63211/#post-486371
No, the 'poweroff' command shuts down the ESXi host, not the VMs. The latter are shutdown as part of the normal ESXi server shutdown sequence -- but only if you have configured it correctly! Otherwise (if memory servers) ESXi will simply power them down. So you must configure your ESXi server to send a graceful shutdown command to at least the FreeNAS VM, and any other VMs not homed on storage provided by the FreeNAS VM.

With this setup, as part of the ESXi host shutdown sequence, the FreeNAS VM itself receives a shutdown command from its ESXi host. This invokes your FreeNAS shutdown script, which should send shutdown commands to each VM it stores (either on NFS or iSCSI storage). These VMs should have the VMware tools installed.

See my resource Utility scripts for FreeNAS and VMware ESXi for scripts you can modify to use on your AIO (All-In-One) server to do all of this stuff.

It can be a little tough to wrap your mind around all of this, but it really does work very well. I've been using this setup for several years on multiple AIO servers.

Good luck!
 

NasKar

FreeNAS Experienced
Joined
Jan 8, 2016
Messages
496
Thanks for the great guide. I'm not running ESXi so is the Shutdown Command
Code:
/sbin/shutdown -p now
ok for the Master and Slave?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
1,939
Thanks for the great guide. I'm not running ESXi so is the Shutdown Command
Code:
/sbin/shutdown -p now
ok for the Master and Slave?
Yes
 
Top