When you are not able to connect ESXi server to vCenter, or when you cannot connect to ESXi server from VI client it may be necessary to restart the management agents on ESXi host. In today's post called How to restart management agents on ESXi host we will learn this.
Sometimes you have errors when you 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.
You might want to follow this little how to article showing you the way doing it. For the restart of the management agents (mgmt-vmware and vmware-vpxa) directly on ESXi you will have to do the following:
How to restart the Management agents on ESXi Server – via the console:
1.) Connect to the console of your ESX Server and press F2
2.) Login as root and when using the Up/Down arrows navigate to Restart Management Agents.
3.) Press Enter and press F11 to restart the services.
4.) When the service has been restarted, press Enter. Then you can press Esc to logout of the system.
Then you should see a screen like this one :
Restart management agents via CLI
Restart Management agents in ESXi Using ESXi Shell or Secure Shell (SSH):
Log in to ESXi Shell or SSH as root.
For Enabling ESXi Shell or SSH, see Using ESXi Shell in ESXi 5.x and 6.x (2004746).
Restart the ESXi host daemon and vCenter Agent services using these commands:
/etc/init.d/hostd restart
/etc/init.d/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 out our FREE Tools page here.
More posts from ESX Virtualization:
- VMware vSphere 8.0 U1 Announced (NEW)
- VMware vSAN 8.0 U1 What's New? (NEW)
- vSphere 8.0 Page
- Veeam Bare Metal Recovery Without using USB Stick (TIP)
- ESXi 7.x to 8.x upgrade scenarios
- A really FREE VPN that doesn’t suck
- Patch your ESXi 7.x again
- VMware vCenter Server 7.03 U3g – Download and patch
- Upgrade VMware ESXi to 7.0 U3 via command line
- VMware vCenter Server 7.0 U3e released – another maintenance release fixing vSphere with Tanzu
- What is The Difference between VMware vSphere, ESXi and vCenter
- How to Configure VMware High Availability (HA) Cluster
- Homelab v 8.0 (NEW)
Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)
Bilal says
Would doing a services.sh restart cause any issues with HA, as the host can drop out of vcenter for a few seconds?
It has never happened to me, and its been a while since I have done it
Vladan SEGET says
few sec. might be OK for HA. It depends if the host runs as a master or as a slave. If the agent is a master, then isolation is declared in 5 seconds. If it is a slave, isolation is declared in 30 seconds.
Check the kb for event. settings http://kb.vmware.com/kb/1030320
Adrian Shepherd says
I am struggling to find out how to re-install the vpxa agent on ESXi 6.0 , ive screwed up the config file trying to change IP addresses to host names, so re-installation would be best. Thumbs down to me for rushing and not making a copy first
Glenn Gilliam says
Did you ever figure out how to reinstall vpxa on esxi 6?
Christian Hofer says
Hello
we’re running ESXI 6.5. When I try to services.sh restart, I get the message: services.sh restart Invalid operation requested: This ruleset is required and connot be disabled.
What does this mean? I would like to restart the services via ssh. Any ideas?
Thanks
Chris
jimjimmidy says
Got me out of a pickle…..thanks