UUID vs. vSphere

August 12th, 2010 4 comments

UUID stands for universally unique identifier (UUID). It’s a 128-bit value. vSphere uses it as IDs for many different types of entities like HostSystem, VirtualMachine, Datastore, etc.

The UUID surfaces to the vSphere API as well. You can find many methods use UUID as parameter or return result. The most commonly used one is the SearchIndex.findByUuid() which find you a virtual machine or a host based on its UUID, either instance or BIOS UUID. The format used for UUID is as follows:

52dc2e26-dbc4-7d05-5fed-019d234379d9

Since 4.0, DistributedVirtualSwitchManager managed object is added and it has a method called queryDvsByUuid(). As reported by VI Java API community, the standard format doesn’t work. The accepted format is like this:

Why Hyperic Chose VI Java API for vSphere Integration?

August 11th, 2010 No comments

VMware SpringSource released Hyperic 4.4 last week. According to Charles Lee, co-founder of Hyperic, one key feature is “enhanced management of VMware virtualized environments through integration with VMware vCenter.” I am glad vSphere(VI) Java API (a.k.a. vijava) has contributed to the success of the product.

Here is part of Charles’s blog Hyperic Broadens vSphere Support through vCenter APIs in Version 4.4 explaining the rationale behind the choice:

How to Promote a Virtual Machine’s Disks?

August 10th, 2010 No comments

What does a promotion mean for a virtual machine’s disks? When you get a promotion, you may have more salary, a better title, bigger office space, etc. For sure a virtual disk cannot earn salary and doesn’t care about title, but it can occupy bigger space in datastore.

In my previous blog, I discussed how to create linked virtual machines using vSphere API. These linked virtual machines share a common disk as base, therefore the total disk consumption is significantly reduced. When a virtual disk is promoted, it gets its own “office” other than sharing it with others.

The vSphere API to promote virtual disks is promoteDisks_Task defined with VirtualMachine type. It has a tricky parameter called “unlink” (type: boolean) . According to the API reference:

1. If the unlink parameter is true, any disk backing which is shared shared by multiple virtual machines is copied so that this virtual machine has its own unshared version. Copied files always end up in the virtual machine’s home directory.

2. Any disk backing which is not shared between multiple virtual machines and is not associated with a snapshot is consolidated with its child backing.

Now when should you use true or false? “If the unlink parameter is true, the net effect of this operation is improved read performance, at the cost of disk space. If the unlink parameter is false the net effect is improved read performance at the cost of inhibiting future sharing.”

Here is the sample code that illustrates the usage of the API:

Vertically Complete Systems: Next Big Trend?

August 9th, 2010 2 comments

IBM recently announced its re-organization around its software and hardware business units. The previously separate business units were merged together as one – the Systems and Software Group led by the former software chief Steve Mills.

You may recall that IBM did not have a dedicated software group until Lou Gerstner created one 15 years ago to centralize all the software businesses into one business unit. This unit has been IBM’s most profitable business. Before that, IBM offered all the software as add-ons to the systems like 390 and AS/400.

Now can we expect IBM to offer hardware systems as add-ons to their software solutions?

Although companies constantly re-organize to streamline their business execution, this reorganization did indicate a big trend is happening in the IT industry. Computer vendors are striving to own vertically-complete stacks: from hardware all the way up to business applications.

A Big Cloud Challenge: Cross Stack Portability

August 4th, 2010 No comments

When you think of portability in cloud computing, you think of how to move applications code, data, and workloads. These are mostly horizontal movements within the same level of software stacks – from one IaaS to another, and from one PaaS to another.

There is a more interesting and potentially very important movement that I would describe as “cross stack” portability. Today we don’t see cross stack portability unless we re-write the application, which is not what I cover here (although it could be a good business opportunity for companies to explore). Rather, I am talking about how to move your application built on PaaS to an IaaS vendor or even to a private cloud. The reason I call it cross stack is because the application is moved up or down to a different level in the software stack.

