Last week I answered a question in VMware Web Services SDK forum about asterisks in vSphere API reference. Underneath these asterisks comes a note saying “May not be present.” What does it really mean?
The asterisks normally show up after properties or sub-properties defined with a managed object. As it says, it’s possible that there is NO value to the property.
How can it be like this?
There are two major causes. First, it reflects the different implementations of ESX, ESXi and vCenter. As a quick example, you can find many of the properties in the “content” (type: ServiceContent) come with asterisks.
On a vCenter server, you will find values to almost all the properties, but not quite so for ESX/ESXi. But we have one API reference document, so it’s natural to mark whatever possible no value as “may not present.”
Secondly, it may be as such depending on the state of a managed object. For instance, a virtual machine can be a bare machine without an OS installed. Therefore, the “guest” property of the virtual machine could have no value at all.
What does it mean to you? Read more...
With the gradual adoption of cloud computing, more companies are coming to the cloud service business. With so many new players in the game, how can you stand out in the competition as a service provider? In a marketplace already dominated by companies like Amazon, do you even have a chance?
Yes, you do! Differentiate.
I recently read a book, “Differentiate or Die: Survival in Our Era of Killer Competition” by Jack Trout and Steve Rivkin. Although it mainly talks about differentiation ideas in traditional businesses, it does offer good insights that can be applied in the cloud service business as well.
Before we get to cloud services, let us take a look at what Jack and Steve say about differentiation. They first discuss some commonly held misconceptions about differentiating ideas: Read more...
I am glad to learn that I have been recently named as top 50 bloggers on cloud computing by Cloud Computing Journal. Check out here for all my cloud related articles.
Thanks all for making this happen! The momentum will continue…
The “last mile” or “last kilometer” is a term in the networking industry describing “the close to end connectivity from a communication service provider to a customer”. Although your infrastructure like backbones is very powerful, your end user experience could suffer if your last mile is not there yet.
For cloud computing, we’ve talked a lot about the data centers, backend servers. What about the end users? Your cloud data center could be very powerful too, but does it mean your users will fully leverage that power? Not necessarily. It depends on how you deliver the service to them.
Because cloud service is delivered with traditional network, the traditional network “last mile” issue is there as well. You surely need a good, if not better, connection to the network.
Beyond the connectivity, you will need good interfaces for your users to interact with the cloud. Let me go over the “last inch” options here. Read more...
Following my prediction in a previous blog, Google just made the tools from its recently acquired Instantiations free to all developers/testers. Besides goodwills to the developer community, this move makes GWT a serious competitor to Adobe Flex, Microsoft Silverlight for Rich Internet Applications.
You can give these tools a try while developing and testing Web applications, or Java GUI applications: Read more...
- GWT Designer
“a powerful set of Eclipse-based development tools that enables Java developers to quickly create Ajax web applications using the Google Web Toolkit (GWT).”
VMware released the long-awaited vCloud API at VMworld 2010. The API is based on REST with 75 URLs defined in the user related part as you would find in the vCloud API Specification and vCloud API Programming Guide.
I am an OO guy (I am sure many of you are as well), and find it difficult to go through the 75 URLs and numerous XML tags as either input or return. These URLs are like trees in a forest. But where is the forest?
So I decided to create and show you a UML diagram (shown below) so that you can easily capture the key concepts of the vCloud API. In fact, there was a similar diagram in the programming guide of version 0.8. Read more...
Last week I discussed how to get event type with vSphere API, followed by a comment asking why there is no DatacenterRemovedEvent? Very good question and almost got me there.
vSphere API has a comprehensive object model for event. In version 4.1, we have 474 different types of events representing different things happened in vSphere. When a managed entity is removed, there are normally events associated, for example, VmDeployedEvent, HostRemovedEvent, ClusterDestroyedEvent, ResourcePoolDestroyedEvent, DatastoreDestroyedEvent, DatastoreRemovedOnHostEvent, etc. It’s natural to expect DatacenterRemovedEvent. But you don’t find one.
It’s not only Datacenter which does have DatacenterCreatedEvent and DatacenterRenamedEvent. For Folder type, you find nothing other than VmBeingClonedNoFolderEvent which is not related to lifecycle of Folder at all.
Why are these events missing? Read more...
Technology can be a lot like fashion, with quickly shifting trends. Once we embraced big iron but after the mainframe age the industry went into the client/server age where we soon found too many servers to manage. So we consolidated them, not back to mainframe age, but onto hypervisors. With one physical server, you can run multiple virtual machines.
Server consolidation solved a big problem and resulted in big cost savings. From management’s point of view, however, it does not actually reduce the number of servers to manage in your enterprise. To some extent, it worsens the problem! In some circumstances it’s so easy and inexpensive to create a new virtual machine that you end up with many more servers than you really want or can effectively manage. This problem not only exists in private clouds, but also in the public cloud.
According to VMware CEO Paul Maritz in his keynote at VMworld 2010, the number of virtual machines exceeded physical machines in 2009, and will reach 10 million by the end of this year. This is definitely great news for the virtualization software industry but also a challenge moving forward.
So how should you try to solve the problem of virtual machine sprawl or even better, prevent it from happening? I discuss some solutions one by one here. Read more...
vSphere has a powerful extension mechanism that allows you to add new features as integral part of the platform. Many vendors have already leveraged this by providing plug-ins so that users can manage their components seamlessly within same vSphere Client.
You can actually do more than that with the extension. The following sample shows how to create your own task and event with vSphere API. The code should be self explanatory therefore I don’t elaborate much here. Note that you must run the sample with a vCenter server as extensibility is implemented only in vCenter.
When running the code, you can see a new task created and progresses with 10% every second in the “Recent Tasks” pane of vSphere Client. When the task is done, you will also see a new event posted in the “Tasks & Events” tab of the host you associate the task with.
What can you do with this capability? Here are two typical use cases: Read more...
Since vSphere 2.5, there is a feature allowing you to capture screen shot of a running virtual machine. It’s not well publicized but you can find a short description with screenshotSupported (boolean) in the HostCapability data object. Thanks to Nikita for bringing this up in the comment of the vSphere Java API 2.1 GA post.
Indicates whether the screenshot retrival over https is supported for this host’s virtual machines. If true, a screenshot can be retrieved at the HTTPS relative path /screen?id=<managed object ID of virtual machine or snapshot>. If any of the optional parameters ‘top’, ‘left’, ‘bottom’, and ‘right’ is specified, the returned image will be cropped from the rectangle with upper left corner (left, top) and bottom right corner (right – 1, bottom – 1). These values default to the top, left, bottom and right edges of the image. The client must use an authenticated session with privilege VirtualMachine.Interact.ConsoleInteract on the requested virtual machine or, in the case of a snapshot, the virtual machine associated with that snapshot.
The managed object ID of virtual machine is the value of ManagedObjectReference, which can be easily found using MOB.
Once you have it, you can issue a URL as follows in any browser and get the screen shot in PNG format. Read more...
VMware vSphere API is defined by WSDL. As discussed in my previous blog REST or SOAP, Web Services is by nature procedural, and it does not support OO (object oriented). This contributes to the learning curve of vSphere Web Service API which is modeled with OO.
What if you want to find out what properties are supported by a particular managed object type in vSphere API? There was a specific question recently in blog comment: how to get valid/supported property paths like summary.hardware.numNics with HostSystem type.
Currently there is no systematically way to get this metadata which is not defined in WSDL. You have to manually read through vSphere API Reference.
Since vSphere Java API 1.0 (a.k.a. VI Java API by then), I have manually added a getter method for every property in the Java API. So the metadata is built in vSphere Java API from the beginning. Whenever there is a manual process, it could be error-prone. As much carefully as I liked, I made mistakes with properties ignored in vSphere Java API occasionally. These mistakes have been immediately patched up upon bug reports or self reviewing.
To get exactly what you want programmatically, you have to do something extra with Java reflection API. Let’s pick HostSystem as an example here. Read more...
Last week was a super busy week for all the people involved in VMworld 2010 in San Francisco. Because I spent two hours driving to Moscone Center and back home, I didn’t write any blog after getting back totally exhausted. Now it’s time to get back to it.
I believe there are many blogs/news on VMworld in general. Let me get down to a much narrow part: VMware Sponsored open source vSphere Java API at VMworld 2010.
Thanks to the community, my presentation on vSphere API Best Practice went very well. It’s based on the top 10 best practices blog (part 1, part 2) I wrote early this year, with real world experiences shared with partner engagements. Two copies of my book were given away at the end of the presentation. Thanks to Pablo Roesch for getting the books!
After the presentation, I was invited to check out new products built on top of vSphere Java API. I cannot disclose all of them here because some are not yet on the poweredby page. Here are several companies I can publicly talk about: Read more...