Archive

Posts Tagged ‘vmware’

How to Avoid Virtual Machine Sprawl in Cloud Age?

September 13th, 2010 2 comments

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.

How to Get Event Type with vSphere API?

August 19th, 2010 12 comments

There is a recent question asking how to get the type of event from vSphere API in my previous blog. On one hand, you can clearly see the types of events on a vSphere Client, for instance “info”, “warning”, “error”, and “user.” On the other hand, you cannot find any information about the type from a given event itself using vSphere API.

Strictly speaking an event just indicates something has happened. That is it. You can categorize it differently depending on your goal. The Event type itself in vSphere API models an event as what it is, not about how you look at it. This is a right design philosophy, but turns out to be a little tricky for you to figure out the type of an event.

How does vSphere Client do the trick?

Categories: vSphere API Tags: , ,

Manage Lockdown Mode with New API in vSphere 4.1

August 17th, 2010 No comments

As a feature, lockdown mode has been added to vSphere 4.0 . Enabling it disables all remote root access to an ESXi machine. Any local changes to the host must be using:

  • DCUI (Direct Console User Interface).
  • vSphere Client or vCLI connecting to vCenter.
  • vSphere Client or vCLI connecting to ESXi with a local user account on the host.

My colleague Duncan Epping has summarized a table showing whether you can change ESXi with different access methods in two modes.

As a general practice for better security, it’s recommended to enable lockdown mode. However the lockdown mode could be breached by adding root user to local groups,

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 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: ,

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

Continuous Deployment With Virtualization and Cloud: An Idea for Startups

May 28th, 2010 2 comments

If you have a new hire, do you want him/her to push code into production system on the very first day? You may be OK with this sometimes. What if it’s a trading system with real money involved? More often than not, you come up with a different answer.

On Wednesday night, I attended a seminar organized by SDForum SAM SIG at LinkedIn headquarter. Pascal-Louis Perez and David Fortunato from Kaching.com engineering team gave a great talk on how they streamlined their software development process to the extent that they normally release 20 times a day to their production system. It’s quite a safe process that it’s OK for a new hire to push code on day one.

VMware vSphere PowerCLI Alternative on Linux?

May 17th, 2010 3 comments

After creating a light virtual appliance last year, Timo Sugliani continued with a full fledged version of virtual appliance with all you need for vSphere development with Java and Jython. This is what Timo called “my linux powershell toolkit.” The biggest advantage is that you are no longer limited by Windows as your development platform.

Top Ten Things a CIO Should Know About VMware vCloud

May 7th, 2010 1 comment

Since the term “vCloud” was made public at VMworld 2008 in Las Vegas, VMware has been working hard to define and implement its vCloud vision and strategies.

In 2009, VMware announced vCloudExpress with service provider partners such as Terremark. VMware also submitted its vCloud API spec to DMTF so that the industry could benefit from the standardized management of APIs. VMware also acquired SpringSource in 2009. The acquisition attracted a lot of attention, scrutiny and questions.

Earlier this year VMware acquired Zimbra, the leading provider of SaaS collaboration software, and subsequently it also bought RabbitMQ. Both are now part of the VMware SpringSource portfolio. Last week, VMware and Saleforce.com announced vmforce.com which is a joint venture targeting enterprise PaaS cloud. Yesterday VMware announced acquisition of GemStone (pending).

With these acquisitions and announcements, the company’s strategy is clearer than ever. Looking back again, VMware has been building a cloud product and service portfolio under the vCloud umbrella. Some previously misunderstood acquisitions become well aligned in the vision and strategies of vCloud.

vCloud is not the only player in the industry but VMware is well on its way. Given its deep roots in enterprise data center virtualization, no one can ignore the potential of VMware in cloud computing.

To help enterprises better understand vCloud, I offer ten things you should know:

Synchronous versus Asynchronous Calls in vSphere API

April 22nd, 2010 No comments

In a previous article Top 10 Best Practices Using VMware VI and vSphere SDK, I mentioned synchronous versus asynchronous calls in the second best practice “Choose Right APIs.” But no detail was provided there. In this article, which is based on my book VMware VI and vSphere SDK , I discuss all the details.

