Virtual Machine, IP Address, and MAC Address: Frequently Confused Concepts

April 13th, 2010 22 comments

Having answered many questions about IP addresses of virtual machines at different occasions, I still see more are coming. I think it’s time to write a blog about it. Hopefully people would search the Internet before raising the question.

First of all, there is a big confusion on the relationship of IP addresses and virtual machines. Many people tend to associate IP addresses with virtual machines, and want to retrieve/change the IP address of a virtual machine.

In fact, a virtual machine is very much like its physical counterpart. It does not have an IP address by itself. In other words, an IP address is NOT an intrinsic attribute of a machine, either virtual or physical. It might have one or more only after an OS is installed. In most cases, it does have one or more IP addresses, which gives the impression that every machine has an IP address.

A virtual machine does have intrinsic attributes such as MAC addresses if NIC cards are configured. Unlike its physical counterpart, a virtual machine’s MAC address can be re-configured. Some software vendors rely on MAC addresses to lock down their licensed software on particular machines. This mechanism can be, therefore, compromised in virtual environments.

Will Service Providers Dominate? A Business Outlook of Cloud EcoSystem

April 12th, 2010 No comments

When talking about cloud computing, people normally refer it as services provided by service providers over the Internet. These services are normally, at least in theory, elastic and with no limits on resource usage.

To differentiate the levels of services, the cloud computing is categorized into three different types of services: IaaS (Infrastructure As A Service), PaaS(Platform As A Service), and SaaS(Software As A Service).

Why is it layered as such? Simple. These three layers correspond to the traditional computing stack: machine, OS/Middleware platform, application. In light of this mapping, shouldn’t we call SaaS as AaaS?  I think that’s a right change technically. But which service providers would like to be called AaaS?

When more people and more companies use cloud computing as services, we will see a rapid growth of service provider sector. In my previous blog, I made an analog between the cloud services and office rental business, and predict the growth pattern of cloud computing would be similar to the office rental. Size matters when it comes to the scale of economy. The bigger the enterprises, the more likely own their offices and their cloud datacenters.

Cloud Computing: As Service or As Architecture?

April 11th, 2010 2 comments

Last week I saw an incoming link at my blog site from privatecloud.com, a website promoting private cloud computing inside enterprises backed by EMC. Due to curiosity, I browsed the website and found a video by VMware CEO Paul Maritz on cloud computing. BTW, my website is also featured at the home page. Thanks privatecloud.com!

In the video, Paul talked about the cloud computing, mostly referring to services over the Internet, can also be an architecture pattern for enterprises. When that architecture is implemented, you will have a private cloud on premise. Although not using cloud services from any service provider, you still get almost all the benefits in a private cloud.

From the system architecture perspective, your applications built within a private cloud aren’t much different than those built using external cloud services. If both of the services follow the same interface spec, your application may switch between public cloud and private cloud either statically or dynamically.

Video on vSphere Java API Released at InfoQ

April 9th, 2010 2 comments

While searching Twitter on “vSphere Java”, I found my presentation available today online at InfoQ (many thanks to @arm1433 and @toya256ForRSS). It has both video and slides for more than one hour. The voice was not quite clear in the first one or two minutes. After that it’s pretty good.

This presenation is a complete overview of the open source vSphere Java API. Because the audience then was new to virtualization, the first several minutes covered a little virtualization basics. You can scroll over if you know virtualization already.

Categories: vSphere API Tags: ,

I18N vs. vSphere

April 8th, 2010 No comments

With today’s global market, a software vendor has to consider the internationalization (I18N) issue to better serve users in different areas and maximize the return on the product investment. This article introduces the I18N basics of vSphere. Much of the content is based on my book VMware VI and vSphere SDK by Prentice Hall.

There are two basic meanings. First, you have to design your software so that it is localizable. In other words, you have to use the right APIs that can handle double byte characters. Sometimes people call this globalization (G11N).

Second, you should provide localized versions of your software so that users can read and use their native languages. Sometimes people call this localization.

In most cases, you externalize all the text strings that are visible to end users from the code to the resource files and translate them into different languages. Then localizing the software is as easy as combining the code and localized resource files. This is the way VirtualCenter server is localized. Depending on the programming language and platform, the resource files can be organized differently and might have another format. For example, Java uses properties files, yet C++ on Windows uses resource dlls.

That said, I18N is a broad topic that does much more than what is briefly covered here. Further discussion is beyond the scope of this book, but you can find more detailed information online.

As discussed, the VI SDK is essentially a set of Web Services interfaces. The WS-I18N summarizes four internationalization patterns that can be applied with Web Services when deployed.

Categories: vSphere API Tags: , ,

How to Import and Export OVF Packages

April 7th, 2010 110 comments

This article is based on a similar one at vSphere Java API home page. At that time, one of VMware community members sent me an email for samples of using OvfManager APIs. Then I went to office on a Saturday writing two samples, which have been validated by several folks as “working” samples.

The purpose of the samples are to illustrate the vSphere APIs. Let’s take a look at them one by one.

