Home > virtualization, vmware, vsphere > vCenter Server Appliance: how to register a vCenter in vSphere Web Client by command line

vCenter Server Appliance: how to register a vCenter in vSphere Web Client by command line

image

With vSphere 5 there is a new web-oriented client to manage vSphere: the vSphere Web Client.

Before you can connect to a vCenter Server, you must register it with the vSphere Web Client.

You can register multiple vCenter Server systems with a single vSphere Web Client. However, the vSphere Web Client can connect only to one vCenter Server system at a time, unless those vCenter Server systems are joined together in Linked Mode.

To register a vCenter you just need to open a Web browser and enter the URL for the administration tool: https://localhost:port/admin-app 

If you are using the vCenter Server in a vCenter Server appliance, it is preregistered with the vSphere Web Client installed in the appliance.

But what if you want to register another vCenter Server with the vSphere Web Client installed as part of a vCenter Server Appliance? You cannot register a vCenter Server system with the client from a remote system and no web browser (neither graphical nor textual) is installed in the vCSA.

To register the vCenter Server you must use a command-line script, well hidden in the vCSA…

Here it is the procedure:

  1. Access the vcsa via ssh as root user (the ssh service is enabled by default on vCSA)
  2. Go to the directory /usr/lib/vmware-vsphere-client/scripts:
    cd /usr/lib/vmware-vsphere-client/scripts
  3. Use the admin-cmd.sh script to register the vcenter:
    ./admin-cmd.sh register https://localhost:9433/vsphere-client https://localhost root <password>
  4.  

    The same command can also be used to unregister a vCenter Server.

    For the sake of completeness the full usage is:

    admin-cmd <register|unregister> <vSphere-web-client-url> <vCenter-server-url> <username> <password>

    register|unregister -  Operation type. If the type is register, this tool will register the specified vCenter Server with the vSphere Web Client. If the type is unregister, this tool will unregister the specified vCenter Server.

    vSphere-web-client-url – vSphere Client URL. Example: https://clientIP:port/vsphere-client

    vCenter-server-url – vCenter Server system which is being registered or unregistered.

    For more info about the vSphere Web Client:

http://www.vladan.fr/vsphere-5-installing-web-client/

http://www.ntpro.nl/blog/archives/1788-vSphere-5-Video-The-vSphere-Web-Client.html

http://vinfrastructure.it/en/vsphere-5/vmware-vsphere-web-client/

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: