To meet the requirements of your virtual environment, you must extend the capabilities of the vSphere Web Client by creating plug-in modules. Depending on your extension solution, you can extend the user interface layer and the service layer of the vSphere Web Client.

Incorrect structure of the plug-in package leads to deployment errors. To avoid these errors, consider the following best practices when creating your plug-in packages.

Use the generation tools provided with the vSphere Web Client SDK to develop your vSphere Web Client extensions and create plug-in packages.

Verify that the structure of the plug-in package is as follows:

plugin-package.xml - The file describes general information about the plug-in package, the deployment order of the plug-in modules, and any dependencies upon other plug-in packages.

plugins folder - The folder contains one or more JAR and WAR files that represent the user interface and Java services components. Limit the number of third-party libraries that you add to this folder.

To avoid installation errors, make sure that all third-party libraries that you use are added inside the JAR and WAR files of the plug-in package and not inside the plugins folder. If you add third-party libraries to the plugins folder, the bundles must be OSGi-compliant. Because the vSphere Web Client resides on the Virgo Web Server, which is based on the SpringSource dm Server and is built on top of the Equinox OSGi framework, third-party libraries must be packaged as OSGi bundles. OSGi bundles must include an OSGi manifest file that contains correct and thorough OSGi metadata.

To avoid deployment errors generated by the Virgo server, make sure that you do not include third-party libraries that are already available on the server. You can navigate to the vsphere-client-sdk/server/repository/usr and vsphere-client-sdk/server/pickup directories to view the available libraries.

If your plug-in package contains both user interface and Java service components, place the Java service components before the user interface components in the plug-in package manifest file. Use the <bundlesOrder> element to specify the order in which the bundles are deployed to the vSphere Web Client.

For best performance, when designing your vSphere Web Client extension, limit the number of files included in the plugins folder of your plug-in package. Ideally, your plug-in package must contain only one WAR file, which contains the user interface plug-in modules, and one JAR file, which contains the Java service plug-in modules. Fragmenting your code into many bundles might significantly increase the deployment time and memory consumption.

To avoid compatibility issues in case your plug-in package depends on other plug-in packages with specific versions, make sure that you define correctly the plug-in dependencies by using the match parameter of the dependencies element in your plugin-package.xml manifest file. You must specify not only the minimum required plug-in package version compatible with your plug-in, but also the maximum one. Otherwise, after the vSphere Web Client deploys your plug-in package, the plug-in will not work because the plug-in dependencies cannot be resolved and may cause errors in the vSphere Web Client.

For example, you can use the following lines in the manifest file of your plug-in package to define the minimum and maximum supported versions of the vSphere Web Client:

 ... 
   <dependencies>
    <pluginPackage id="com.vmware.vsphere.client" version="5.5.0" match=“greaterOrEqual" />
    <pluginPackage id="com.vmware.vsphere.client" version=“6.0.0" match=“lessThan" />
   </dependencies>
 ...

Note

If your plug-in package is only compatible with a specific version of the vSphere Web Client, you must use the equal value of the match attribute to specify the version. In this way, you ensure that when you upgrade the vSphere Web Client, your plug-in package is not deployed, and does not cause any errors.

To avoid deployment failures, you must create a ZIP archive file for your vSphere Web Client extension. Moreover, if you want to complete successfully the certification for your vSphere Web Client plug-in, know that the plug-in signing tool signs only plug-ins that have the ZIP file format.