First, ExportOvfToLocal.java. This sample shows how to download either a VM or vApp to your local machine. The typical flow is:

  • Find the VM or vApp
  • Call their exportVm() or exportVApp() methods and get HttpNfcLease
  • Set lease time out
  • Wait for HttpNfcLease until it’s ready
  • From the HttpNfcLease.info property, find the all URLs from which you download the vmdk files
  • Call OvfManager.createDescriptor() API to create the content of ovf and save it to a file along with downloaded vmdk files.
  • Release the lease by calling httpNfcLeaseComplete() method
Categories: vSphere API Tags: ,

OVF vs. VMDK

April 6th, 2010 2 comments

OVF stands for Open Virtualization Format, a platform independent, extensible packaging and distribution format for virtual machines. It’s now a DMTF standard.

VMDK stands for Virtual Machine Disk, a format that encodes a single virtual disk for a virtual machine. It’s proprietary by VMware but whose format is publicly documented by the company. You can use VDDK to manipulate the VMDKs.

Categories: Virtualization Tags: , ,

Cloud Computing: How Much Can It Change IT?

April 5th, 2010 3 comments

There have been many debates on the potentials of cloud computing and how it can change the IT. Some say it’s the future of IT and everyone and every enterprise will have to go with it; others say it’s a hype and just another name for already vanished on-demand computing, utility computing.

So which will be the trend? Or should we take a middle ground between these two?

While predicting the future, we tend to look back and try to leverage historical data. I bet you have seen many such analysis that draw different conclusions. History can be interpreted differently.

In this article, I would like to take a different approach — make an analogy between cloud computing and office rental business, and then predict the future of cloud computing from what’s today in office rental business.

Technology wise, cloud computing and office rental are two totally different things. Business wise, they are actually very similar. Whatever benefits of cloud computing can be found in office rental, for example, no initial capital investment in building either office or data center.

Although new technology companies get started and make impact on many things, the fundamentals of business haven’t changed. You still use the same balance sheets to evaluate high tech companies just like the blue chip companies. When making decisions, companies base more on business than on technology. That’s why I can make a safe analogy here.

Categories: Cloud Computing Tags:

Slides From The Cloud Club March Meetup

April 2nd, 2010 No comments

Almost forget to report last Cloud Club meet-up which took place at Santa Clara Convention Center on the night of March 16. The meet-up was conveniently co-located with the CloudConnect 2010 Conference.

We had several great speakers from companies like Makara, Engine Yard, Heroku, Appirio, etc. As you can guess from the speakers’ company profiles, the theme of the meet-up was about PaaS. Each speaker had about 20 minutes to introduce their technologies.

Winners of the VMware Script-O-Mania Contest: Who, What, How and Why?

April 1st, 2010 No comments

The winners of the VMware Script-O-Mania contest was announced today by Pablo Roesch at VMware Developer Blog. Congratulations to Alan, William and Arnim who won the first three awards!

I just took some time to read these scripts even though PowerShell and Perl are not for me. Here I give you a brief introduction of the scripts, what vSphere APIs they used directly or indirectly, and why they topped the contest. Because vSphere API is based on Web Services, you can port the scripts to other languages like Java, .Net, whatever you feel comfortable with. If you want to port any of them using vSphere Java API, I am more than happy to include your contribution.

Note that the following comments are strictly my own opinions.

1. Who Created that VM ? – by Alan Renouf using PowerCLI

A script to add information back into the vSphere client, this script which is designed to run once a day (or more) as a scheduled task, will add a custom attribute to each VM with the creator and date created of that VM. A script to add information back into the vSphere client, this script which is designed to run once a day (or more) as a scheduled task, will add a custom attribute to each VM with the creator and date created of that VM.

Steve’s Comments:

Nice integration with the vSphere Client, making you almost doubt why it wasn’t there in the first place. Additional one liner scripts provide nice answers to the questions like who created the most VMs, how many VMs were created each month.

Introducing Security Model of VMware vSphere

April 1st, 2010 2 comments

This article introduces you the basic model and terminologies in vSphere security management, for example, privileges, permissions, roles, and how they are related to each other to secure vSphere. It helps you to better manage the vSphere and program the vSphere API. Much of the content is based on my book VMware VI and vSphere SDK by Prentice Hall.

In vSphere, the security model consists of three types of components: privileges, roles, and permissions.

Privileges

A privilege is the basic individual right required to perform an operation. It is statically defined and never changes in a single version of a product. Given the many operations in VI, there are many privileges (for example, the privilege to “power on a virtual machine”). These privileges are represented as strings separated by dots, such as VirtualMachine.Interact.PowerOn.

The operations and privileges are not one-to-one mapping. Many operations do share common privileges like System.View. Therefore, there are many fewer privileges defined than methods. In some exceptional cases, a method requires different privileges depending on the target it operates on and the nature of the operation. The CloneVM_Task() method, for example, requires VirtualMachine.Provisioning.Clone for cloning from one virtual machine to another, VirtualMachine.Provisioning.DeployTemplate for cloning from a template to a virtual machine, and so on.

Roles

The role groups privileges from a user’s perspective. A role is normally named and defined for a group of people who have common responsibilities in the system (for example, administrators). Each role can include zero to multiple privileges. The extreme cases are the predefined “Admin” roles, which by default, includes all the privileges and the NoAccess role, which includes no privileges.

Categories: vSphere API Tags: ,

Fundamentals of vSphere Performance Management

March 31st, 2010 9 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 4 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 6 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: ,