Saturday, September 8, 2012

How to restart management agents in ESXi 5

I was troubleshooting an issue where I had to restart the management agents on an ESXi 5 environment.

I enabled the SSH services from the security profiles. I managed to connect through a putty session.

Then I issued the following command
# service mgmt-vmware start 
But it returned saying unknown command browsing through the kb articles I found that the command  has to be  replaced with

# /sbin/services.sh restart

Following are some useful kb articles for troubleshooting purposes.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003490

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005566

4 comments:

  1. Will restarting the management agent cause the vm's in it to reboot?

    ReplyDelete
  2. Is there a way to run this command from vMA?

    Thanks,

    Ed

    ReplyDelete
  3. Since this is a question that is very worth researching I did and found out this for you... but I didn't get a chance to experiment this.

    If you have added multiple target servers, you should specify the target server explicitly when running commands. By default, vMA executes commands on the server that is configured as the default target by using the vifptarget -s command. If none of the added target servers are configured as the default target and no target server is explicitly specified when running the vSphere CLI commands, then the commands are run against the vMA itself.
    To run vSphere CLI for the targets
    1
    Add servers as vMA targets.
    vifp addserver
    vifp addserver
    2
    Verify that the target server has been added:
    vifp listservers
    3
    Run vifptarget.
    vifptarget -s
    The command initializes the specified target server. Now, this server will be taken as the default target for the vSphere CLI or vSphere SDK for Perl scripts.
    4
    Run vSphere CLI or vSphere SDK for Perl scripts, by specifying the target server. For example:
    esxcli --server server2 network nic list

    ReplyDelete