≡ Menu

Linux Virtualization

How To Open VMware Server Remote Console with Firefox 3.0.1

Update: Vmware sever 2.0 final has been released. Version 2.0 has updated version for Firefox 3.0.x series.

VMWare remote console plugin allows to control VMWare server 2.0RC1. However, when you upgrade Firefox to 3.0.1 it will not work or get disabled by Firefox 3.0.1 due to plug-in compatibility issue. To fix this issue shutdown your Firefox, locate a directory called VMwareVMRC@vmware.com. This hack tested on:
=> Linux running Firefox 3.0.1

=> VMware Remote Console Plug-in version

Open a shell prompt and type the following commands:
$ cd ~/.mozilla/
$ find . -type d -iname "VMwareVMRC@vmware.com"

Sample output:


Change the directory, enter:
$ cd ./firefox/szvrcz3m.default/extensions/VMwareVMRC@vmware.com
Open install.rdf
$ cp install.rdf ~/install.rdf.bak
$ vi install.rdf

Find line that read as follows:


Replace it with:


Save and close the file. Open Firefox and plug-in should work without a problem.
(Fig.01: Running VMWare Server Remote Console Plugin under Updated Firefox v3.0.1)

Download of the day: Vmware 2.0 Virtualization Solutions Beta Software

VMware Server (formerly GSX Server) is an entry-level server virtualization solution which is proprietary, freeware software. VMware released version 2.0 beta of Server on July 1, 2008. VMware Server offers virtualization benefits such as:

+ You can create, edit, and play virtual machines.
+ Install any guest operating system for testing purpose.
+ Improve security.
+ Reduce downtime.
+ Control guest oses and VMware server from browser itself.
+ Improve resource utilization i.e. resource virtualization etc.

It uses a client-server model, allowing remote access to virtual machines.

Download VMware Server 2.0 Release Candidate 1

Please note that to use this version, you will need to register for your free serial number(s).

How do I install vmware?

Once downloaded simply use rpm command to install VMware software under CentOS / RHEL 5.x:
# rpm -ivh VMware-server-2.0.0-101586.x86_64.rpm
Before running VMware Server for the first time, you need to configure it for your running kernel by invoking the following command:
# /usr/bin/vmware-config.pl

How do I access and control my guest operating systems?

Fire a webbrowser and type the following url:

(Fig.01: Vmware server web login)
Once logged in you can see all your virtual machines and you can start / stop VPS oses:

(Fig.02: "VMWare Infrastructure Web Access" provides appliance like control [click to enlarge])
You need to install Firefox add-on called "VMware Remote Console Plugin", once installed you can install any os or view guest / vps oses console:

(Fig.03: FreeBSD remote console within my Firefox [click to enlarge])

VMWare: List all running Virtual Machines [ VMs ] / VPS From a Shell Prompt

You can easily list all running Virtual machines from a Linux shell prompt without accessing GUI. This is useful to scripts or to get status for any VM.

vmrun is a command line application for controlling various VM operations. Type the following command:
vmrun -T server -h 'https://vmserver.example.com:8333/sdk' -u VMUSERName -p 'yourVMPassword' list
=> -T server : This is VMWARE server version 2.x

=> -h 'https://vmserver.example.com:8333/sdk' : VMWare server hostname. This can be local or remote server.

=> -u VMUSERName : VMWare server username (usually it is root)

=> -p 'yourVMPassword' : VMWare server password

=> list : List all running vms

List all running VMs

vmrun -T server -h 'https://server.nixcraft.in:8333/sdk' -u root -p 'myPassword' list
Sample output:

Total running VMs: 2
[DISK315k] Debian5/Debian5.vmx
[DISK315k] CentOS52_64/CentOS52_64.vmx

Listing a virtual machine with Workstation on a Windows host (open dos prompt and type the command):
vmrun -T ws list
vmrun -T ws -gu guestUser -gp guestPassword list

Red Hat / CentOS Linux 4: Setup Device Mapper Multipathing

Multipath I/O is a fault-tolerance and performance enhancement technique whereby there is more than one physical path between the CPU in a computer system and its mass storage devices through the buses, controllers, switches, and bridge devices connecting them.

A simple example would be a SCSI disk connected to two SCSI controllers on the same computer or a disk connected to two Fibre Channel ports. Should one controller, port or switch fail, the operating system can route I/O through the remaining controller transparently to the application, with no changes visible to the applications, other than perhaps incremental latency.

This is useful for:

  1. Dynamic load balancing
  2. Traffic shaping
  3. Automatic path management
  4. Dynamic reconfiguration

Linux device-mapper

In the Linux kernel, the device-mapper serves as a generic framework to map one block device onto another. It forms the foundation of LVM2 and EVMS, software RAIDs, dm-crypt disk encryption, and offers additional features such as file-system snapshots.

