(version 2.0 is now released! Go here)
So eight days ago I decided I was going to give another try to write an application that uses the VMware vSphere Web SDK. I had attempted this at least a year ago and never finished anything because of *insert excuse here*.
I always have ideas for cool (at least in my mind) tools swirling in my head. Even though I am a data center quadruple threat kind of guy (Microsoft, VMware, Cisco, and EMC), I like to do scripting and development to sharpen my mind. I always thought I was going to be a developer in college and love to turn ideas into reality.
So last week I fired up Visual Studio 2008 and started spending some nights coding. Along the way I found out some interesting things, caused a great blog post, and had a blast learning more about vSphere. I have a tendency to roll my challenges together and so decided to make this slick as possible including:
- Making it a Tray Icon (A must for this app)
- Doing all forms in WPF which I have never worked with before (XAML crash course)
- Making all background processes multithreaded and eliminating the need for timers
- Learning how to effectively use PropertyCollector.WaitForUpdates method to touch vCenter as little as possible
- Building a proper MSI setup
On top of all this I went and wrote all the operations, connections, and credential pieces into classes for re-usability. I am a bit of a perfectionist and probably went WAY overboard without much gain.
So without further self flagellation and glorification I present the: [drain file 2 url vSphere Session Monitor]
This little bad boy right here’s only purpose is to keep you informed of who is on your vCenter server.
Let me walk you through the steps to try it out.
Download the x86 installer from here: [drain file 2 url vSphere Session Monitor]
I do not endorse using this tool in production. Please test in a lab environment until you (if ever!) are comfortable using elsewhere.
Run the installer on the workstation of your choice. You must have .NET 3.5 installed. Also this workstation must have the ability to hit the vCenter Web SDK which is https://*your vCenter Server/sdk
After the application is installed, launch it from your new desktop shortcut or Program Files menu.
The application will prompt you for your vCenter fully qualified domain name (FQDN):
It will then prompt for you vCenter credentials:
If you entered everything correctly the tool will open up the main page:
And down in your notification tray a little pop-up will list current vCenter sessions:
Couple quick UI things to get out of the way:
- To close the application, click the “X” in the main window.
- Minimizing will hide the form. You can bring it back or hide it with a left-click on the notification tray icon.
- If you right-click on the tray icon it will list the current users on the vCenter host.
- The “Change Credentials” button will allow you to switch username and password. And the ‘Change vCenter Server” will let you change the FQDN you entered.
I bet at this point you are thinking: “Well Nick, that is cool and dandy but I can get that info from my vSphere client! Way to reinvent the wheel…”
Well… now for the best part. This is the real reason I wrote this little app. It all started with my senior engineer, Justin. He had a nasty habit of yelling out “What are you doing?” every time someone did something on a vCenter server. That got me thinking; “It would be cool if something popped up telling Justin someone logged in. And it would be even cooler if you didn’t have to have the vSphere Client running to do it.”
So with the vSphere Session Manager, the instant someone logs into your vSphere vCenter, you see this:
Not super fancy but if you want to know when someone is playing in your pool (like Justin) this will let you know.
Here are couple features I was going to add but will (maybe) later:
- Storing of credentials (encrypted) – not too difficult, a little RSA key generation, mix in some environment specific salt, and dehydrate a class to XML.
- Allow multiple vCenter hosts – You can open multiple monitors to watch each vCenter for now
So that is a few hours of my life dedicated to seeing how easy it is to utilize the VMware vSphere Web SDK. And from a datacenter guy I can definitely say that the documentation, community (thanks @sjin2008), and SDK made this a pretty easy task. I highly recommend everyone take your cool tool ideas and try something out too.
Do me a favor and leave comments with feedback/questions. Thanks!