In this blog, I’ll focus on portability without code change. I’ll discuss three conversions: from PaaS to IaaS, SaaS to IaaS, and IaaS to PaaS. Mathematically we can have other forms of conversions – say from IaaS to SaaS – but those examples are either not that interesting or not that practical. So I won’t cover them here.

From PaaS to IaaS

Who Created That VM: Java Version of the Winning Script of VMware Contest

August 3rd, 2010 2 comments

As you recall from my previous blog on the Script-O-Mania contest, Alan Renouf won the first prize with his Who Created That VM script written in PowerCLI. The script leverages implicitly several vSphere APIs, so I think it would be cool to have a Java version. At least we can illustrate how to use these related vSphere APIs.

The following is a sample I rewote using VI Java API for the same purpose except that Alan’s script shows full display name of a user while this Java version shows user name (see the following diagram). Although longer, the Java version can run on any OS, not just Windows.

Categories: vSphere API Tags: ,

How to Create Linked Virtual Machines with vSphere API?

August 2nd, 2010 15 comments

More often than not, you may have several virtual machines based on same software stacks running on the same host. Although they are very much the same, they take as much space as multitude of what one virtual machine takes.

Since vSphere 4.0, things are different. You can significantly reduce the storage usage by a new feature called linked virtual machines. The idea is simple: sharing a common virtual disk among the similar virtual machines. The shared virtual disk serves as a base. On top of that, each virtual machine has its own delta disk. When a guest operating system writes to disk, the data persists to the delta disk. When it reads from disk, the delta disk is checked first before trying the base disk.

As a result, you only need to save one copy of the base disk no matter how many virtual machines you have (up to 8 virtual machines in a linked virtual machine group). One limitation is that you cannot use it with HA cluster.

How to create linked virtual machines? You have two approaches: clone a virtual machine either from a snapshot, or from its current running state.

VMware Technology Exchange for Developers at VMworld 2010

July 28th, 2010 No comments

VMware TechExchange will take place in San Francisco in the same location of VMworld 2010 from August 30 to September 1st. If you want to learn VMware technologies especially APIs/SDKs including Spring framework, Zimbra, and etc., you should join us. I will present best practices on using VMware vSphere APIs. Hopefully we will GA the vSphere(VI) Java API 2.1 by then.

To convince your boss, please read the blog Pablo just wrote:

  1. vSphere 4.1 APIs has some significant improvements, specifically around the Property Collector and AD authentication. We will have sessions to update you on what has changed, provide best practices when using them and hear from our engineers who have hands on experience working with our APIs.  See our latest sessions added
Categories: News & Events Tags: , ,

What’s Deprecated in vSphere 4.1 API?

July 27th, 2010 No comments

In vSphere 4.1, several properties and types have been deprecated. The following table from vSphere Web Services SDK 4.1 release note lists each deprecated API element and its replacement.

Name of deprecated type, method, or property As of vSphere API 4.1, use instead…
Methods
PropertyCollector.CheckForUpdates PropertyCollector.WaitForUpdatesEx
PropertyCollector.RetrieveProperties PropertyCollector.RetrievePropertiesEx
PropertyCollector.WaitForUpdates PropertyCollector.WaitForUpdatesEx
VirtualMachine.AcquireMksTicket VirtualMachine.AcquireTicket
Data Objects
VirtualMachineMksTicket VirtualMachineTicket
Data Object Properties
Categories: vSphere API Tags: ,

Cloud Architecture Design: Should it be Top-Down or Bottom-Up?

July 26th, 2010 2 comments

In my last blog, I discussed how to optimize workloads across the cloud. This is based on the assumption that you already have an existing infrastructure. What if you don’t have an existing cloud infrastructure but would like to design one from scratch? Here is what you should be thinking about to get the most from your new cloud.

But first let’s take a look at other types of infrastructures – say a road. When you design a new road, you have to collect data such as population densities around the area, people’s working schedules, what types of vehicles will run on the road, and so on. With that information, you can decide how many lanes you want, what kind of road surface is required, and so on. You don’t just make up the design specification from scratch, and lay down an eight-lane freeway everywhere.

