This is not a replacement for the white paper I am writing that describes VI client plugin development. Consider this a "BSG: Razor" tactic. Yes, the real product is coming, this is just to tide you over
To create a VI client plugin you just need to build a .NET library assembly (as opposed to an EXE). Your assembly should reference the following VMware assemblies (by default found in "C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\2.5\")
VIPlugins.dll is the only assembly required, but the plugin you are creating would be pretty bland if you did not reference the rest of the above assemblies.
Your assembly should have at least one class that implements the following interface defined in VIPlugins.dll: VMware.VIClient.Plugins.Plugin. Implementing that interface requires your class to implement the following methods:
- void Load( VMware.VIClient.Plugins.VIApp viApp )
- void Unload()
You could go ahead and compile your assembly, place it and its dependencies in a directory under (by default) "C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Plugins\" and it will show up in the VI client plugin manager.
You may be asking yourself, is that it? Hardly. However, the rest of the explanation is at this time best left to code comments. Please visit http://www.lostcreations.com/code/browser/trunk/vmware/viplugins/SVMotion/SVMotion/SVMotionPlugin.cs to see a syntax-colored view of the SVMotion plugin. The code is thoroughly documented and should tell you everything you need to know to write a basic VI client plugin.
Hope this helps!
I stupidly let lostcreations.com expire, and someone is now squatting on it for $2500. I don't have that money to buy a domain back for sentimental purposes. To that end, I'm attaching the VI Plug-ins Guide for historical purposes.
Yes it helped Thanks a lot, thanks for your investigation - great work. I converted my app within minutes to work as a VC plugin.
Of course it was just a question of time that this would happen. With Java and .NET reverse-engineering is not longer that hard as it was earlier, and it really suprises me that VMware has not published a whitepaper on it's own. But surely they will/have to in the near future.
Keep up the good work!
Hmmm, so there was a "thank you" while at the same time a "it doesn't seem like it would have been that hard". Not sure how to take all that
VMware has their reasons for not releasing this architecture just yet, many of them good. My instructions will be soon published, so hopefully it will make it even easier for people. What I haven't shared yet is how to create server plugins! Ooo, now those are sexy!
Hehe, I just thought about this when writing, but I think you got the meaning 100% right
Thanks for the great work, I'am looking forward to more, and as offered before, let me know when there is something to participate in/with
What does your plugin do? And, would you be interested in being the first plugin listed after mine on the newly registered viplugins.com? I am going to start a list of available viplugins so that people can find them with ease.
Good idea! I will keep you updated, especially when the plugin version (really) reaches it final state...
On another note, were my code comments easy to enough to follow? Any suggestions for improvement? Thanks!
Actually I did not read your comments in detail. I wanted to convert my project as fast as possible, so what I did was to extract the real lines of code (sorry to say, which means to delete all the comments) and adjust them to fill my needs.
Next time when I will start to use all the plugin functions provided I will read more deeply, but maybe you provide the whitepaper before?
Actually I read you post in this forum, and that was all I needed to get it working.
I noticed that the views are related to the app views (inventory,datastore,etc), not the tab view on the right pane of the VI3 client.
Any direction on how to add tabs to specific managed objects then navigate to that tab from the menu?
Sure, check out the Views interface in the VIPlugins.dll assembly. Same basic concept as the inventory items, but for the tabs you were referring to. I'll work up an example eventually, I just have not had to yet for any of my own plugins.
The VMware Infrastructure 3.5 Plugin and Extension Programming Guide - Revision 1 has been published. You can find a summary at http://itknowledgeexchange.techtarget.com/virtualization-pro/vmware-infrastructure-35-plugin-and-ext....
I have a couple of questions concerning your VIplugin guide:
1) How can i add views to the inventory (which be default shows 4 elements plus a checkbox) ?
2) Is it possible to enable drag&drop (f.e. of VMs, Datacenters,Hosts aso.) to a plugin ?
3) Is it possible to (directly) access the inventory items (VMs, hosts, datastores, virtual disks, pools...) which VC provides from a plugin? How?
1) Do you mean the left-hand side of the VI client with the big tree?
2) Hmmmm. Have you tried enabling the Drag events to see if that works?
3) I looked at this but couldn't figure out how. You could possibly write a plugin that chains up the Parent property of the context menu, but I'm not sure if that will work. I have an idea though and will look at it when I get a chance. I'm working on something other than plugins right now so my time is limited.
Thanks for your reply.
1) yes. How do I reach this control?
2) I added a dragdrop eventhandler to my plugin-form, but it seems that draging of VMs is not enabled to the plugin. U got any idea on how to enable this?
3) So the current state on this is the each plugin has to maintain its own VC inventory? Sounds a little rare, as the plugin is running in VC
I know that the plugin stuff is not official from VMware, so here we may have reached one of the reasons for doing so
1. See my previous answer to #3.
2. No clue.
3. Um, that's not what I said...I said I don't know how to access the control, not the values. The current inventory value is also passed to the plugin through as a generic list of managed object references. So whether you are right-clicking on a menu item or switching tabs, you know which item is selected in the inventory. You could also look at the Managed Object "InventoryView"