VMware Cloud Community
Jimsan
Contributor
Contributor

Schedule VM startup/shutdown

Good morning all. I am very very new to Esxi 3.5 (and VMware in general) and am looking for help with something.

I am running Esxi 3.5 and have a couple of VM's created which work fine.

I wanted to know if it is possible to set these VM's so that they automatically power off at a certain time each night and power back on again at a certain time in the morning. I've had a quick look through the menus in Vi and nothing seems to stick out as being able to do the thing I want

I guess it might be possible with some sort of script or something?

As I said, I am very new to Esxi and have a limited understanding of it so far so any help (in none too technical lingo) would be greatly appreciated.

Thanks :smileycool:

0 Kudos
3 Replies
AndreTheGiant
Immortal
Immortal

You can use: ESX/ESXi CLI, RCLI, PowerShell or other script languages.

Or, if you have vCenter, Scheduled Task tool.

For CLI you can use

vmware-cmd PathVmxFile start

vmware-cmd PathVmxFile stop trysoft

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
Jimsan
Contributor
Contributor

Thanks Andre.

I vagueley rememer reading somewhere that you need to activate something in Esxi in order to use the CLI?

Once I have access to this, I take it I just incorporate that code you listed into a script?

Apologies if this seems really n00b, like I said, I'm very new to this

0 Kudos
AndreTheGiant
Immortal
Immortal

To enable SSH access on ESXi see:

http://vm-help.com/esx/esx3i/ESXi_enable_SSH.php

Then you can write your shell script.

The only problem is that I do not remember if ESXi has cron service (to schedule script).

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos