Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ESXi 6.7 Scheduled Shutdown

Featured Replies

Hi Guys,

I'm running my Unraid as a VM on ESXi, and I want to be able to schedule a daily shutdown of the server.

The reason for that is that it uses quit alot of power, like about 175w when idle, and were I live 1kw costs about 0.34$ So running the server 24/7 would be almost 1.5$ a day :(

 

I can Schedule a shutdown in unraid just fine, but how do I schedule a shutdown of the ESXi. I don't have vCenter, so it is just a single host.

Is it even possible ?

Very possible, in a variety of ways, depending on what exactly you want to do and on your personal taste.

 

To automate, you can edit the ESXi root crontab, which lives in /var/spool/cron/crontabs/root in ESXi (access it via the ESXi CLI).

There, you can add a crontab entry to do the shutdown at your designated time. Essentially, /sbin/shutdown.sh and /sbin/poweroff will do the trick.

 

Now that's not exactly what you are trying to do; you want Unraid to do an orderly shutdown, before ESXi goes down. This can be achieved via several different approaches:

 

1. If you have the VMware tools plugin installed in Unraid, and Unraid is part of the autostart VMs set, then /sbin/shutdown.sh will trigger an orderly shutdown as part of the host shutdown.

2. You can have Unraid auto-shutdown at (say) 1 am, and have ESXi auto-shutdown at (say) 1:10 am. Make sure clocks are synced...

3. You can have Unraid initiate its own shutdown and the ESXi shutdown (via SSH CLI), simultaneously.

4. You can use PowerCLI (as @StevenD just wrote while I was typing this) from a Windows host where PowerCLI is installed. You could probably trigger an Unraid shutdown, wait some time for it to complete, then do the stop-vmhost.

 

These are just examples, obviously. Hope this helps.

  • Author
8 hours ago, doron said:

Alot of good Suggestions :)

Hey Guys, thanks for the help, I think I found the solution that fits me.

 

I will get the VMware tools plugin install in Unraid.

 

Then I'll use a crontab job to initiate the shutdown.

I found a site explaining how to set up a crontab job here:

http://www.jules.fm/Logbook/files/add_cron_job_vmware.html

 

That should hopefully take care of my "problem"

 

Then I can schedule the poweroff and poweron in my smartplug :)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.