If you are unable to connect directly to the ESXi host or manage under the vCenter server, Or if your vCenter Server displays an error, is because the creation of VM fails when the agent is unable to retrieve VM creation options from the host. You can restart the management agents on your ESXi host but see if LACP is configured on the vSAN network, if so then do not restart the management agents on ESXi hosts running vSAN, as this would impact any tasks that are running on the ESXi host at the time you restart, also before restarting the Host deamon hosted service or services.sh check if there is any storage issue.
Restart Using Direct Console User Interface (DCUI):
First, you need to connect to the console of your ESXi host and select F2 to customize the system.
Next, log in as root.
Navigate to Troubleshooting Options > Restart Management Agents with the help of Up/Down arrows.
Press Enter and F11 to restart the services and when the service restarts hit Enter.
You can log out by hitting Esc.
Note: Another way to restart services using the Host Client is select Host >> Manage >> Services and select the service to restart.
Use ESXi Shell or Secure Shell (SSH) to restart management agents in ESXi:
• Sign in to ESXi Shell or SSH as root.
• Using the following commands, restart the ESXi host daemon and the vCenter Agent services:
/etc/init.d/hostd restart /etc/init.d/vpxa restart
• Use the following command to reset the management network on a particular VMkernel interface, typically vmk0:
esxcli network ip interface set -e false -i vmk0; esxcli network ip interface set -e true -i vmk0
Reminder: The VMkernel interface will be disabled and then enabled sequentially if a semicolon (;) is used between the two commands. Change the above command to the appropriate VMkernel interface if the management interface is not active on vmk0.
• Run the command to restart all management agents on the host:
• Avoid using the services.sh command to restart management services if LACP is enabled and configured. Instead, you can use the /etc/init.d/module to restart command to restart separate services.
• If the problem continues and you are restarting all of the services included in the services.sh script, take a break before continuing with the script.
• If NSX is installed, do not use the /sbin/services.sh restart command because it will restart all services on the ESXi host. If you need to restart the management agents on the ESXi host, do that individually by restarting vpxa, host.d, and fdm. Also, you must run the /sbin/services.sh restart command because restarting each management agent is ineffective, then migrate all VMs off the ESXi host and, if possible, put the host in maintenance mode.
• Run this command to verify that NSX for vSphere is installed on an ESXi host.
esxcli software vib list --rebooting-image | grep esx-*
To check if NSX is installed on the ESX host, look for these VIBs:
• Do not use services.sh when working with shared graphics in a View environment (VGPU, vDGA, vSGA). By doing so, the xorg service, which controls graphics at the guest OS level, will be terminated. You will ultimately bring down your VDI workload using shared graphics by removing the graphics from the guest OS. If you are not in maintenance mode, make sure you are only restarting hostd and vpxa when shared graphics are being used.
Also check: Is your ESXi Root Account Locked?
Monitor VMware ESXi Host Using LibreNMS
To get more updates you can follow us on Facebook, Twitter, LinkedIn