Archive

Archive for March, 2010

Fundamentals of vSphere Performance Management

March 31st, 2010 3 comments

Performance monitoring is a critical aspect of vSphere administration. This article introduces you the basic concepts and terminologies in vSphere performance management, for example, performance counters, performance metrics, real time vs historical statistics, etc. Much of the content is based on my book VMware VI and vSphere SDK by Prentice Hall.

Once you understand these basics, the related tools and APIs should be relatively easy. If you are already familiar with vSphere Client performance monitoring or esxtop, they help as well.

Performance Counter

A performance counter is a unit of information that can be collected about a managed entity. PerfCounterInfo data object, shown in Figure 1, represents a performance counter. The property key is an integer that uniquely identifies a performance counter, like a primary key of a table in SQL database, and nothing more. There is no guarantee for a performance counter to have a fixed number. In fact, the same performance counter can have different values in ESX and VirtualCenter. Even for the same type of server, the number could change from version to version. Do not use it outside the context of the server you connect to.

Figure 1 PerfCounterInfo data object

The performance counter can be represented by the following dotted string notation:

3 Ways to Get Hold of Managed Objects in vSphere

March 30th, 2010 No comments

If you have ever used vSphere Web Service API, you must have known that there is no managed object but ManagedObjectReference object. Understanding it helps deepen your understanding of the vSphere API.

Honestly, the ManagedObjectReference is a little confusing by itself. It is in fact a data object but represents a managed object. You can think of a MOR as a pointer in some sense because it’s used to uniquely identify a managed object. Even better, you can think of the “type” and “value” defined in the MOR in the SQL way. The type is like a table name, and the value like the primary key which can uniquely identify a managed object in its type.

MOR is really intended to be used by program and should be carefully limited to the scope of where it comes from. That is why it’s hidden from application developers in vSphere Java API.

Anyway, let’s see how to get hold of MOR objects:

Categories: vSphere API Tags: ,

vSphere Inventory Structure Deep Dive

March 29th, 2010 2 comments

This blog digs into the vSphere inventory structure, and changes in vSphere 4 from VI. It explains the difference between ESX and vCenter inventory tree, why the inventory path you see from vSphere Client doesn’t work with API. Much of the content is adapted from my book VMware VI and vSphere SDK by Prentice Hall.

Inventory vs. Inheritance hierarchy

My previous blog introduced the object model of the vSphere API. The UML diagram there shows how different managed object types are structured in the inheritance hierarchy.

The inventory hierarchy is quite different. It shows how different managed object instances are associated. With this understood, you can easily navigate among different managed objects in inventory tree of both ESX and vCenter. It’s critical for programming vSphere API because navigating the inventory is the primary way to get hold of managed objects.

Categories: vSphere API Tags: ,

My Posts at VMware vCloud Blog

March 26th, 2010 No comments

I posted my first blog at VMware vCloud blog site, the company’s official blog on cloud computing, last month. It’s about the high level comparison between vCloud API and Amazon EC2 API: what is common and what is different?

http://blogs.vmware.com/vcloud/2010/02/a-quick-comparison-of-vmware-vcloud-and-amazon-ec2-apis.html

Yesterday I posted my second blog there about moving virtual machines back from the service providers’ cloud to the enterprise. It’s not as easy as we expect today. We need one click sending VMs to and from the public cloud.

VMWorld 2010: Call for Papers and Pre-registration

March 25th, 2010 No comments

The world’s largest conference in virtualization industry VMWorld  is coming. It will take place in San Francisco August 30 to September 2, and in Copenhagen October 12 -14. There will be about 170 unique sessions in the US and 130 unique sessions in EMEA; this includes sessions from VMware employees, customers, sponsors, virtualization vendors and industry specialists.

Categories: News & Events Tags:

Two Opposite Trends in Java Programming: Which Should You Go With?

March 24th, 2010 2 comments

Java is a static typing language, meaning you have to define a type before you can use it and the compiler checks the types for you. Some people like the static typing and others don’t. People like it would like even more into the language. Some others would prefer less typing. The rest don’t have strong opinions and are OK with both.

In the last several years, we actually see two opposite trends in Java programming: stronger typing and weaker typing. This blog analyzes in depth why these two trends happened and what do they mean for you. 

Demystifying 3 “View”s from VMware

March 23rd, 2010 4 comments

After I blogged the top 5 myths of vSphere API, William Lam suggested me to write a bit more on the views in his comments. If you haven’t followed him (@lamw) at Twitter yet, you may want to. His vGhetto Perl repository is one of the best resources for people who use VI Perl.

For sure, VMware loves the term “view”. As far as I know, there are 3 different ”views.” Two of them are for APIs; the last one is for the desktop product family. We are not going to talk about the product View in this blog. You can find more information at VMware web site.

Let’s instead focus on the two “Views” for developers: one is in VI Perl and .NET/PowerCLI; the other is part of the core vSphere API.

Categories: vSphere API Tags: , , , ,

Top 10 Best Practices Architecting Applications for VMware Cloud (part 4)

March 22nd, 2010 No comments

This 4th and last part contains best practice No.7 ~ 10. To be notified for future posts, feel free to subscribe to this feed, and follow me at Twitter.

#7 Levarage vApp

vApp is a new addition to vSphere. It’s essentially a group of VMs that work together as a solution. You can manage them as a basic unit like a VM. It provides you higher level granularity for resource allocation and management.

This is an ideal container for your application if you have multiple virtual machines involved. They may or may not form a cluster, but are bundled together for a same goal.

The vApps are not only easily managed by the vSphere, but also imported and export as a bundle. Therefore you can easily move it without worrying what should be included while copying it.

VMware provides tools like VMware Studio using which you can create and configure vApps easily. The VMware Studio has Web based console, customization and build engine, build process automation with CLI (command line interface).

Other alternatives include:

Hardware Designers vs. Software Designers

March 21st, 2010 2 comments

Just read part of the book Founders At Work over the weekend. Although I haven’t decided to be a founder of a startup company, I found the stories there are trully inspirational. You can read part of the book at Google book.

One interview with Hotmail cofounder Sabeer Bahatia is very interesting with his thoughts on the differences of software and hardware designers:

Categories: Software Development Tags: ,

Top 10 Best Practices Architecting Applications for VMware Cloud (part 3)

March 19th, 2010 No comments

This 3rd part contains best practice No.4 ~ 6. To be notified for the rest, feel free to subscribe to this feed, and follow me at Twitter.

#4 Scale Applications as Needed

Most time, people think scalability is to handle more workload when needed. This is true, but not enough. A truly scalable system should scale back. This is how you will save money. This is equally important as the first case where you get more revenue by serving more traffic.

There are different ways to scale:

  • Up and down. This is unique in virtualized environment in which you adjust the memory or CPU allocation and use more or less of them instantly.
  • Out & in. This means you include more machines either physical or virtual into your application.

You have to think over several architecture decision points: