Friday, February 19, 2010

VMware ESX 4.0 and ESXi 4.0 Shutdown and Reboot Commands

 
Details
When virtual machines are running, ESX might not clear the RAID controller's cache if you shut down or reboot ESX host by using the following commands on the service console:
  • reboot -f 
  • halt
  • shutdown

Solution

You can shut down or reboot ESX 4.0 or ESXi 4.0 hosts using any of the following methods:

ESX 4.0

Log in to the ESX service console and perform one of the following steps from the service console to shutdown or reboot ESX 4.0 hosts.

  1. 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.
  2. Run the reboot command to reboot the system.
  3. 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.0

  1. In the console screen of the ESXi 4.0 host, press Ctrl+Alt+F2 to see the Direct Console User Interface (DCUI) screen.
  2. In the DCUI screen, press F12 to view the shutdown related options for the ESXi host.
    • Press F2 to shut down.
    • Press F11 to reboot.

ESX 4.0 or ESXi 4.0

From vSphere Client
Before shutting down or rebooting the ESX 4.0 or the ESXi 4.0 hosts, ensure that the hosts are put in maintenance mode. Powering off a managed host disconnects it from vCenter Server, but does not remove it from the inventory.
  1. Shut down or VMotion all virtual machines running on ESX 4.0 or ESXi 4.0 hosts.
  2. Put the ESX 4.0 or ESXi 4.0 hosts in the maintenance mode.
  3. Select the ESX 4.0 or the ESXi 4.0 host you want to shut down.
  4. Right-click the ESX 4.0 or the ESXi 4.0 host that you want to shut down, and select Reboot or Shut Down.
    • If you select Reboot, the ESX 4.0 or the ESXi 4.0 host shuts down and reboots.
    • If you select Shut Down, the ESX 4.0 or the ESXi 4.0 host shuts down. You must manually power the system back.
  5. Provide a reason for the shut down or reboot. This information is added to the log.

From vCLI or vMA

  • To put ESX 4.0 or ESXi 4.0 hosts in the maintenance mode, run the following command from vMA (vSphere Management Assistant) or vCLI (vSphere Command-Line Interface) console screen:
     
    /usr/lib/vmware-vicli/apps/host/hostops.pl --target_host <ESX-Host> --operation enter_maintenance --url https://<vCenter-Host>/sdk/vimService.wsdl
     
  • To reboot ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
     
    /usr/lib/vmware-vicli/apps/host/hostops.pl --target_host <ESX-Host> --operation reboot --url https://<vCenter-Host>/sdk/vimService.wsdl
     
  • To shut down ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
     
    /usr/lib/vmware-vicli/apps/host/hostops.pl --target_host <ESX-Host> --operation shutdown --url https://<vCenter-Host>/sdk/vimService.wsdl
Reference:
 
Print Friendly and PDF
Share/Bookmark

No comments:

Post a Comment