VMware Cloud Community
NetworkAdminZ
Contributor
Contributor

Scheduled task - restart vs reset

Good day all.

I want to create a nightly restart on a server via the vCenter Scheduled Task option.  Why is there a shutdown option and a hard reset option but not a restart option?  I could set this up with two jobs one as a shutdown and another as a power on but I want to have the restart perform as fast as possible.  While testing, on server took 20 seconds to shutdown and sat for 40 seconds until the next scheduled task kicked in (set to a minute after shutdown).  Also what happens in a situation that where the shutdown talks more than a minute?  Would the server never power on because it missed the power on window?

I guess my question is why is there only a shutdown option that leverages the VMware Tools but not a restart option that also uses the tools to perform a clean reboot?  I know I can also do this in Windows scheduled tasks but wanted to use vCenter 5.0.

Thanks in advance!

0 Kudos
5 Replies
DanielOprea
Hot Shot
Hot Shot

Hello,

If you can do it from the VC, but the VM must have vmware-tools installed.

1.1.JPG

2.JPG3.JPG4.JPG5.JPG

For more information see the documentation:

VMware vSphere 4 - ESX and vCenter Server

PLEASE CONSIDER AWARDING any HELPFUL or CORRECT answer. Thanks!!
Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA. ¡¡Muchas gracias!!
Blogs: https://danieloprea.blogspot.com/
0 Kudos
NetworkAdminZ
Contributor
Contributor

Thanks for the reply. Before I posted on this forum, I tested exactly what you are showing but it resulted in a hard reset.  Not using the tools to do a soft shutdown.  When I used the shutdown option, it properly used the tools to shut down the server.  I want to use the tools with a scheduled task to restart the server, not reset it.

0 Kudos
DanielOprea
Hot Shot
Hot Shot

Look at this blog and do it by script.

PowerCLI Schedule a restart job for one or multiple VM’s | ICT-Freak.nl

What S.O. VMs are? Because no program restart level S.O. ?

PLEASE CONSIDER AWARDING any HELPFUL or CORRECT answer. Thanks!!
Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA. ¡¡Muchas gracias!!
Blogs: https://danieloprea.blogspot.com/
0 Kudos
MrMegaVadim
Contributor
Contributor

Very Very bad option!!!

I'm wondering HOW THAT vmware did not yet came with a save solution do execute a simple vm restart (OS reboot) and not PC RESET - as its actual doing right now ???

Yes, this option in images below is executing

- A soft unplug power cord and plug power cord on and start

- otherwise a 5sec power button press and press power button to start again

The OS is feeling like - oups I missed power - are you Shure you want me start normally ???

And exactly agree that doing restart with 2 tasks in VMware is a bad idea too as you may miss the start for numerous reasons the shutdown took too long

For Windows guys :

Suggest you to use an old mate Task Scheduler

- Execute a program: c:\windows\system32\shutdown.exe with option -r -f

- Run once: tomorrow at 00:01:00 for example (tonight said in other words)

Thank you

Vadim

0 Kudos
mmango
Contributor
Contributor

Why this option is missing, what's the (REMOVED) point in scheduling an hard reset on a running VM overnight?

Only an idiot would do it.

(REMOVED) vmware.

Moderator edits: Profanities removed.

0 Kudos