Xen Virtualization and Linux Clustering, Part 1
Have you heard about Xen virtualization and want to get some hands-on experience? Do you want to experiment with Linux clustering but only have a single computer to devote to the cause? If you answered yes to either of these questions, keep reading.
In this article, I briefly introduce the concepts of Xen virtualization and Linux clustering. From there, I show you how to set up multiple operating systems on a single computer using Xen and how to configure them for use with clustering. I should point out that a cluster implemented in this manner does not provide the computational power of multiple physical computers. It does, however, offer a way to prototype a cluster as well as provide a cost-effective development environment for cluster-based software. Even if you're not interested in clustering, this article gives you hands-on experience using Xen virtualization.
Xen is an open-source software project that provides high-performance, resource-managed virtualization on the x86 processor architecture. It allows multiple operating system instances to run concurrently on a single physical computer. Xen manages the computer's hardware resources so they are shared effectively among the operating system instances, called domains. So what does all this mean? It means that by using Xen virtualization, you can run and use several different operating systems at the same time on a single computer.
Xen supports a variety of operating systems, which increases its applicability for running many popular applications on whichever OS you desire. Xen currently supports Linux kernels through an approach called paravirtualization in which the operating system is modified to become aware of Xen. Other ports have been developed or are in progress for other operating systems, such as NetBSD and FreeBSD. Intel and AMD also are developing new virtualization technology in their processors to allow an OS to run on Xen without modification. That means even Microsoft Windows will be an OS option on Xen in the near future.
Xen virtualization provides many exciting benefits over traditional single OS computers, including server consolidation, application mobility, secure computing and research/testing. What sets Xen apart from other virtualization technologies, however, is its performance. In fact, running over Xen, Linux's performance in a variety of benchmarks is consistently close to native Linux.
So how is a Xen system structured? Each Xen system has a single privileged OS, called Domain-0, that is responsible for starting and managing the other unprivileged OS instances. Domain-0 is the OS that boots when you start your computer, and it has the tools necessary to manage other domains.
Clustering essentially is the unification of multiple independent computers into a single system through the use of software and networking. By definition, a cluster must have at least two computers (called nodes), one master and one slave. The master node typically has a job scheduler that schedules the work to be done by the slave nodes. As the name implies, the slave nodes perform whatever work has been scheduled for them to do. The nodes of the cluster communicate using a message passing interface. Two of the most commonly used message passing interfaces are PVM and MPI. For this tutorial, we are using PVM 3.4 to implement clustering.
For the tutorial that follows, the master node is the privileged Xen Domain-0 and the slave nodes are the unprivileged Xen Domains. This approach allows us to create and use as many slave nodes as we want.
The first step to getting started with Xen is to install it. This process involves several steps:
Install the required libraries.
Install and/or compile the Xen privileged/unprivileged kernels.
Configure the bootloader to boot Domain-0.
Set up unprivileged domains.
I do not cover these first three steps here, because adequate documentation already is available on-line describing this process. A good place to start is the Xen User Manual. In addition, a wide variety of tutorials and troubleshooting articles are available on-line. Be sure to find one that matches the Linux distribution you are using as Domain-0. During the installation process, you need to consider which Linux kernels are appropriate for your use. The Xen binary release contains pre-compiled kernels for both the privileged and unprivileged domains. If you require anything special that's not supported by these kernels, you may need to compile a custom kernel with Xen support. On my system, I compiled my own Domain-0 kernel but used the stock kernel for the unprivileged domains. Another important consideration for this tutorial is to leave an extra, unused partition on your hard drive for later use with the unprivileged domains.
For the tutorial that follows, I assume you have Xen 2.0.7 installed and can boot Domain-0. You also must be able to start xend, the Xen control daemon, which must be running in order to start and manage other domains.
Xen 3.0 was released recently. If you are more daring, you might consider installing that version instead, although you may not be able to follow along with this article as easily. I also assume that your Domain-0 is a Debian-based distribution. If not, you simply need to use whatever mechanism your distribution provides for downloading and installing packages, typically where the apt-get command is used below.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- I once had a better way I
2 hours 56 min ago - Not only you I too assumed
3 hours 13 min ago - another very interesting
5 hours 6 min ago - Reply to comment | Linux Journal
7 hours 6 sec ago - Reply to comment | Linux Journal
13 hours 54 min ago - Reply to comment | Linux Journal
14 hours 10 min ago - Favorite (and easily brute-forced) pw's
16 hours 1 min ago - Have you tried Boxen? It's a
21 hours 53 min ago - seo services in india
1 day 2 hours ago - For KDE install kio-mtp
1 day 2 hours ago



Comments
how can i do virtualization on a cluster of 3 physical computer
i want to know weather this is possible for more than 2 physical cpu or a cluster of 2 to 3 computers
How Tos for Xen-Cluster online in German!
If you're looking for a German Howto for a Xen-Cluster virtualization, take a look at http://www.thomas-krenn.com/de/wiki/Kategorie:Xen
application in SAN storage environment
Whats the possible use of virtualisation in a storage environment?
application in SAN storage environment
Whats the possible use of virtualisation in a storage environment?
High availability
If you have a highly available cluster running over a shared filesystem such as GFS or Lustre etc. You can virtualize your nodes so that when a node needs to come down for maintainence or whatever, you can simply migrate the "virtual" node to other hardware, possible one that already has an instance running. XEN domain migration is very fast, less than 100ms from what I understand. It becomes a lot easier to attain "Five 9's" of uptime or better.
less than 100ms downtime,
less than 100ms downtime, that's awesome, I've done it and its true, if you continuosly ping a domain and migrate it, you only lose one of them.
nice howto, thank you!
I have but one gripe: what is it with the page width? I'm at 1280x1024, and the page is still wider than my screen! Like, crazy, man.
advertising
I wouldn't worry too much about missing some advertisements ;-)
page width
I have the same resolution, Displays fine.
ah, I should have tried more
ah, I should have tried more browsers. It's a Konqueror problem, firefox and opera look fine.
Looks bad in Safari too
You guys should test your pages in a few browsers. It comes out super wide for me, very irritating.
Thanks for the article though.
Safari and Konqueror
Yeah, Safari and Konqueror both use about the same engine.