Device-mapper works by processing data passed in from a virtual block device, that it itself provides, and then passing the resultant data on to another block device.

How do I setup device-mapper multipathing in CentOS / RHEL 4 update 2 or above?

Open /etc/multipath.conf file, enter:
# vi /etc/multipath.conf
Make sure following line exists and commented out:

devnode_blacklist {
        devnode "*"

Make sure default_path_grouping_policy option in the defaults section set to failover. Here is my sample config:

defaults {
       multipath_tool  "/sbin/multipath -v0"
       udev_dir        /dev
       polling_interval 10
       default_selector        "round-robin 0"
       default_path_grouping_policy    failover
       default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
       default_prio_callout    "/bin/true"
       default_features        "0"
       rr_min_io              100
       failback                immediate

Save and close the file. Type the following command to load drivers:
# modprobe dm-multipath
# modprobe dm-round-robin

Start the service, enter:
# /etc/init.dmultipathd start
multipath is used to detect multiple paths to devices for fail-over or performance reasons and coalesces them:
# multipath -v2
Turn on service:
# /sbin/chkconfig multipathd on
Finally, create device maps from partition tables:
# kpartx -a /dev/mapper/mpath#
You need to use fdisk on the underlying disks such as /dev/sdc.


  • man page kpartx,multipath, udev, dmsetup and hotplug

Load Balancer Open Source Software

I've worked with a various load balancing systems (LBS). They are complex pieces of hardware and software. In this post I will highlight some of the open source load balancing software. But what is load balancing?
It is nothing but a technique used to share (spared) load / services between two or more servers. For example, busy e-commerce or bank website uses load balancer to increase reliability, throughput, uptime, response time and better resource utilization. You can use following softwares as an advanced load balancing solution for web, cache, dns, mail, ftp, auth servers, VoIP services etc.

Linux Virtual Server (LVS)

LVS is ultimate open source Linux load sharing and balancing software. You can easily build a high-performance and highly available server for Linux using this software. From the project page:

Virtual server is a highly scalable and highly available server built on a cluster of real servers. The architecture of server cluster is fully transparent to end users, and the users interact with the cluster system as if it were only a single high-performance virtual server.

=> Project Web Site

Red Hat Cluster Suite

It is a high availability cluster software implementation from Linux leader Red Hat. It provide two type services:

  1. Application / Service Failover - Create n-node server clusters for failover of key applications and services
  2. IP Load Balancing - Load balance incoming IP network requests across a farm of servers

=> Product web page

The High Availability Linux Project

Linux-HA provides sophisticated high-availability (failover) capabilities on a wide range of platforms, supporting several tens of thousands of mission critical sites.

=> Project web site

Ultra Monkey

Ultra Monkey is a project to create load balanced and highly available network services. For example a cluster of web servers that appear as a single web server to end-users. The service may be for end-users across the world connected via the internet, or for enterprise users connected via an intranet.

Ultra Monkey makes use of the Linux operating system to provide a flexible solution that can be tailored to a wide range of needs. From small clusters of only two nodes to large systems serving thousands of connections per second.

=> Project web site

Personally, I've worked with both LVS and Red Hat Cluster Suite and I highly recommend these softwares.

Linux Xen High Availability Clusters Configuration Tutorial

Xen is one of the leading Virtualization software. You can use Xen virtualization to implement HA clusters. However, there are few issues you must be aware of while handling failures in a high-availability environment. This article explains configuration options using Xen:

The idea of using virtual machines to build high available clusters is not new. Some software companies claim that virtualization is the answer to your HA problems, off course that's not true. Yes, you can reduce downtime by migrating virtual machines to another physical machine for maintenance purposes or when you think hardware is about to fail, but if an application crashes you still need to make sure another application instance takes over the service. And by the time your hardware fails, it's usually already too late to initiate the migration.

So, for each and every application you still need to look at whether you want to have it constantly available, if you can afford the application to be down for some time, or if your users won't mind having to relogin when one server fails.

=> Using Xen for High Availability Clusters [onlamp.com]

Virtualization: Run Windows and Linux at One Place

I've used VMWARE ESX / Xen paravirtualization, Virtuozzo, Solaris Containers, and FreeBSD Jails as os level virtualization. Virutalbox is another full virtualization solution. Presently, VirtualBox runs on Windows, Linux and Macintosh hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.

Virtualization: Run Windows and Linux at One Place

Rakesh has published a small article about VirtualBox Virtualization software. Both Windows and Linux can be run together simultaneously, and you don't even need to switch between the two. With the seamless Windows feature of the latest version of VirtualBox virtualization software, you can seamlesssly run both Windows and Linux applications from the same desktop interface. This has been made possible by the combined efforts of VirtualBox and SeamlessRDP that is meant for seamless Windows support for rdesktop.

=> How to run Windows and Linux at one place? [ciol.com]