Archive

Author Archive

Start My Own Consulting and Training Business

September 3rd, 2013 15 comments

As some of you may have known, I just left VCE last Friday. It’s really a tough decision as I enjoyed very much working with my colleagues there during the last two years, and the company continues to grow rapidly. Building my own business is something I had always dreamed about. I am glad I finally took it into action.

VMworld 2013 Impression: Is VMware Ready For Next Growth?

September 2nd, 2013 No comments

Last week was pretty exciting with VMworld 2013 in San Francisco. I sat through the keynotes and talked to many friends at VMware and partner community who showed up in the SolutionExchange where I spent most of my time. On Thursday I got a bit time to attend a few breakout sessions.

In first day keynote, VMware CEO Pat Gelsinger laid out three imperatives for VMware: 1) Virtualization extended to ALL of IT; 2) Management gives way to automation; 3) Compatible hybrid cloud is ubiquitous. The keynote was centered around these three imperatives.

REST API Service Made Easy with Jersey Framework in Java

August 25th, 2013 16 comments

Because REST APIs are easy to get started with, I see more products are adopting it for remote management APIs. To implement the REST on the server side, you can use different programming lanaguages and frameworks. In Java, you can use the Jersey framework which is a reference implementation of the JAX-RS (JSR 311 & JSR 339).

vCenter Orchestrator REST APIs: Executing Workflow

August 12th, 2013 No comments

Just played with vCenter Orchestrator REST APIs and found it’s pretty straight-forward to use. With the REST APIs, you can manage various resources such as workflow, workflow run, workflow presentation, workflow user interaction presentation, catalog, action, package, inventory, action, category, configuration, content, notification, service descriptor, user. It seems possible to build your vCO client like GUI with this set of APIs.

API Documentation Included

Parsing XML in C#: A Quick Working Sample

August 9th, 2013 17 comments

Just started to work on hacking the Web application of vCAC and REST APIs in C#. As expected, the XML processing is an indispensable part for that purpose. I have worked on C# on and off in the past, but never as consistently as on Java. To get myself familiar with the related C# APIs for parsing, I coded the following sample code.

e356ff9397eedf29fbdec5eaed54da27014

Categories: Software Development Tags: , ,

Sync up vCenter Server with NTP: Bug and Workaround

August 7th, 2013 No comments

While playing with VMware Single Sign On (SSO) SDK, I got into an exception indicating that the request had expired.

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Request has expired
	at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
	at $Proxy40.issue(Unknown Source)
	at com.vmware.sso.client.samples.AcquireHoKTokenByUserCredentialSample.getToken(AcquireHoKTokenByUserCredentialSample.java:233)
	at com.vmware.sso.client.samples.AcquireHoKTokenByUserCredentialSample.main(AcquireHoKTokenByUserCredentialSample.java:285)

Initially I thought it might be caused by timestamps in the arguments sent to SSO server. But further investigation showed that the time on my vCenter appliance server had run 3 hours faster than normal, so whatever request I had submitted from my desktop (whose time is up to the date) was “thought” to be submitted 3 hours ago. No wonder the request was rejected as expired. I think there is an allowance of a few minutes and 3 hours was just too big to ignore.

Categories: Virtualization Tags: , , ,

Unit Testing with JUnit 4 in Java: Quick Introduction and Simple Samples

August 5th, 2013 1 comment

Unit testing is an important part of software development because it helps capture bugs before it moves on to QA or even customers. However, it’s not part of the end product therefore whatever you invest in unit testing will not yield any direct result but indirect result in better quality of your product. So at one side, you want to do it more for better quality; on the other side, you want to minimize it for less investment. It’s therefore a tricky trade off for best ROI. For more discussion, see here.

vCenter and Solutions Logs: How to Change the Settings

July 28th, 2013 No comments

Logging is an important tool for system monitoring and troubleshooting. vCenter has comprehensive logs for itself and related solutions. We’ll introduce how to change the settings for these logs in vCenter appliance. One obvious use case is to increase the log levels for troubleshooting.

vCenter Logs
As usual, the vCenter configuration file resides in a subfolder in the /etc folder.

e356ff9397eedf29fbdec5eaed54da27023

Categories: Virtualization Tags: , ,

Rethink Virtual Machine Template: It’s Not What It Is

July 24th, 2013 3 comments

In the virtualization world, virtual machine template (as know as virtual machine image) is a big feature. It allows users to quickly deploy a new virtual machine without the steps to install a new operating system and other software. Because of this feature, we start to have a new problem with too many (unused or useless) virtual machines. But this is a separate topic that deserves its own discussion.

Uncover KVM and Virtual Machines in OpenStack

July 15th, 2013 4 comments

After installing OpenStack and posting a few articles, I started to dig down a bit more on the KVM hypervisor used in OpenStack. For that, I wrote about the libvirt API and how to remotely manage KVM with it.

