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

WebStocket in HTML5: Time to Give it a Try

June 3rd, 2013 2 comments

WebSocket is a new technology that is part of HTML5. It allows a browser (or an application that uses HTTP/HTTPS) to upgrade a HTTP/HTTPS connection to a full socket to the server so that both parties can send data at any time.

WebSocket Standard

The WebSocket protocol is defined in RFC 6455. The initial handshaking is a HTTP request with upgrade header like the following from the RFC:

GET /chat HTTP/1.1

Host: server.example.com

Categories: Software Development Tags: , ,

Installing OpenStack on CentOS in Private Network

May 31st, 2013 3 comments

With increasing popularity of OpenStack, I finally got chance to try it out by myself. As the first step, I chose to install everything into one machine (update: for multi-node deployment, check here). Thanks to the packstack project and RedHat documentation (http://openstack.redhat.com/Quickstart), it’s supposed to be straight forward and painless on CentOS. It turned out to be true if and only if you install it with direct HTTP(s) access to the Internet.

Categories: Cloud Computing Tags: ,

Better Way for Workflow Design in Orchestration and Automation?

May 28th, 2013 4 comments

In my last article on orchestration, I talked about the issues with the current workflow design. Although intuitive and easy to get started, it’s really inefficient and hard to handle for complicated workflows. A natural follow up question is, “is there any better way to design workflows?”

Like everything else, there is hardly an approach that is better than others in every aspect. The alternative approach, coding, may not be as intuitive as the visualized flow chart approach, but it’s highly productive. So the quick answer for the above question is yes if you can combine them together.

Tips For Developers Using VMware vCenter Orchestrator

May 19th, 2013 3 comments

I recently spent some time on vCenter Orchestrator and really liked it with nice integration with vSphere Web Client, even though the Web Client has to improve quite some before it can overtake the standalone vSphere Client.Coming from the programming background, I find the workflow design is pretty easy to understand. Although targeted mostly for people with no programming background, workflow has in fact stronger typing than typical scripting. That may explain why having programming background helps a lot to quickly ramp up on workflow development.

Categories: Virtualization Tags: , ,

Virtualization for PaaS: Asset or Liability?

May 14th, 2013 11 comments

During the Microsoft Management Summit last month, I had an interesting chat with Rakesh Malhotra who is the VP product of Apprenda. It made me to think more about two important technologies: virtualization and PaaS. As we know, virtualization is almost a must for IaaS. Will it be the same case for PaaS?

Pure PaaS or PaaS over IaaS

Can The Success of Server Virtualization Be Repeated in Networking?

May 6th, 2013 6 comments

The software-defined networking is the new buzzword for network centralization, which is also known as OpenFlow or network virtualization. The idea is to centralize the control to a server (or a cluster of servers) called controller.

With the acquisition of Nicira by VMware, the software-defined networking has caught many eyeballs from the community. From there, VMware extended it to a new vision called software-defined datacenter which includes three elements of computing: compute, network, and storage.

What Software-defined Networking Is and Is Not and Where It Fits

April 29th, 2013 5 comments

After server virtualization took off, virtualization became a buzzword which made it easy to get attention from market, and for startup companies, to get funding. Therefore you’ve seen many technologies claiming it’s * virtualization mostly for marketing purpose. Network virtualization is such a case. The even newer term for it is called software defined network, or simply SDN.

It’s Centralization, Really!

Categories: Cloud Computing, Virtualization Tags:

How to Avoid “127.0.0.1” in SNMP Trap With vCenter Server Virtual Appliance

April 24th, 2013 1 comment

SNMP trap provides a very useful way to monitor vSphere. You can use either GUI or vSphere API to configure up to 4 trap receivers. With that I can use alarm to monitor events or state changes.

If you use vSphere API to add SNMP receivers, you will need the OptionManager managed object. The related options you want to set are: snmp.receiver.1.name, snmp.receiver.1.port, snmp.receiver.1.community, snmp.receiver.1.enabled. There are 3 more sets with similar names but different numbers (2, 3, 4).

Categories: Virtualization Tags: , ,

A Bug with Disabling SSH Service Port in vSphere 5.1

April 23rd, 2013 6 comments

While playing vSphere API last week, I got into an issue that I cannot disable the SSH server with Firewall APIs (see HostFirewallSystem). The following call would throw an exception:

hfs.disableRuleset(“sshServer”);

There are many other different services like “sshClient” whose ports can be enabled and disabled via the API. As a nice surprise, they all work just fine.

Categories: vSphere API Tags:

UI Extensibility of System Center Virtual Machine Manager, Compared with vSphere

April 17th, 2013 4 comments

To my curiosity, I attended the session “Building UI Add-ins for System Center 2012 SP1 Virtual Machine Manager” by Jonobie Ford, who is the program manager of the add-in SDK. As you may know, I wrote several docs on vSphere Client plug-in and helped many partners to develop their plug-ins during my days at VMware.

Categories: Virtualization Tags: , ,

A Quick Hack to Database Failure in vCenter Appliance

April 14th, 2013 2 comments

After playing with the vCenter appliance simulator feature documented by William, I got into a show stopper that vCenter service (VPXD) could not be started. I don’t think it’s related to the simulator feature at all. My guess is that it’s caused by a sudden power off of the virtual machine but didn’t try to reproduce the problem that way – I care more to fix it than anything else.

Microsoft Management Summit 2013: Hyper-V vs. vSphere, AWS, Hands On Labs

April 11th, 2013 6 comments

I flew to Vegas this week for Microsoft Management Summit 2013, which happens to be in the same hotel (Mandalay Bay) as VMware Partner Exchange one and half months ago. The organizations and activities of both conferences are pretty similar – keynotes, breakout sessions, hands on labs (HOL). It’s pretty exciting to learn new technologies and meet new people.

Hands On Labs

GIT Commands Using Java APIs

March 26th, 2013 9 comments

In previous posts, I’ve covered an Java API called JGIT for working with GIT. Besides the low level APIs, JGIT also supports high level command line like interfaces. If you know how to use the GIT command line, you can use the APIs. Note that it’s different from calling GIT commands or any other commands from Java code.

Here is a sample code I wrote to try out the APIs. Give it a try and you will like these high level APIs.

Categories: Software Development Tags: ,