Some methods defined on managed objects in vSphere API are asynchronous, meaning they return right away whether the operations are done successfully or not. That makes sense for long-running operations; you don’t want to block your current thread by waiting for the return of the call, and you might want to cancel it before it’s done.

For these asynchronous methods, the VI SDK provides a way to track the progress and results after the invocation is returned. As a naming convention, a long-running asynchronous method has _Task as a suffix in the method name, and it returns MOR to a Task. With MOR pointing to the Task object, you can track the progress and even get the result of the operation. For example, the cloneVM_Task() method defined in VirtualMachine is a long-running method that returns MOR pointing to a Task managed object.

Categories: vSphere API Tags: ,

Tutorial: Easy VMware Development with VI Java API and Groovy

April 20th, 2010 5 comments

Every time I google for VI(vSphere) Java API, I get something new. Here is yet another one I just found. It’s a blog article Easy VMware Development with VI Java API and Groovy by Aaron Sweemer. By reading his blog site, I came to know Aaron is actually my colleague at VMware working as a Sr. System Engineer in Cincinnati Ohio. He is the principal blogger at Virtual Insanity.

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.

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.

VMwareExpress Truck: First Hand Experience

March 8th, 2010 No comments

VMwareExpress truck came to VMware headquarter before noon today, parking between the gym and office buildings. I went to check it out this afternoon, also enjoyed ice cream in front of the truck.

The following is a picture of the truck. I could use others, but think this one is better because it has the cloud as background. :-)

Categories: News & Events Tags:

VMware PEX 2010 – Day Four

February 11th, 2010 No comments

After my presentation yesterday, I had more time on the break-out sessions and self paced lab today.

Accelerate Your Services With VMware Services Automation Tools

This session is by Budianto Bong, VMware Sr. Product Manager. He demoed three tools from VMware PSO that help consulting partners: Migration Manager, Desktop Reference Architecture Workload Simulator, and HealthAnalyzer. The first one is not the P2V converter, but a management tool that tracks, manages, and reports large scale migration projects.

Using the VMware vSphere PowerCLI for Automated Installation And Configuration of ESXi and vCenter for ISV Partners

This is a joint presentation by VMware TAM Ken Brady, and CareFusion network engineer Fisk Shogren. Ken introduced the basics of PowerCLI and VMware TAP programs. Fish showed off his PowerShell code that is used to set up the environment, which took 2 days, if lucky, of manual work before. It’s a great example on how much you can get by automating vSphere API, particularly with PowerCLI. I handed over my business card so that Fisk can show more of his code later.

Getting Stoned With “Project Onyx

Can You Express Your Love With VMware For Valentine’s Day?

February 7th, 2010 No comments

While reading my personal emails today, I also checked the spam folder. One email title caught my eyes instantly, “Express Your Love with A Domain Name.” That sounds like an interesting idea for techies.

Following the lead, I was thinking what VMware can offer to help you to express your love. Obviously VMware has done far more than expressing. According to our CTO Steve Herrod, VMware VMotion had saved 74 marriages by the time of his keynote at VMworld 2009 (32’35”). I bet the number is even more today.

With that statistical in mind, one quick solution is the VMotion and DRS which balance the computing workload, also your work and life I suppose. It’s great but only for the system administrators who have access to vSphere and VMware Infrastructure. For other people, it’s not that practical.

Luckily, VMware is not only about business, but also about personal. Here are several ideas you can consider for this coming Valentine’s day:

Categories: News & Events Tags:

Top 10 Best Practices Using VMware VI and vSphere SDK (part 2)

January 29th, 2010 6 comments

#6 Consider Views in Your GUI Application

Most developers don’t know much about the View and related managed objects. The reason for that is that they were mainly designed for VI/vSphere Client in the first place. But nothing stops you from using it to your advantages.

As you can imagine, you can use the View and its subtypes InventoryView, ListView, and ContainerView to monitor changes on the server side. It provides an efficient way to monitor for changes with only these visible in your GUI and nothing more. You can use ViewManager to create views according to your specific needs.