Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

ESXi/ESX 4.x, 5.x and 6.x shutdown and reboot commands (1013193)

Last Updated: 2/24/2020Categories: TroubleshootingTotal Views: 789452Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglishGerman

44 like this article

Subscribe to get an email
newsletter with new updates

44 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

Details

When virtual machines are running, ESXi/ESX might not clear the RAID controller's cache if you shut down or reboot the ESXi/ESX host using these commands on the service console:

reboot -f

halt

shutdown

Solution

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 Client

Before 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 Client

Before 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:

Português: Comandos de desligamento e reinicialização do ESXi/ESX 4.x e ESXi 5.0 (2032662)

Español: Comandos de reinicio y apagado de ESXi/ESX 4.x y ESXi 5.0 (2033069)

日本語: ESXi/ESX 4.x および ESXi 5.x のシャットダウン コマンドと再起動コマンド (2053214)

简体中文: ESX/ESXi 4.x 和 ESXi 5.x 关机和重新启动命令 (2074702)

Deutsch: Befehle zum Herunterfahren und Neustarten von ESXi/ESX 4.x und ESXi 5.x/6.0 (2145123)

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglishGerman

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 6.7

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Support Assistant