Deploying a Plug-In Package
You deploy a plug-in package to the vSphere Web Client by registering the package as an extension on vCenter Server. When you register your plug-in as an extension on vCenter Server, your plug-in becomes available to any vSphere Web Client that connects to your vSphere environment.
You must register your plug-in on every vCenter Server where you need to use it. When a vSphere Web Client connects to a vCenter Server where your plug-in is not registered, the plug-in is not visible to the client.
When a vSphere Web Client establishes a user session to vCenter Server, the vSphere Web Client application server queries vCenter Server for a list of all available plug-in packages that are registered as vCenter extensions. Any plug-in packages that are not present on the application server are downloaded and installed.
Note Plug-in package .ZIP files are not always installed locally on a vCenter server. Some vCenter extensions can reference remote packages at any Web server URL. If a remotely hosted package is found on vCenter Server, the package .ZIP file is downloaded from the URL specified in the vCenter extension data.
The vSphere Web Client application server can run only one version of each plug-in package. If a plug-in package is present on the application server, but has an older version number than the corresponding package on vCenter Server, the package version on vCenter Server replaces the older package.
Registering a Plug-In Package as a vCenter Server Extension
To register your plug-in package as an extension with vCenter Server, you must create an Extension data object and register this data object with the vCenter Server ExtensionManager. See “Creating the vCenter Server Extension Data Object” for information on the XML properties.
You can create and register an Extension data object in the following ways:
Use a utility application or script to create the Extension data object programatically, and register that data object using the vSphere API. You can use the ExtensionManager.registerExtension() method to register the data object.
1
Create the vim.Extension data object in an XML file, and place that file in a file system available to the vSphere Client.
2
3
4
5
6
Click Register Plug-in.
Creating the vCenter Server Extension Data Object
Regardless of the registration method you choose, you must set the properties of the Extension data object as follows:
key. The plug-in package id, defined in your plug-in package’s manifest, plugin-package.xml.
client. This property must contain one ExtensionClientInfo data object, with the following properties:
type. Must be set to vsphere-client-serenity.
url. The location of the plugin-package folder, which must be a .zip file. The ZIP archive root folder must contain the plugin-package.xml package manifest.
server. (conditional) If the URL uses HTTPS, you must define a <server> property in your extension data object. The <server> property must contain the SSL thumbprint for the server where your plug-in package ZIP file is stored. For information about the <server> property, see Using a Secure URL for the Plug-in Location.
version. The dot-separated version number of the plug-in package, defined in plugin-package.xml.
Example: Example vim.Extension XML Definition shows an example Extension object defined in an XML file.
Example: Example vim.Extension XML Definition
<extension>
<description>
<label>My plugin</label>
<summary>My first vSphere Client plugin</summary>
</description>
<key>com.acme.myPlugin.MyPlugin</key>
<company>VMware</company>
<version>1.0.0</version>
<client>
<version>1.0.0</version>
<description>
<label>My plugin</label>
<summary>My first vSphere Client plugin</summary>
</description>
<company>VMWare</company>
<type>vsphere-client-serenity</type>
<url>http://a-web-server-path/mypluginPackage.zip</url>
</client>
<lastHeartbeatTime>2012-07-21T00:25:52.814418Z</lastHeartbeatTime>
</extension>
 
Using a Secure URL for the Plug-in Location
A best practice is to use a secure URL (HTTPS) for your plug-in package .zip file location. If you use an HTTPS URL, you must include a <server> property in your vim.Extension data object. The <server> property contains the SHA1 thumbprint for the server that corresponds to the URL. Example 12-3, on page 112, shows an example server property.
Example: Example <server> Property with SHA1 Thumbprint
<extension>
...
    <server>
        <url>https://myhost/helloworld-plugin.zip</url>
        <description>
            <label>Helloworld</label>
            <summary>Helloworld sample plugin</summary>
        </description>
        <company>VMware</company>
        <!-- SHA1 Thumbprint of the server hosting the .zip file -->
        <serverThumbprint>
            3D:E7:9A:85:01:A9:76:DD:AC:5D:83:1C:0E:E0:3C:F6:E6:2F:A9:97
        </serverThumbprint>
        <type>HTTPS</type>
        <adminEmail>your-email</adminEmail>
    </server>
</extension>
 
Verifying Your Plug-In Package Deployment
You can verify that your plug-in package deployed correctly by searching the log file on the vSphere Web Client Virgo server for your plug-in package ID. If the package deployed correctly, the plug-in package ID is included in a message about a successful package deployment. You can also check specific folders on the Virgo server for your expanded .zip files.
On the Windows operating system, the file appears in the following location.
%PROGRAMDATA%/VMware/vSphere%20Web%20Client/vc-packages/vsphere-client-serenity/
On the Linux operating system, the file appears in the following location.
/var/lib/vmware/vsphere-client/vc-packages/vsphere-client-serenity/
Unregistering a Plug-In Package
You can unregister a plug-in package that you previously registered with vCenter Server. You can unregister the plug-in package programatically, using the vSphere API ExtensionManager method unregisterExtension(), or you can use the vCenter Managed Object Browser (MOB) interface in your Web browser to manually delete the extension.
Unregistering a plug-in package on vCenter Server does not delete the plug-in package files that are installed locally on the vSphere Web Client Virgo server. The files are not used after you unregister the package. To remove the files for cleanup purposes, you must delete the plug-in package files manually.
Note In the current release of vSphere, any Java services you added are still active after you unregister a plug-in package, and the plug-in might still appear in the vSphere Web Client Plug-In Management view. This is a known issue, and a workaround is to restart the Virgo server.