VMware Cloud Community
kunbong
Enthusiast
Enthusiast
Jump to solution

How to remote shutdown ESXi Servers

Good day everybody!

I'm using ESXi 5.5.0 on Dell and HP servers. I can remote shutdown every virtual machines inside the servers, but i don't know how to remote shutdown the servers.

Let's me explain:

When the power source lost. I can automatic shutdown only one server which is connected directly to the UPS. Before it is shutdown, one command script will be run to shutdown other servers on the network (include virtual machines). But the ESXi server which store virtual machines still running. I don't know how to remote shutdown them (by command, or 3rd software...). I worry about my data maybe lost if the ESXi servers aren't safe shutdown.

One more question:

If I can remote shutdown the ESXi server. Do I have to shutdown virtual machines one by one before shutdown the real server? Or i can use "virtual machine startup/shutdown" options to automatic shutdown all virtual machine inside the ESXi server?

I'm using paid license of ESXi 5.5.0 and vCenter 5.5.0.

Thanks in advance!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
SureshKumarMuth
Commander
Commander
Jump to solution

If the VMs are not shutting down safely then the startup/shutdown option might be disabled in the host.

launch vsphere client session to the ESXi server and check if the settings are enabled.

Regarding ssh, it is nothing but a connection protocol like RDP for unix machines

We have a tool called putty to establish an ssh session to the ESXi server. Follow the steps given in the article, enable ssh alone shell is not required. Use vsphere client method to do, it will be easier

http://techhead.co/vsphere-5-x-how-to-enable-ssh-esxi-shell/

To download putty

Download PuTTY - a free SSH and telnet client for Windows

Regards,

Suresh

Regards,
Suresh
https://vconnectit.wordpress.com/

View solution in original post

0 Kudos
4 Replies
SureshKumarMuth
Commander
Commander
Jump to solution

You can take a vsphere client session to the ESXi server directly and shutdown the server or you can run the command shutdown from the ssh session from the host. In order to automate the virtual machine start up /shutdown process, follow the given KB

VMware KB: Automating the process of starting and stopping virtual machines on VMware ESX

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
kunbong
Enthusiast
Enthusiast
Jump to solution

Thank you very much SureshKumarMuthukrishnan and sorry for bad english in my questions.

My virtual machines already startup/shutdown with ESXi server. I don't know how to use ssh, or something like this to automatic remote shutdown the ESXi server. I'm using windows server 2008 R2 on the server which connect directly to UPS through COM port.

Can you explain more about using SSH? is it automatic or i have to run any command? How can i use it with Windows server 2008?

Sorry i'm not sure about linux system!

P/S: when i press the power button on ESXi server, it will shutdown but every virtual machine inside it will be terminated without shutdown. It is reason why i asked:

If I can remote shutdown the ESXi server. Do I have to shutdown virtual machines one by one before shutdown the real server? Or i can use "virtual machine startup/shutdown" options to automatic shutdown all virtual machine inside the ESXi server?
0 Kudos
SureshKumarMuth
Commander
Commander
Jump to solution

If the VMs are not shutting down safely then the startup/shutdown option might be disabled in the host.

launch vsphere client session to the ESXi server and check if the settings are enabled.

Regarding ssh, it is nothing but a connection protocol like RDP for unix machines

We have a tool called putty to establish an ssh session to the ESXi server. Follow the steps given in the article, enable ssh alone shell is not required. Use vsphere client method to do, it will be easier

http://techhead.co/vsphere-5-x-how-to-enable-ssh-esxi-shell/

To download putty

Download PuTTY - a free SSH and telnet client for Windows

Regards,

Suresh

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
admin
Immortal
Immortal
Jump to solution

For Virtual Machines:

--------------------------------

Set automatic shutdown action to PowerOFF on the ESXi server. The Vms will be powered off automatically.

For ESXi;

--------------

1. If the ESXi hosts are connected to a vCenter server, then use PowerCLI andthe below script by LucD  to shutdown the ESxi servers;

$names = "esxi-1","esxi-2"

connect-VIServer
-Server $names -User root -Password Password1 | %{

     Get-VMHost -Server $_ | %{

              $_.ExtensionData.ShutdownHost_Task($TRUE)

     }

}

or

2.

a. Download any ssh client like Putty

b. Connect to ESXi server

c. issue "shutdown"

~dGeorgey