Archive

Archive for the ‘Virtualization’ Category

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

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.

ca48d7d2bdd3b73df20d9d2f8701617a004

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

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

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

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.

How to Use the Missing Virtual Network Editor in VMware Player

March 13th, 2013 18 comments

For most people who use the VMware Player, DHCP is good enough for the NAT network. That means the IP addresses of your virtual machines may change after each powering on.

What if you want to have static IP addresses? It’s pretty easy as long as it’s in the same subnet. For example, if the VMnet8 has IP address of 192.168.47.1, your virtual machines should be configured in the same network say 192.168.47.x, where X can be any value from 3 to 254 (2 reserved for gateway, 255 broadcast by default).

Categories: Virtualization Tags: ,

Configure Static IP Address on Linux VM in VMware Player

March 12th, 2013 19 comments

If you run VMware Player, you would have 3 networking options for virtual machines running there: Bridged, NAT, Host-Only. In the latest 5.0.1, I also found a new one: LAN Segment. This blog has a nice explanation on these three settings if you want to get more details.

In most of cases, I use NAT for networking because the virtual machine can have Internet access which allows me to install additional software as needed. By default, VMware Player uses DHCP to dynamically assign IP address while using NAT. So you cannot guarantee to get same IP address after each rebooting.

vSphere vs. Hyper-V: Difference of Virtual Machine States

January 6th, 2013 7 comments

While reading articles about Microsoft Hyper-V, I found that Hyper-V seemed to have different states for virtual machines from VMware vSphere. The virtual machine in Hyper-V is represented by the Msvm_ComputerSystem class. If you are familiar with VMware vSphere, you know the equivalent in vSphere is VirtualMachine. At first sight, the Hyper-V APIs may not look straight-forward. The Hyper-V APIs is actually based on Windows Management Instrumentation (WMI), which is essentially CIM from DMTF.