3. No Programmers Allowed
I’m not a programmer
I do not speak in
Fortran or C++
The point of this
session is that its for
novices like me
www.virtualizeplanet.com 11/23/2012 3
4. A word from the sponsors
All apps mentioned in this presentation are not the
products of Canopy Cloud. Ricky developed these
apps before joining Canopy.
Canopy Private Cloud
Solutions Catalogue: Vertical &
Horizontal Workloads
Management & Orchestration
vCloud Director - vSphere
Canopy
Appstore
Canopy Cloud Infrastructure
Vblock - Best-of-Breed
www.virtualizeplanet.com 11/23/2012 4
5. My Apps
VPsnapper = where it all started
Resource Pool Scheduler
vDisk Waste Finder
vSphere Plug-in Wizard = Best Free Tools VMworld
2011
vDisk Informer
www.virtualizeplanet.com 11/23/2012 5
6. Different APIs
COM API
Web server API = SDK
PowerCLI
Etc etc
www.virtualizeplanet.com 11/23/2012 6
7. What you need before you begin
.Net IDE = Visual Studio .Net
or
Java IDE = Netbeans
www.virtualizeplanet.com 11/23/2012 7
8. So how did I do it?
VPsnapper
I needed a way to revert the default snapshots on all my VMs with one click
+ COM API Document
www.virtualizeplanet.com 11/23/2012 8
10. The SDK is the future
Resource Pool Scheduler
•Student gave me an idea. I needed to be able to shift resource allocation from pool
to pool
• Once again I used the book and the SDK programmers guide but failed at stage 1
• Stage 1 was to list all VMs running
• I posted my failure on VMTN = VMware Communities
• Few days later VMware sent me a fixed version of my test app.
• This was a huge springboard
www.virtualizeplanet.com 11/23/2012 10
11. Another Useful Book
Samples are in JAVA
However I found I could
easily copy from JAVA
to C# .NET
www.virtualizeplanet.com 11/23/2012 11
12. The SDK Tree
ExtensibleManagedObject
ManagedEntity
ResourcePool ComputeResource Hostsystem Datacenter Folder VirtualMachine
ClusterComputeResource
www.virtualizeplanet.com 11/23/2012 12
14. How to work with the SDK
Make a connection
Filter only what you need – Proprerty Spec
Which hierarchy objects to search - Traversal Spec
www.virtualizeplanet.com 11/23/2012 14
15. VIMAPI in .net
2 x Dlls – import in to your code
Using Statement:
www.virtualizeplanet.com 11/23/2012 15
16. MOREF Managed Object Reference
You do not manipulate the VMware objects like
VMs, Folders, Hosts and Datastores directly
You work with a representation of those objects
known as a Managed Object Reference aka MOREF
Its all about the MOREF!
www.virtualizeplanet.com 11/23/2012 16
17. Data model
Managed Object Types = objects that have
properties and methods
MOREF = local representation
Data Object = just pure data and no actions
www.virtualizeplanet.com 11/23/2012 17
18. vSphere Plug-in Wizard
Finalist in Best Free
vSphere Tools VMworld
2011
Plugs in Website of
your choice into
vSphere Client
www.virtualizeplanet.com 11/23/2012 18
29. My best tip as a novice
Take an existing example and hack it to death with
trial and error until you get it working for your
needs
If something doesn’t work post it on VMware's
Community forum
After today code for vDisk Waste Finder will be
available from my blog www.virtualizeplanet.com
www.virtualizeplanet.com 11/23/2012 29
30. Disclaimer:
Virtualize Planet will not be held liable for any actions you perform in
your environment. Anything you learn from this material should be used
at your own discretion and be warned actions you perform can be
damaging. Always consult a professional.
www.virtualizeplanet.com 11/23/2012 30
Editor's Notes
I hope you enjoyed this material and look out for my next one what ever that may be.