While debugging a vSphere Web Client plugin project, I found it’s not easy to refresh the services with the Virgo server which acts as the back end for the plugin GUI but as client for the vCenter server. Packaged as OSGi bundle, it’s supposed to be easy to reload the service. Mixed together with various components in the plugins, however, it’s sometimes not quite straight forward for the re-deployment for updated code. Here is a brute force approach I found while playing with it.
First of all, you want to update the file whose link is registered in the plugin extension. If you use Tomcat as your server, the location could be a sub-directory under the /var/lib/tomcat7/webapps/ directory. You could change the plugin version (including build number) and make the vCenter to download the file again. If you don’t want to do it, you can go ahead and login into vCenter appliance for the following actions.
Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.
# ls /usr/lib/vmware-vsphere-client/server/work/org.eclipse.virgo.kernel.deployer_3.0.3.RELEASE/staging/global/bundle/
In the directory, locate the sub directory for your plugin service and delete it completely using “rm -fr
Then, go to the another directory and something similar.
# ls /var/lib/vmware/vsphere-client/vc-packages/vsphere-client-serenity/
Now, the related files are removed. However the OSGi bundle is still loaded. I remember there are commands to reload a bundle for a typical container. An easy way is just to restart the client as follows. It may take more than one minute for the GUI to load after you see the console message the service has been started. Just be patient.
# service vsphere-client restart