The remote plug-in sample has an embedded Spring Boot application server. You can start the server by using a Java command with arguments that configure the server to communicate with a vCenter Server instance. This is the vCenter Server instance with which you will register the plug-in.

Prerequisites

  • Before you can run the remote plug-in sample, you must have built the SDK sample code.
  • Before you run the remote plug-in sample, choose the vCenter Server where you will register the plug-in.
  • Collect the following information about the vCenter Server instance:
    • Fully qualified domain name
    • Port number for Web Services API access
    • Certificate thumbprint

Procedure

  1. In a shell window, change to the root directory of the remote plug-in sample.
    cd sdk/samples/remote-plugin-sample
  2. Run the JAR file in the target directory.

    The command to run the plug-in JAR file requires several arguments, including the thumbprint, GUID, DNS name, and HTTPS port number of the vCenter Server instance. You can also specify --logging.path, which creates a subdirectory (if it does not already exist) and stores server log files in the subdirectory. Use a command similar to the following example, but substitute the details that pertain to your vCenter Server:

    java -jar target/remote-plugin-sample-7.0.1.00000.jar \
      --logging.path=logdir \
      --vcenter.guid=223b94f2-af15-4613-5d1a-a278b19abc09 \
      --vcenter.thumbprint=274172e07a754b9811a4fb5fc45384a79a5c258d13fa1667185016f28685fc54 \
      --vcenter.fqdn=vcenter-1.example.com --vcenter.port=443

Results

The plug-in application server runs. It might take a few minutes to initialize, and the console displays a number of output lines. When the server is ready, the console displays two lines saying Tomcat started and Started SpringbootApplication.

Example:

2021-02-25 04:36:49.442  INFO 76 --- [           main]
 o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8443
 (https) with context path '/sample-ui'
2021-02-25 04:36:49.442  INFO 76 --- [           main]
 c.v.sample.remote.SpringBootApplication : Started SpringBootApplication in
 34.752 seconds (JVM running for 36.127)

What to do next

If you have not yet registered the plug-in with a vCenter Server, find the plug-in server thumbprint and use it to register the plug-in. Registration enables the plug-in to render global views and object-specific views for objects managed by the vCenter Server instance.