![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=7ad86b36-a207-4515-aa9a-432214eb836f)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=69f2c360-3a88-4a59-a094-e947905addcb)
Hello Hyper-V : Meet Reality (part deux)
He provided wonderful feedback and I have decided to highlight it here with my response. Not sure if I am breaking a blogosphere rule but, I shall claim etiquette ignorance and proceed.
Here are Ben’s comments:
First off, thanks for the comments Ben. I appreciate your providing clarity and participating in a discussion
I completely understand the predicament around legacy Windows versions. Because of the dual ownership, Microsoft does have to maintain standards around support.
But, I disagree that at a higher-level this is a problem. I see this as the difference between strategic and tactical viewpoints with hypervisors (great post on this from Steve Kaplan here).
Here is an example:
Let’s say we have a customer that has 20 legacy servers running Windows NT 4.0.
They don’t have the budget to purchase replacement software, the original application creator is gone (and they didn’t have the source in escrow), and it is completely incompatible with new OS server versions.
With Hyper-V not only will they not be able to P2V (physical to virtual migration) these servers. They also would get zero support from Microsoft for Hyper-V hosts that encounter issues with these VM‘s. There is a built-in out for the support person on the other end of the phone. This translates into an implementation impossibility and extreme operational risk.
With VMware vSphere, not only is the P2V actually supported (allowing abstraction of the OS) but the VM’s themselves are supported on the hypervisor. That means if there is a specific issue with hypervisor configuration VMware will support, fix, and help with making this successful. I know people that have not only successfully virtualized legacy operating systems but, have also done it with extremely proprietary configurations (@tscalzott).
The hypervisor is a layer and a toolkit meaning the intent is to provide abstraction as well as options for business needs. Hyper-V is missing these options which, because of the tactical approach MS has, make it more limited in application. My points is the missing options and not an effort to downplay the features it does possess.
Microsoft’s (and your focus) on integrated support is because of the tactical approach to the hypervisor. Hyper-V it is built on the same platform as the server product and blends layers rather than abstracts. Support can be integrated but, in an abstraction model that is done successfully (empirically proven with VI3 & vSphere) this is not a critical need. When layers are abstracted you break the dependencies that exist in blended/tactical models. Integrated support is a core marketable value in tightly coupled dependency situations like hypervisor to storage, networking, and server components. In fact, that is one of the primary reasons VMware tightly maintains and accelerates their hardware compatibility list (HCL). Where abstraction does not exist this is essential and with vSphere is assumed by the ESX host. With Hyper-V the HCL is much broader because it is based on the underlying server operating system. But that is because Microsoft has abstracted hardware using the operating system (Windows Server). Problem is, that means all you have done is create another dependency upon a relocated layer. In fact if you think about it, the operating system with Hyper-V is now a layer above and below the hypervsior. This is a completely different approach to virtualization.
I am not saying Hyper-V has taken the wrong approach, I am just trying to clarify the real value of each product and the completely different approach. Microsoft has invested interest in businesses moving operating systems to newer Server version from a revenue perspective. Their motivation is inherit in their approach and marketing as evidenced by both the blog & your comments. Why would Microsoft invest major effort in reducing their ability to consume operation system market share?
On the other hand VMware’s interest in providing a extremely stable hypervisor with a robust feature-set that will work for as many possible deployment models as possible. They are successful despite the operating system choices of their customers. Being a customer I can testify that VMware support is extremely helpful in supporting guest OS’s on their platforms. While they won’t make changes application configurations (not stated at least), they do posses a massive knowledge base of how to successfully virtualize their long list of possible options.
However, in forward looking design scenarios Hyper-V does stand differently against newer Windows Server versions. With an apples to apples design using Windows Server 2008 and beyond, the battle is more over the cost, operational capability, and long-term value than support or compatibility choices.
Hyper-V does not have options that compete against VMware in heterogeneous operating system space and once you cross that line and make statements against operating system approaches, you have broadened the argument beyond an apples to apples comparison.
I really do appreciate the feedback and feel free to hit me back.
.nick