The same process applies in designing the cloud infrastructure as well. Unfortunately this is not what we see often today.

Top-down approach

In my previous blog , I said infrastructure is a means and application is the end. We need to drive the design cloud architecture from the application perspective. This is what I call the top-down approach.

Workload Optimization: Is It a Must-have for Cloud Computing?

July 21st, 2010 1 comment

Cloud computing hasn’t changed the nature of computing – it just changed provisioning and management. That’s important to remember because workloads in the cloud are very much similar to what we see in traditional computing infrastructures. To get the most out of your investment in cloud services or in your own physical IT infrastructure, you need to understand how to optimize workloads.

Workload Categorization

Typical computing workloads involve four basic parts: computation, memory, networking, and storage. Almost all applications have these four parts but mostly not balanced.

Now let’s quickly review the essential categories of application workloads:

Complete List of Managed Object Types in VMware vSphere API

July 19th, 2010 No comments

The following tables list all the managed object types in VI 3.5, vSphere 4 and 4.1. A short description is provided for each type explaining its major responsibilities.

Note that the managed object types are added in an incremental way. The types in older versions are still supported in newer versions. The complete types in a verion include ones in the correpsonding table plus all the ones in all older version tables.

Hope this post gives you a high level overview of functionalities of the vSphere APIs. Check out other blogs such as best practices (1-5, 6-10) on how to use them in general. And don’t forget my book which introduces them extensively with many read to use samples.

Table 1 Managed Object Types in VI 3.5

Released: vSphere Java API 2.1 Beta for vSphere 4.1

July 16th, 2010 16 comments

Following the vSphere 4.1 release, I am pleased to announce the release of the vSphere(VI) Java API 2.1 beta that fully supports the vSphere 4.1. The 2.1 beta has been ready for limited access for months by VMware internal teams, and partners/customers who participated vSphere 4.1 beta program.

Categories: vSphere API Tags:

What’s New in vSphere 4.1 API?

July 15th, 2010 No comments

VMware announced GA of vSphere 4.1 product this Tuesday. Here is the official what’s new in vSphere 4.1. Many bloggers already covered different aspects of the product itself: VMware vSphere 4.1: Advancing the Platform for Cloud ComputingUseful vSphere 4.1 knowledgebase articlesvSphere 4.1 releasedRelease: VMware vSphere 4.1, etc. I don’t repeat these here, but focus on the new APIs in 4.1 release.

In general, the APIs are the programatic “view” of features. Understanding the features helps a lot on understanding the APIs. So I strongly encourage you to read new features of the product itself. Note that not all the new features especially the performance and scalability features are explicitly reflected in API signatures.

vSphere API 4.1 introduces 7 new managed object types:

vSphere 4.1 adds 23 new methods to 10 existing managed object types:

Categories: vSphere API Tags: ,

When to Use Cloud? Example Use Cases

July 9th, 2010 5 comments

In my last post, I discussed when not to use cloud services. Basically you should avoid the cloud for your organization’s core competency IT systems.  Remember, cloud computing is not a silver bullet for everything.

Today I want to share the stories from the other side: when you should use cloud services. As a rule of thumb, you use cloud services for your non-core competency IT systems. But, what are the typical non-core competency systems?

There could be many cases in which you can use cloud services. Let me go through some of them by sharing customer experiences:

Outsourcing projects. If something is outsourced, most likely you don’t think it’s a core competency to your business. You can then leverage the full benefit that public cloud services bring to you. You can easily have workspace that is accessible by both your employees and contractors, and it’s more secure than opening up your own infrastructure to your contractors.

When NOT to Use Cloud?

July 7th, 2010 3 comments

During the July 4th long weekend, I got the chance to read the book “Delivering Happiness” by Tony Hsieh. It’s a great book with many great ideas and lessons he learned from LinkExchange and Zappos.

So, how does this relate to cloud computing?

Here’s what Tony wrote…