In this article, I will introduce how KVM is used in Openstack and what a virtual machine is made of.

How A Virtual Machine Instance Comes to Life?

Libvirt vs vSphere Management Agent: A Quick Comparison

July 10th, 2013 No comments

Libvirt is an open source project for managing almost all hypervisors and containers. It’s implemented in C and can be exposed through different language bindings.

There are both server (a.k.a daemon or agent) and client. If you are familiar with VMware vSphere (I assume you are if you read my blog), the server is very much like the hostd running on the ESXi side. The client is like the VI Java API that can be used for remote management.

Categories: Virtualization Tags: , ,

Easy Terminal Server For Linux

July 8th, 2013 1 comment

A while back, I read an interesting article Enable multiuser logins with VNC – Help your users access a multiuser Linux system from anywhere on IBM developerWorks. I was thinking it could be used to implement something similar to the terminal service in Windows. There are many good use cases for terminal services. I think you probably know better than I do so I skip this part.

Java Native Access: What, How, and Performance Comparison

July 1st, 2013 No comments

While trying the libvirt Java binding, I came to know Java Native Access (JNA) which is a great alternative to Java Native Interface (JNI). As it’s said, no one can claim to know all about Java after 1.5. It’s now 1.7 (although majority of us are still with 1.6) and it’s even less likely. I am no exception.

Understanding Libvirt and APIs For VMware Professionals

June 26th, 2013 No comments

As discussed in my previous post, Libvirt is an open source project for managing hypervisors. With the increasing popularity of Openstack, it’s important to get familiar with KVM as an alternative virtualization platform to commercial products like vSphere and Hyper-V.

To use KVM, you don’t have to install Openstack – you can just install KVM as a standalone product as described in my previous post. In that, it’s pretty much like VMware Player or Workstation. In terms of maturity, KVM is pretty solid and way ahead of Openstack which is also improving quickly since last year with many commercial vendors jumping in.

KVM or QEMU: Which Runs My Virtual Machine?

June 25th, 2013 2 comments

While working with Openstack on both VMware virtual machines (with no virtualization instruction set exposed) and physical machines, I found virtual machine instances can be deployed seamlessly. On a machine that does not have virtualization instruction set exposed, KVM falls back to QEMU silently. That is why could I try out OpenStack on virtual machines before my hardware was ready. Because both KVM and QEMU support the same libvirt APIs, you would not notice any difference using command line like virsh, or Virtualization Manager. That is the beauty of standard APIs with different implementations, similar to the standard vSphere APIs that are implemented by both vCenter and ESXi.

Categories: Virtualization Tags: , , ,

Managing KVM with Libvirt In Java: Step by Step Tutorial

June 23rd, 2013 7 comments

As mentioned earlier, I got the KVM instances running on my compute cluster after installing the Openstack. I’ve been curious on KVM management APIs, so I took some time to give it a try. In the following, I’ll detail on how to set up environment and get your first HelloWorld type of Java code working.

Categories: Virtualization Tags: , ,

Virsh Commands: Why They Are Important

June 21st, 2013 No comments

After installing Openstack, I got KVM/QEMU installed as a by-product. To get myself familiar with the functionalities, I played with Virtulization Manager and the virsh command line. By comparing with the libvirt API, I found they are pretty similar. Therefore, I think it’s a good starting point before jumping to the APIs. Also, the virsh is implemented on top of the libvirt APIs.

Categories: Virtualization Tags: , ,

Slow SSH Client and Quick Hack

June 19th, 2013 4 comments

While using PackStack to install OpenStack for multi-node topology, I found my SSH client was so slow that it failed the PackStack installation command. The ssh I had was the default one with CentOS 6.4: “OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010.” It seemed to work just fine while using PackStack for all-in-one deployment as described in my previous article.

To isolate the problem, I started to print more debug information from the SSH as follows:

Categories: Cloud Computing Tags: ,

Installing OpenStack With Multiple Nodes: Tips and Tricks

June 17th, 2013 2 comments

Having successfully installed OpenStack all-in-one with PackStack, I started to try out the multi-node deployment. It ended up much longer time than I thought because of various issues mainly with networking. The following summarizes what I did to make it work, and some tricks and tips I found out during the process.

Categories: Cloud Computing Tags: , ,

Tip For Tech Bloggers: Easy Way to Document Command History

June 10th, 2013 1 comment

While writing technical blogs, it’s always nice to include commands and scripts that readers can try on their own. I find it a bit challenging to accurately document these in steps while intensively testing or debugging something by myself.

There are actually commands that faithfully list all the commands you typed. You can then clean them up for your posts. In the following, I introduce how to do these on Linux, Windows.

Linux

Categories: Software Development Tags: ,