You can shut down or reboot ESXi/ESX 4.x or ESXi 5.x/6.0 hosts using any of the following methods:
Warning: Although these methods will gracefully shut down or reboot an ESXi/ESX host, they will not safely stop running virtual machines on the host. You should always ensure that virtual machines are migrated off the host and that the host is in maintenance mode before attempting to reboot or shut down a host using any method.
ESX 4.x
Log in to the ESX service console and perform one of these steps from the service console to shut down or reboot ESX 4.x hosts:
- Run the
shutdown –r now
command to reboot the system.
Note: This command shuts down the virtual machines running on the ESX 4.0 hosts.
- Run the
reboot
command to reboot the system. - Run the
poweroff
command to shut down ESX. After the shutdown, a message indicates that it is safe to power off your system. Press the power button until the machine powers off. You can then manually reboot the system.
ESXi 4.x/5.x/6.x
- From the Direct Console User Interface (DCUI) screen, press F12 to view the shutdown-related options for the ESXi host.
- Press F2 to shut down.
- Press F11 to reboot.
- From Local or Remote Tech Support Mode, or from an SSH session, run one of these commands:
- Run the
reboot
command to restart the host. - Run the
poweroff
command to shut down the host.
Note: In ESXi 5.x/6.0, no console output will be displayed on the screen when using the reboot
or poweroff
commands. After a short period of time, the host will reboot or shut down.
ESXi/ESX 4.x or ESXi 5.0
From the vSphere ClientBefore shutting down or rebooting the ESXi/ESX 4.x or ESXi 5.0 hosts, ensure that the hosts are put into maintenance mode. Powering off a managed host disconnects it from vCenter Server, but does not remove it from the inventory.
- Shut down or use vMotion to migrate all virtual machines running on the ESXi/ESX hosts.
- Put the ESXi/ESX hosts into maintenance mode.
- Right-click the ESXi/ESX host that you want to shut down, and click Reboot or Shut Down.
- If you select Reboot, the ESXi/ESX host shuts down and reboots.
- If you select Shut Down, the ESXi/ESX host shuts down. You must manually power the system back on.
- Provide a reason for the shutdown or reboot. This information is added to the log.
ESXi 5.1/5.5/6.x
From the vSphere Web ClientBefore shutting down or rebooting the ESXi 5.1 hosts, ensure that the hosts are put into maintenance mode.
To enter maintenance mode from the vSphere Web Client:
- Browse to the host in the vSphere Web Client navigator.
- Right-click the host and click Enter Maintenance Mode.
- Click Yes to enter maintenance mode.
Note: The host remains in maintenance mode until you select
Exit Maintenance Mode.
To reboot or shut down the host using the vSphere Web Client:
- From the vSphere Web client, navigate to the host you want to shut down.
- Right-click the host and click Reboot or Shutdown.
From vCLI or vMA (vCLI 4.x)Note: By default, the
hostops.pl
file in VMware vSphere CLI 4.0 U1 installations is located at
C:\Program Files\VMware\VMware vSphere CLI\Perl\apps\host
.
- To put ESXi/ESX 4.x or ESXi 5.0 hosts into maintenance mode, run this command from the vMA (vSphere Management Assistant) or vCLI (vSphere Command-Line Interface) console screen:
/usr/lib/vmware-vcli/apps/host/hostops.pl --target_host ESX-Host-FQDN --operation enter_maintenance --url https://vCenter-Host/sdk/vimService.wsdl
- To reboot ESXi/ESX 4.x or ESXi 5.0 hosts, run this command from the vMA or vCLI console screen:
/usr/lib/vmware-vcli/apps/host/hostops.pl --target_host ESX-Host-FQDN --operation reboot --url https://vCenter-Host/sdk/vimService.wsdl
- To shut down ESXi/ESX 4.x or ESXi 5.0 hosts, run this command from the vMA or vCLI console screen:
/usr/lib/vmware-vcli/apps/host/hostops.pl --target_host ESX-Host-FQDN --operation shutdown --url https://vCenter-Host/sdk/vimService.wsdl
From vCLI or vMA (vCLI 5.x/6.0)Note: For more information on the
vicfg-hostops
command, see the
vSphere Command-Line Interface Reference documentation.
- To put ESXi/ESX 4.x or ESXi 5.x/6.0 hosts into maintenance mode, run this command from the vCLI (vSphere Command-Line Interface) console screen:
vicfg-hostops.pl --server ip_address --username root --password password --operation enter
- To reboot ESXi/ESX 4.x or ESXi 5.x/6.0 hosts, run this command from the vCLI console screen:
vicfg-hostops.pl --server ip_address --username root --password password --operation reboot
- To take ESXi/ESX 4.x or ESXi 5.x/6.0 hosts out of maintenance mode, run this command from the vCLI console screen:
vicfg-hostops.pl --server ip_address --username root --password password --operation exit
- To shut down ESXi/ESX 4.x or ESXi 5.0 hosts, run this command from the vCLI console screen:
vicfg-hostops.pl --server ip_address --username root --password password --operation shutdown
Note: For more information, see
Running VMware CLI 4.x commands on ESXi 5.0 hosts (2004291).
Additional Information
For translated versions of this article, see: