Restarting the Management agents (VMware ESX-ESXi)


To totally unlock this section you need to Log-in


Login

The management agents synchronize VMware components and let you access the ESXi host through the vSphere Client or vCenter Server. They are installed with the vSphere software. You might need to restart the management agents if remote access is interrupted.

Restarting the management agents restarts all management agents and services that are installed and running in /etc/init.d on the ESXi host.

Typically, these agents include hostd, ntpd, sfcbd, slpd, wsman, and vobd. The software also restarts Fault Domain Manager (FDM) if it is installed.

Users accessing this host through the vSphere Client or vCenter Server lose connectivity when you restart management agents.

Symptoms

  • Cannot migrate a virtual machine in a vSphere 5.x environment.
  • Cannot connect directly to the ESXi host or manage under vCenter server.
  • vCenter Server displays the error:
Virtual machine creation may fail because agent is unable to retrieve VM creation options from the host

  • Migrating a virtual machine fails with the error:
Relocate virtual machine
The operation is not allowed in the current connection state of the host
Time: xx/xx/xxxx xx:xx:xx
Target: xxxxx
vCenter Server: xxxxx

  • The Summary tab of the powered on virtual machine reports this information:
CPU Usage - 0 MHz
Memory Usage - 0.00 MB

Resolution

To resolve this issue, perform these steps, verifying if the issue is resolved after each step:

  • Restart the VMware VirtualCenter Server Service.
  • Restart the Management agents on the ESX host running the virtual machine.
  • Disconnect and reconnect the ESX host that is running the virtual machine to force vCenter Server to retrieve an updated set of data relating to the objects registered to the host.

Restart Management agents in ESXi Using Direct Console User Interface (DCUI)

  • Connect to the console of your ESXi host.
  • Press F2 to customize the system.
  • Log in as root.
  • Use the Up/Down arrows to navigate to Troubleshooting Options > Restart Management Agents.
  • Press Enter.
  • Press F11 to restart the services.
  • When the service restarts, press Enter.
  • Press Esc to log out.

Restart Management agents in ESXi Using ESXi Shell or Secure Shell (SSH)

  • Log in to ESXi Shell or SSH as root.
  • Restart the ESXi host daemon and vCenter Agent services using these commands:
/etc/init.d/hostd restart

/etc/init.d/vpxa restart

Note: In ESXi 4.x, run this command to restart the vpxa agent:

service vmware-vpxa restart

Alternatively:

To reset the management network on a specific VMkernel interface, by default vmk0, run the command:

esxcli network ip interface set -e false -i vmk0; esxcli network ip interface set -e true -i vmk0

Note: Using a semicolon (;) between the two commands ensures the VMkernel interface is disabled and then re-enabled in succession. If the management interface is not running on vmk0, change the above command according to the VMkernel interface used.

To restart all management agents on the host, run the command:

services.sh restart

To restart the management agents on ESX Server 3.x, ESX 4.x

  • Login to your ESX Server as root from SSH session (via putty for example) or directly from the console.
  • Type service mgmt-vmware restart and press Enter.
  • Make sure that automatic Startup/Shutdown of virtual machines is disabled before running this command otherwise you might reboot the virtual machines.

  • Type service vmware-vpxa restart and press Enter.
  • Type logout and press Enter to disconnect from the ESX Server.

Then you should see see this :

Stopping vmware-vpxa: [ OK ]
Starting vmware-vpxa: [ OK ]

To disable Virtual Machine Startup/Shutdown

  • Log in to VMware vCenter Server (vSphere Client, for example).
  • Select the ESX Server host where you want restart hostd.
  • Select the Configuration tab.
  • Select Virtual Machine Startup/Shutdown.
  • Select Properties.
  • Deselect Allow Virtual machines to start and stop automatically with the system.

If the host is not reachable through vCenter or the VI Client:

  • Log in to the ESX Server service console as root.
  • At the command line run vimsh.
  • At the [/] prompt, type:
hostsvc/autostartmanager/enable_autostart 0

Type exit. You can now safely restart mgmt-vmware (hostd).

1 thought on “Restarting the Management agents (VMware ESX-ESXi)”

Comments are closed.