VMware
8 Replies Last post: Apr 8, 2009 8:25 AM by AmaroM  

Embedding chat in VI Client posted: Jun 30, 2008 11:44 AM

Click to view c_shanklin's profile Master 754 posts since
Dec 3, 2007
One nice thing about the plug-in architecture we've released is how easy it is to do web-based mashups. This thread shows you how to insert a chat window into your VirtualCenter client that makes it possible for everyone who manages an instance of VirtualCenter to chat to each other in real-time.

This is all made really simple using Meebo Rooms. In this demo I've created a Meebo room devoted to VI Client Plug-ins, but you could just as easily create your own room specific to your team.

There are 2 parts to getting this demo up and running in your environment:

  1. Install the plug-in to a local webserver, or to your VirtualCenter server.
  2. Register the plug-in.
Install the plug-in.

First, let's talk about installing the plug-in. The first thing to do is download chat.zip, attached to this document. This zip file contains 2 files, an XML file that defines the plug-in, and an HTML file that contains the Meebo Room. You can install these files to a local web server or you can install them to VirtualCenter.

If you choose to install them to a local web server, make a note of the address as you'll need it later.

If you choose to install the plug-in to VirtualCenter directly, simply extract the zip file to the %PROGRAMFILES%\VMware\Infrastructure\VirtualCenter Server\tomcat\webapps\ROOT directory. If you go the VirtualCenter route, here's a screenshot of what it will look like in the installation directory:

vcview.png

Next you'll need to customize the chatplugin.xml file to point to your web server. In the XML file there are a number of URLs that read http://SERVERADDRESS/chat/chat.html. You will need to replace these with the actual address. If you installed the plugin to VirtualCenter, the address to use is http://<your/ VC IP>:8086/chat/chat.html. Note that this uses http, not https and make note of the port number 8086.

Registering The Plug-in.

Now it't finally time to register the plug-in. To do this, you should download a registration utility available within this community. I used the PowerShell registration utility, and this is the exact command I used to register:


get-vc 10.21.10.80
new-plugin -description "Chat" -key plugintoys.chat -version 1.0.0 -url http://10.21.10.80:8086/chat/chatplugin.xml -company VMware -adminEmail <a href="#">me@mailinator.com|mailto:me@mailinator.com</a>


Here's a picture of what it looks like when everything goes right:

chat.png

Admittedly this whole process of deploying a plug-in is a bit tricky, but this basic approach works for putting any kind of HTML page into VI Client, and opens a lot of possibilities, such as integrating with Google Apps, etc. Enjoy, and as you find new and exciting uses for plug-ins we hope you'll tell us all about them.

Attachments:

Re: Embedding chat in VI Client

1. Jun 30, 2008 11:58 AM in response to: c_shanklin
Click to view akutz's profile Hot Shot 317 posts since
Nov 9, 2005
That is too cool! Thanks Carter!

Re: Embedding chat in VI Client

2. Jun 30, 2008 4:51 PM in response to: akutz
Click to view halr9000's profile Master 813 posts since
Jun 7, 2007
Heh, I don't know about using that for business discussions though. Chats are logged it says! Setup an internal jabber server, put up a web chat client for that, and then go to town. :)

Hal Rottenberg
Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Re: Embedding chat in VI Client

3. Jun 30, 2008 5:01 PM in response to: halr9000
Click to view akutz's profile Hot Shot 317 posts since
Nov 9, 2005
Hal, don't be a square daddy-o. Love logged chat. Love the tentacle
(Futurama still rocks!).

--
-a

"condensing fact from the vapor of nuance"

Re: Embedding chat in VI Client

4. Sep 28, 2008 3:50 PM in response to: akutz
Click to view arjunvenkatraman's profile Novice 16 posts since
Jun 20, 2007

I'm trying to implement this functionality for use with standalone ESXi hosts. Is that even possible? I put the chat.html and the xml file on a webserver and tried registering it with the registration utility provided. but it requires a login into a VC server, which i don't have.

Suggestions?


Re: Embedding chat in VI Client

6. Sep 28, 2008 6:16 PM in response to: c_shanklin
Click to view akutz's profile Hot Shot 317 posts since
Nov 9, 2005
And I've moved to the official architecture myself for reasons that I
presented in my VMworld 2008 presentation. You can watch and listen to
them at http://www.vmworld.com/vmworld/thread/1878. That said, if you
want help in achieving your goal I suggest you take a look at the
white paper I wrote on the subject of unofficial plug-ins, VMware
Infrastructure 3.5 Plug-in and Extension Programming Guide - Revision
1.3, at http://akutz.files.wordpress.com/2008/05/vi3progplugin-rev13.pdf.

On Sun, Sep 28, 2008 at 7:55 PM, c_shanklin

Re: Embedding chat in VI Client

7. Dec 10, 2008 9:59 AM in response to: c_shanklin
Click to view mbanusife's profile Novice 14 posts since
Mar 28, 2006

I get the following error when I try to register the plugin....

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful,
this script can potentially harm your computer. Do you want to run
C:\registerPlugin.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
Add-PSSnapin : Cannot add Windows PowerShell snap-in vmware.vimautomation.core
because it is already added. Verify the name of the snap-in and try again.
At C:\registerPlugin.ps1:14 char:13
+ add-pssnapin <<<< vmware.vimautomation.core

Re: Embedding chat in VI Client

8. Apr 8, 2009 8:25 AM in response to: mbanusife
Click to view AmaroM's profile Master 1,477 posts since
Oct 21, 2004

Did you run the command within powershell

PS C:\> Set-ExecutionPolicy unrestricted

If you are going to the run the scritp located in a remote machine..

then you need add the machine to the Internet Trusted sites.

FYI - There is also an Administrative template for powershell (Which includes the execution policy)

http://www.microsoft.com/downloads/details.aspx?FamilyID=2917a564-dbbc-4da7-82c8-fe08b3ef4e6d&DisplayLang=en

Developer Social Media

Communities