User Mode Linux 77
Ravi writes "There is commercial grade software like VMware (which does full virtualization) as opposed to open source approaches like Xen which do partial virtualization. But besides these two, there is a very interesting piece of software called User Mode Linux (UML), which can be used to create virtual Linux machines within a Linux computer. Unique to UML is that support for it has been incorporated into the mainstream Linux kernel tree and it is now a fully supported part of the official Linux kernel. On this note, UML gains a lot of significance. UML has been created and maintained by Jeff Dike, who is known throughout the Linux technical community. And when someone who has created a popular software decides to author a book on the subject, then that book is sure to hold a lot of promise. So when I came across the book titled User Mode Linux, authored by Dike under Bruce Perens' Open Source Series, I just couldn't resist getting my hands on it." Read on for the rest of Ravi's review.
User Mode Linux | |
author | Jeff Dike |
pages | 330 |
publisher | Prentice Hall |
rating | 9 |
reviewer | Ravi |
ISBN | 0131865056 |
summary | Guidance from UML's creator on setting up and putting to work your own instances of User Mode Linux virtual machines. |
In the first chapter, Dike compares UML and various other virtualization technologies, lists several ways in which UML can be put to use, and provides a brief history of UML in which he shares with the reader the trials and tribulations he faced in getting the UML patch incorporated in the official Linux kernel tree.
In the next chapter, "A quick look at UML," Dike walks the reader through setting up UML to work in one's Linux distribution, which includes downloading the UML-enabled Linux kernel binary and the file system, and then booting into UML. Here we get a taste of the utilities which are used to modify in real time the configuration parameters of UML from the host OS. This chapter gives a sound introduction to what goes on behind the booting of UML and how it differs from the host OS in which it is running. For instance, the author aptly explains with the aid of examples that UML is at the same time a process and a kernel.
Chapter 3, "Exploring UML," dissects a UML instance in more detail. Here the author explains how one can connect devices to the running UML instance using the uml_mconsole utility. Common tasks like adding swap space, attaching and detaching devices as well as setting up networking are essentially the same in UML as in any normal Linux distribution, there are a couple of extra steps needed in setting these up in a UML instance. This chapter gives a taste of accomplishing these tasks.
But is it possible to access the same UML file system simultaneously by different users? Normally, this could corrupt the file system. So what is the workaround? The solution is in the use of COW ("Copy on write") files. Dike shows how multiple users can access the same UML instance (each user having full root access) without corrupting the underlying file system using COW files. And this forms the basis for the 4th chapter of this book, "A second UML instance." In this chapter, one also gets a peep into setting up networking between two UML instances but all the advanced networking concepts are explained in a separate chapter of their own.
The next chapter, "Playing with a UML Instance," takes the reader through a variety of things one can do with UML. For example, the author shows how one can just plug in a tar file to a block device and then access it in the UML instance. He also demonstrates how to run X inside UML.
Next, the book goes into a detailed analysis of the various file systems that could be used in UML. Here the author explains the various ways of mounting a directory on the host as a UML directory. In fact you can easily mount your home directory into a UML instance and access your files from inside the UML.
One cannot enable networking in UML quite the same way as in a normal Linux distribution. This is because the UML runs as a process within another Linux distribution. So for networking to work properly between the UML instance and the host system or between different UML instances, a device called TUN/TAP has to be configured first. Also one has to configure the host system to allow the UML instance access to the outside world; this could include tasks like enabling IP forwarding, routing packets to and from the UML, and bridging the host side of the virtual interface to the physical ethernet device. Chapter 7, "UML Networking in Depth," takes a broad look into these networking aspects of UML. I especially liked this chapter because this opens up avenues for people who are interested in learning more about networking. For example, following what has been covered in this chapter, one can -- given enough memory -- set up a network lab on one's machine consisting of a series of UML virtual machines and practice things like switching and bridging. At the end of this chapter, the author gives a step-by-step explanation of setting up a multicast network consisting of three UMLs and three two-node networks, and another UML acting as a switch.
In running UML virtual machines on a host system, at some point of time, it becomes inevitable that one has to manage these virtual systems from within the host. Tasks such as increasing or decreasing the memory allocation to a particular UML instance, hot-plugging a block device, starting or stopping the UML, and so on will have to be carried out on a regular basis especially if the host is a production system. One can install the uml utilities package on one's Linux server to take care of all these tasks from outside the UML. Chapter 8, "Managing UML Instances from the Host," takes a broad look at just that. This chapter covers configuring the different aspects of UML using the UML management console.
The next two chapters cover the nitty-gritty details of configuring UML in a small and large server setup, respectively. When UML is run in production environments, the security of the system takes precedence, and these chapters focus not just on the configuration details, but also on explaining how to run UML securely.
A look around the web will throw up lots of UML file systems and UML-enabled Linux kernels. But the best way (also the most secure way) of getting a UML kernel is to download the official Linux kernel source and compile it yourself. Chapter 11, "Compiling UML from Source," takes a detailed look at compiling the official Linux kernel from source. Here the author explains each and every UML specific option which could be enabled in the configuration file of the kernel prior to compiling it.
In "Specialized UML configurations," Dike demonstrates how to set up a small UML cluster using Oracle's ocfs2. The interesting thing is that the shared storage device which is common for all clusters and which consists of expensive hardware is just a file when implementing a UML cluster. Through this chapter, the author displays the true power of UML and explains how a UML could be used in stimulating hardware which is difficult or expensive to acquire.
The last chapter of the book gives a road map of UML and lists the enhancements that might take place in UML in the future. More specifically, he talks about the externfs filesystem, whose purpose is to allow any reasonable external data to be imported as a UML filesystem, about captive UML, putting a UML instance inside Apache, and so on.
The book also contain two short appendices which list the command line options while booting a UML instance, as well as a short reference on the UML utilities which could make it easier to manage the UML instances on ones machine.
With the continuing increase in processor speeds and availability of cheap memory, it has become feasible to use virtualization technology in production machines. UML can be put to use in diverse situations such as server consolidation where multiple UML instances running on a single machine accomplish the tasks of multiple physical server machines; in education, where each student can be assigned a complete virtual Linux lab setup with root access; in application development; and in disaster recovery practice.
User Mode Linux is a result-oriented book with stress given to accomplishing tasks rather than concentrating on theory alone. That said, this book has enough details to give a broad idea about UML and its implementation. That it was written by Jeff Dike gives this book a lot of credibility over books written on the same subject by others. UML being a niche area, anyone who is interested in this subject will gain a lot from this book.
Ravi Kumar is passionate about GNU/Linux. And likes to share his thoughts through his blog on GNU/Linux. You can purchase User Mode Linux from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Re:If you can read this... (Score:2)
Post a patch.
Re:If you can read this... (Score:2, Offtopic)
Re:If you can read this... (Score:1)
mod parent up (Score:3)
Especially for Opera users or those with high resolution desktops.
At least include a poll man.
So far I miss the old one badly
Re:mod parent up (Score:1)
Re:mod parent up (Score:2)
The problem is that their CSS sheet specifies "14.75px" for the normal text. Which looks fine on 96ppi displays, but is horribly tiny on 125+ ppi displays. That works out to 14.75/125*72 = 8.5pt font size when my preferred size is 10pt text.
(Hint to web designers... stick with "small/normal/large/etc" t
Re:mod parent up (Score:1)
Re:mod parent up (Score:2)
The core problem is that well-behaved and well-designed sites shouldn't force a font size on the user for primary content.
Hi Res Opera (Score:1)
UML != User Mode Linux (Score:5, Insightful)
Re:UML != User Mode Linux (Score:5, Funny)
Offtopic (Score:2, Insightful)
Class diagrams are ubiquitous these days, and I can't come up with a better way to show program flow than a sequence diagram. Most of the rest I could live without on a smallish sized project, but when you are using multiple architects, many of the others become useful.
If you have used something better (I don't love UML, it's anything bu
Re:Offtopic (Score:2, Offtopic)
Don't confuse UML with Class Diagrams and Flow Charts, as I was using them long before I had ever heard of UML; the concepts really are intuitive and self-explanatory. Ditching UML doesn't mean ditching them, it just means ditching the specific UML standard and use something sane instead..
Re:Offtopic (Score:2)
Somebody comes along and standardizes these "Useful Diagrams", collects them into a group and gives them a name and draws some examples so that we can all be talking about the same thing and understand each others diagrams.
As far as I know, this is all UML is. They have certian specific recomendations on how and when you should use these diagrams, but that is adapted per team/team size.
Makes me wonder if your problem might really be a
Re:Offtopic (Score:2)
Yes, provided correct spelling would be an hinderance to actually understanding my emails (like if I insisted on a 15-century British Dictionary being correct).. and yes, just as with people hating XML, it's the misuse that's making me hate it. I mean, that follows pretty much from the definition of 'misuse' :)
Re:Offtopic (Score:2)
Unfortunately I can't do that as I'm pretty sure it would be violating contracts with my employer, however one thing thats worked extremely well for us in the past, is building the class specifications in a wiki(this is usually during implementation though rather than prior to and ends up being documentation after the project is 'complete') most of our implementation
Re:Offtopic (Score:2)
Did you find a Wiki that did a good job of UML-style design, and if so, please let me in on it!
Re:Offtopic (Score:2)
Re:Offtopic (Score:2)
Re:UML != User Mode Linux (Score:2)
I actually like Unified Modeling Language when used appropriately.
If you hate UML, you've probably only seen class diagrams. I hate them, too. I find that they tend to get out of sync with reality and aren't that easy to read anyway (why put the complete list of methods in with the inheritance structure? too much information!). Tools that generate code from th
Re:UML != User Mode Linux (Score:2)
Re:UML != User Mode Linux (Score:2, Informative)
The world is filled with short lived acronyms that should is only understandable in it's context. However, UML = "Unified Modeling Language" is just hubris produced by a company that demands a shitload of money for a shitty process.
Re:Why constant patronage of Bn.com? (Score:1)
KFG
not available for download yet (Score:2)
UML? (Score:1, Informative)
Re:UML? (Score:1)
Re:UML? (Score:1)
The Big Secret of User Mode Linux (Score:5, Interesting)
Re:The Big Secret of User Mode Linux (Score:3, Insightful)
Re:The Big Secret of User Mode Linux (Score:2, Interesting)
I went and got Qemu, and that works much better. After a few days I have a script that builds all the code, makes an img file and configures the whole show to be networked when running. Oh and works in windows too.
Re:The Big Secret of User Mode Linux (Score:2)
Re:The Big Secret of User Mode Linux (Score:4, Informative)
Having said that I have succesfully run Sun and GNU Java in the 2.6.15 UML and 2.6.8 UML neither of which support NPTL. It's just like the old days, you end up with a lot of processes. It's ok for simulating environments though.
Re:The Big Secret of User Mode Linux (Score:4, Informative)
UML Works great with Java apps. We've been hosting Java user's on UML VPSs since 2003 (latterly we are using Xen).
The version of UML we are using does not have NPTL (/lib/tls) support. This is probably what you're referring to. I've seen patches for NPTL support, so this is either fully supported now or 'on its way'.
-- /lib/tls) [rimuhosting.com]
Great Java Hosting (with or without
Too little and much too late (Score:1, Insightful)
Re:Too little and much too late (Score:2)
UML is an awesome idea and I would love to see it become more popular, but I just don't see it going anywhere.
Re:Too little and much too late (Score:2)
Well, considering there's a SKAS0 mode now which doesn't require patching the host kernel, this isn't that big a deal anymore. Running Linux on a host kernel without the SKAS patch isn't really a performance killer anymore.
Not sure about the book... (Score:5, Interesting)
Re:Not sure about the book... (Score:3, Insightful)
Re:Not sure about the book... (Score:1)
Re:Not sure about the book... (Score:1)
Re:Not sure about the book... (Score:2)
Re:Yet another layout comment (Score:1)
Re:Think for yourself (Score:1)
QEMU ? (Score:2, Interesting)
Re:QEMU ? (Score:3, Informative)
From the site you linked to:
... so perhaps not the best example of an open source virtualisation app. (The QEMU accelerator is needed to true virtualisation like the other examples being discussed—without that, QEMU is just a processor simulator, and so runs 5–10 times slower—at least, according to its own web page!)
[OT: Apologies for the boldface—the new style doesn’t allow italics inside
My mail server runs on UML (Score:2)
I can install any distribution I want, or pick from a set of initial distributions they provide. The kernel is the only software component I can't change. I can update to newer versions or apply security patches as often as I want, without waiting for the administrator of the system to do it.
The web-based interf
OpenVZ and Xen (Score:2)
Although Xen [cam.ac.uk] requires patching of the kernel, it is the best performing open source virtualization layer at present.
Re:OpenVZ and Xen (Score:1)
Re:OpenVZ and Xen (Score:1)
read it... tossed it away (Score:2)
In short, the books is not written for the pragmatist. It is written to give a pretty good description of the internals of UML, which is honestly, not very useful.
A couple of chapters devoted to usage and practical applications would help.
A comparison where uml is better than other alternatives would help.
The literature also gets buried in its own details, just as if it is reading like sou
Now, even more system administration (Score:2)
The Linux/Xen/UML world seems to be trying to get to a secure microkernel operating system, with user-mode drivers and limited-authority operating system components. The way they're getting there is wierd, but it might work. Or it might turn into the biggest configuration nightmare since Sendmail.
Big, gaping holes (the security kind) (Score:2)
I dunno, to me, that leaves UML in the category of "interesting toy", even "useful for development"... but not really something you can safely use in production. Or