- Log in to SSH or Local console as root.
- Run these commands:
/etc/init.d/hostd restart
/etc/init.d/vpxa restart
/etc/init.d/hostd restart
/etc/init.d/vpxa restart
Restarting the Management agents on an ESXi or ESX host (1003490)
Symptoms
- Cannot connect ESXi/ESX to VirtualCenter/vCenter Server
- Cannot connect directly to the ESXi/ESX host from the VMware Infrastructure Client / vSphere Client
- Cannot stop or start a virtual machine
- A virtual machine is shown as running in vCenter Server when it is not
- vCenter Server displays the error:
Virtual machine creation may fail because agent is unable to retrieve VM creation options from the host
Purpose
For troubleshooting purposes, restart the management agents on your ESX host. This article provides steps to restart the management agents ( mgmt-vmware and vmware-vpxa) directly on ESXi/ESX.
This article applies to ESXi/ESX 3.x, 4.x, 5.0, 5.1, 5.5 and 6.0.
This article applies to ESXi/ESX 3.x, 4.x, 5.0, 5.1, 5.5 and 6.0.
Warning: If LACP is configured on the VSAN network, do not restart management agents on ESXi hosts running Virtual SAN. File a support request with VMware Support and note this Knowledge Base article ID (1003490) in the problem description. For more information, see How to Submit a Support Request.
Caution: Restarting the management agents may impact any tasks that are running on the ESXi/ESX host at the time of the restart. For more information about identifying tasks running on an ESXi/ESX host, see Collecting information about tasks in VMware ESX and ESXi (1013003).
For more information, see Using ESXi Shell in ESXi 5.x (2004746).
Resolution
Restarting the Management agents on ESXi
To restart the management agents on ESXi:
From the 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 Restart Management Agents.
Note: In ESXi 4.1 and ESXi 5.0, 5.1, 5.5 and 6.0 this option is available under Troubleshooting Options. - Press Enter.
- Press F11 to restart the services.
- When the service restarts, press Enter.
- Press Esc to log out of the system.
From the Local Console or SSH:
- Log in to SSH or Local console as root.
- Run 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
- Check if LACP is enabled on DVS for version 5.x and greater. For more information, see vSphere 5.0 Networking Guide.
- If LACP is not configured, the services.sh script can be safely executed.
- If LACP is enabled and configured, do not restart management services using services.sh script. Instead restart independent services using the /etc/init.d/module restart command.
- If the issue is not resolved, and you are restarting all the services that are a part of the services.sh script, take a downtime before proceeding to the script.
- To reset the management network on a specific VMkernel interface, by default vmk0, run the command:
- Note: For more information about restarting the management service on an ESXi host, see Service mgmt-vmware restart may not restart hostd in ESX/ESXi (1005566).
Restarting the Management agents on ESX
To restart the management agents on an ESX host:
- Log in to your ESX host as root from either an SSH session or directly from the console.
- Run this command:
service mgmt-vmware restart
Caution: Ensure Automatic Startup/Shutdown of virtual machines is disabled before running this command or you risk rebooting the virtual machines. For more information, see Restarting hostd (mgmt-vmware) on ESX hosts restarts hosted virtual machines where virtual machine Startup/Shutdown is enabled (1003312) and Determining whether virtual machines are configured to autostart (1000163). - Press Enter.
- Run this command:
service vmware-vpxa restart - Press Enter.
- Type logout and press Enter to disconnect from the ESX host.
If this process is successful, you see output similar to:
[root@server]# service mgmt-vmware restart
Stopping VMware ESX Server Management services:
VMware ESX Server Host Agent Watchdog [ OK ]
VMware ESX Server Host Agent [ OK ]
Starting VMware ESX Server Management services:
VMware ESX Server Host Agent (background) [ OK ]
Availability report startup (background) [ OK ]
[root@server]# service vmware-vpxa restart
Stopping vmware-vpxa: [ OK ]
Starting vmware-vpxa: [ OK ]
[root@server]#
Note: If there are failures listed:- The most common reason for a stopping task to fail is that the service is not started.
- If a starting task fails for the mgmt-vmware service, see Troubleshooting vmware-hostd service if it fails or stops responding on an ESX/ESXi host (1002849).
- If a starting task fails for the vmware-vpxa service, see Troubleshooting the vCenter Server Agent when it does not start (1006128).
- If there are false errors for HA failover after restarting the management agents, see Performing a Reconfigure for VMware HA operation on a master node causes an unexpected virtual machine failover (2017778)
- Collect the VMware Support information. For more information, see Collecting diagnostic information for VMware ESX/ESXi using the vSphere Client (653) or, if it is required to collect logs from ESXi/ESX command line, see Collecting diagnostic information for VMware ESX/ESXi using the vm-support command (1010705).
- File a support request with VMware Support and note this Knowledge Base article ID (1003490) in the problem description. For more information, see How to Submit a Support Request.
Additional Information
- Español: Reiniciando los agentes de administración en un Servidor ESX o ESXi (1029041)
- Português: Como reiniciar os agentes de gerenciamento em um host ESXi ou ESX (2045125)
- 日本語: ESX および ESXi のマネジメント エージェントの再起動について (1037058)
- Deutsch: Neustarten der Management Dienste auf einem ESX oder ESXi Server (2000987)
- 简体中文: 在 ESXi 或 ESX 主机上重新启动管理代理 (2048205)
Thank you for the great post. I like a way you describing the content. The points you raised are valid and suitable. I am SEO Expert Telling you about trend micro support. trend micro support service helps you get set up, virus resolve. Let's talk to our experts to take payroll off your hands.
ReplyDeletehttp://www.trendmicroantivirussupport.com.au/