I have seem to come across a re-occuring problem with ESXi 4.0, the management agents. Especially on one host which seems to flicker in and out of connectivity with the slightest of reconfigurations. At times I feel like I need to take my ESXi host by the hand and comfort it, “It’s okay, you don’t need to disconnect because I renamed one of your VMs, just hang in there” Nope, no luck, this ESXi is a finicky thing. It doesn’t seem as tough as it’s much older and more mature brother ESX 4.0 (in my opinion). Although at times this does happen to ESX too, we can’t all be perfect.

Well we all have our faults in life, we all can’t be the quarterback in high school, no worries, there’s an easy fix if you have this issue of your ESXi host entering into a disconnected state. It’s a simple as restarting the management agents on the host itself. I took the time to actually track this issue down the other day and document it for you here if you are experiencing the same connectivity issues in Virtual Center, both for ESX and ESXi respectively.

Restarting Management Agents on an ESX 3.x/4.x host

    Step 1 – Put down the stress ball, and the Mountain Dew, get up from your seat and make your way to the server room or lab (wherever your actual ESX host resides) and log into your ESX host ; or if you are the lazy type log into your server as root via SSH (don’t do it this way, you need a break, get up and take a quick walk)

    Step 2 – Via the CLI type the command service mgmt-vmware restart and press Enter

    Step 3 – Still at the CLI, next type the command service vmware-vpxa restart and press Enter

    Step 4 – You are done, logout head back to your desk, resume stress ball, resume Mountain Dew… you just saved the world! Well done.

Restarting Management Agents on an ESXi 3.x/4.x host

Now it’s important to note that if you are dealing with an ESXi 3.x/4.x host, you do not have the functionality of the CLI, you get to play with what they call the Direct Console User Interface (DCUI). Maybe you knew this already, I thought I would do you a favor and point it out to you if you didn’t know that so you don’t spend hours looking for a way to get to the CLI on an ESXi host. You’re welcome. Here are the steps to restart the management agents on an ESXi 3.x/4.x host:

    Step 1 – Yes, get up again, put the stress ball back down, leave twitter alone for a few minutes it will still be there when you get back. Head to the server room or lab (wherever your actual ESX host resides) and sit in front of the monitor and keyboard, if you’ve gotten this far, you are doing great!

    Step 2 – Time to play with the Direct Console User Interface (DCUI). Press F2 to CUSTOMIZE THE SYSTEM When the logon screen appears, log in as root, hopefully you remember the password and then you are in.

    Step 3 – When the ESXi screen comes up use the up/down arrows to get down to the RESTART MANAGEMENT AGENTS option, hit Enter, then hit Enter once again to actually restart the management agents. At this point in time you will get a warning that looks like this:

    Don’t fret, this is what you came here to do, you got up from your desk, you know there is a problem and this will fix it. Push F11 and you will see the agents stopping and starting, it will state “Stopping management agent. Done. Starting management agent. Done.” That’s it

    Step 4 – All you have left to do is hit Enter and then ESC to exit. Head back to desk, resume stress ball, resume Mountain Dew and yes, you can get back on twitter now.

That’s it. You now know how to restart the management agents on both ESX/ESXi 3.x and 4.x hosts.

-GStuart

Greg W Stuart
Greg is the owner and editor of vDestination.com. He's been a VMware vExpert every year since 2011. Greg enjoys spending time with his wife and 3 kids. He works as a Sr. Consultant at VMware and resides in Northern Virginia, 15 minutes west of Washington DC.

Leave a Reply

Your email address will not be published. Required fields are marked *