“It was a valuable lesson. We learned that we should never outsource our core competency. As an e-commerce company, we should have considered warehousing to be our core competency from the beginning. Outsourcing that to a third party and trusting that they would care about our customers as much as we would was one of our biggest mistakes. If we hadn’t reacted quickly, it would have eventually destroyed Zappos.”

In this paragraph Tony summarized the lesson from contracting eLogistics for inventory services in Kentucky, which turned out to be a mess and almost killed Zappos when cash flow became a big issue.

From a business perspective, cloud services are not much different from the inventory services. Both are all about outsourcing. The high tech nature of cloud doesn’t change the business nature of cloud services. What happened to Zappos could potentially happen to any cloud customers.

VMware Wants to Hear from You about vShere Java API

July 2nd, 2010 No comments

VMware launches an official survey on the open source vSphere(VI) Java API. Please let the company know your take on the open source project, and what you want, for example, formal developer support, etc.

The survey includes 16 simple questions and should take no more than 3 minutes to finish. All the collected information is confidential.

Note that the survey result decides what to come next. Please make sure your voice heard by taking the survey here.

Categories: vSphere API Tags:

System Provisioning in Cloud Computing: From Theory to Tooling (part 2)

July 1st, 2010 No comments

Application Provisioning

With the right system configuration in place, it’s time to install the applications. So why not use the same tools we used for the OS and middleware? Do we need yet another set of tools?”

It depends. You can use the same set of tools for middleware to install some applications. The middleware appears like an application to the OS as well. The difference is whether your application is stable enough and whether you need to customize per node. The tools like Puppet can be good for stable applications that can be deployed the same way across all nodes. If your application is still a work in progress and you need flexibility to tweak it, you need more specialized application provisioning tools.

The big technical difference between application and middleware provisioning tools is that application tools push the application to the nodes and remotely change anything as needed. The process is procedural.

The middleware provisioning tools normally have agents on the nodes to pull the software based on the prescribed configuration files. The process is declarative.

Beyond the “push” and “pull” difference, the application provisioning tools can also manage the lifecycles of applications (sometimes called services) distributed on different nodes with a single line of command or code. Given the nature of remote command dispatching framework, the application provisioning tool can do almost anything. If there has to be a limitation, it’s your imagination.

So if you develop applications by yourself, you most likely need application provisioning tools.

Let’s see what tools are there.

System Provisioning in Cloud Computing: From Theory to Tooling (part 1)

June 30th, 2010 No comments

Cloud computing is an evolutionary technology because it doesn’t change the computing stack at all. It simply distributes the stacks between the service providers and the users. In some sense, it is not as impactful as virtualization technology which introduced a new hypervisor layer in the computing stack and fundamentally changed people’s perception about computing with virtual machines.

But if you look closely at the latest IaaS clouds, they do leverage virtualization as a way to effectively and efficiently deploy systems. Inside one virtual machine, the computing stacks remain the same as before: from OS to middleware to application.

Keep in mind that the application is the end while the OS and middleware are the means. Customers care about applications more than the underlying infrastructure. As long as the infrastructure can support the applications, whatever the infrastructure might be is fine technically. Then the question would shift to the economic side: whatever is the most cost effective wins in infrastructure. That’s why Linux gains more shares in the cloud than in traditional IT shops.

To get to the end, you have to take a mean. In the IaaS cloud, you have to install the underlying OS and middleware before you can run your application. For the PaaS cloud, you can get away from that by focusing on application provisioning.

OS Provisioning

Remember, the software stack inside a virtual machine doesn’t change. It needs OS, middleware and application installed and configured before the application can work.

vSphere Java API 2.1 Beta Is Ready For Limited Access

June 28th, 2010 No comments

I have finished vSphere(VI) Java API 2.1 beta last week. The major feature is to support next version of vSphere. The company legal also approved the contribution to the open source project after product release.

Because VMware hasn’t released the next version of product yet, I cannot release the code to general public for the moment. API and product are much like the view and model in MVC: from the new APIs you can guess what new features are in the coming product.

Categories: vSphere API Tags: ,