Register the vSphere Client Remote Plug-in Sample

Before you can view the remote plug-in sample in the vSphere Client, you must register it with a vCenter Server instance to which you want to connect. The vSphere Client SDK contains a vCenter Server plug-in registration tool that registers a plug-in with a vCenter Server ExtensionManager.

You have installed the SDK and you are ready to run the remote plug-in sample.

Prerequisites

Before you register the remote plug-in sample, you must do the following:

  • Build the remote plug-in sample.

  • If needed, start vCenter Server.

  • If needed, change permissions on the plug-in registration tool to allow execute access.

In addition, you need to know the following parameters:

  • The host name or IP address of the machine where you are running the sample plug-in server. This address must be accessible to the vCenter Server instance so that it can download the plug-in manifest file.

  • The port number where the plug-in server receives HTTPS requests. The sample serves port 8443 by default. The port must be open on the firewall of your development machine and accessible to the vCenter Server.

  • The host name or IP address of the vCenter Server where you want to register the remote plug-in sample.

  • The username and password of a vSphere user that has permission to access the ExtensionManager on the vCenter Server where you want to register the remote plug-in sample. For example, [email protected] normally has the necessary Extension.Register permission.

  • The SHA-256 thumbprint of the plug-in server, so that vCenter Server can retrieve the plug-in manifest file. A SHA-1 thumbprint is also supported, but SHA-1 is deprecated in favor of SHA-256.

    Note:

    The thumbprint must contain colon separators, unlike the thumbprint format used when starting the plug-in server. vCenter Server accepts only thumbprints that have a colon between each pair of characters.

  • The version number of the remote plug-in sample.

  • The key of the remote plug-in sample, defined in the plug-in manifest. By default, this is plugin.name.

  • The path from the plug-in web server root to the plug-in manifest file. By default, this is /sample-ui/plugin.json.

For more information about the registration tool, see vSphere Client Plug-in Registration Tool.

Procedure

  1. In a command shell, change to the tools/vCenter plugin registration/prebuilt directory.

    cd html-client-sdk/tools/*plugin*/prebuilt

    The directory contains both an extension-registration.bat script for Windows DOS shells, and an extension-registration.sh script for Unix or Linux shells.

  2. Run the extension-registration script appropriate for your operating system, specifying the prerequisite parameters.

    For a Unix or Linux shell, use this syntax:

    ./extension-registration.sh  -action registerPlugin  -remote \
    -url https://myvcenter/sdk \
    -username [email protected]  -password 'mysecret' \
    -key com.vmware.sample.remote  -version 1.0.0 \
    -pluginUrl https://mydevbox:8443/sample-ui/plugin.json \
    -serverThumbprint 19:FD:2B:0E:62:5E:0E:10:FF:24:34:7A:81:F1:D5:33:\
    19:A7:22:A0:DA:33:27:07:90:0F:8E:8D:72:F1:BD:F1 \
    -c 'Example, Inc.'  -n 'Remote Plug-in'  -s 'This is a sample plug-in'

    For a DOS command shell, use this syntax:

    ./extension-registration.bat  -action registerPlugin -remote ^
    -url https://myvcenter/sdk ^
    -username [email protected]  -password "mysecret" ^
    -key com.vmware.sample.remote  -version 1.0.0 ^
    -pluginUrl https://mydevbox:8443/sample-ui/plugin.json ^
    -serverThumbprint 19:FD:2B:0E:62:5E:0E:10:FF:24:34:7A:81:F1:D5:33:^
    19:A7:22:A0:DA:33:27:07:90:0F:8E:8D:72:F1:BD:F1 ^
    -c 'Example, Inc.'  -n 'Remote Plug-in'  -s 'This is a sample plug-in'

    For a PowerShell prompt, use this syntax:

    ./extension-registration.bat  -action registerPlugin  -remote `
    -url https://myvcenter/sdk `
    -username [email protected]  -password 'mysecret' `
    -key com.vmware.sample.remote  -version 1.0.0 `
    -pluginUrl https://mydevbox:8443/sample-ui/plugin.json `
    -serverThumbprint 19:FD:2B:0E:62:5E:0E:10:FF:24:34:7A:81:F1:D5:33:`
    19:A7:22:A0:DA:33:27:07:90:0F:8E:8D:72:F1:BD:F1 `
    -c 'Example, Inc.'  -n 'Remote Plug-in'  -s 'This is a sample plug-in'
    Note:

    If the password contains special characters, use the appropriate escaping sequences for your shell.

    The registration script displays a message that the plug-in has been successfully registered in vCenter.

Results

What to do next

In a web browser, connect to the vCenter Server URL and verify that the remote plug-in displays a Global View.