User Mode Linux
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.
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.
UML = "Unified Modeling Language" - let's not add a new meaning to this acronym as it's sure to be confusing when someone starts talking about reading and writing UML on their UML workstation.
So was UML modeled using UML?
"Look Lois, the two symbols of the Republican Party: an elephant, and a fat white guy who is threatened by change."
Looks like the book is not actually available for download from the Perens Series web page yet.
Find free books.
They prefer the word "commission."
KFG
You mean that Unified Modeling Language I spent a semester learning and to this day can't stand cause the professor was a knucklehead?
Maybe they aren't fans of Amazon's one-click patent.
I wanted to use User Mode Linux to simulate a complete production environment for a recent project. The big problem was that it didn't support the latest thread libraries. This was a big impediment to get Java running. Does the newest UML support running Java server apps?
Your design to a real part online: Big Blue Saw
As you can see on the GNU website, the boycott has been over since 2002. So, you are now allowed by your masters to purchase from Amazon.
I can read this and I am using Opera 8.54 on Ubuntu Linux 6.06 LTS... I suggest you get your act together...
Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
Post a patch.
now we need to go OSS in diesel cars
right then. did you here that webmaster? please fix your pages or else the super-swell browser capt. noob here is /trying/ to use will crash and he'll have to use netscape atlas installed on his grandma's computer, and that uses too much memory when he tries to run leisure suit larry in a dos mode window.
Funny how this stuff comes into the picture after the hype has already passed us ages ago. I mean, UML's were very nice when it first started but it is IMO also a very good display as to why some things simply won't work on Linux. For example; UML's are nice but if you don't have the SKA patch its becoming tedious on your system, if not impossible, to run several UML's on the same box. And yes; the UML support has been added to the kernel, sorta. Ofcourse they didn't include everything, if you really wish to utilize UML's you still patch your kernel.
/never/ made it into the kernel tree. I mean, wtf? Ofcourse maintaining the patch has also become sheer hell with all the changes going on in the kernel these days (assumption) so I can understand that it isn't suited for the latest release all the time. A bit hard if you have to upgrade due to security issues.
But the very usefull SKA patch has
In my opinion the time for UML is long past us. Its a very interesting and appealing project for playing around. Perhaps even running a single UML on your box as a test environment (testing software before you install it on the host), but when looking at the useability of Xen and (my personal favorite) Solaris Zones I think those have a little more potential when it comes to server usage. I mean, the last thing I would need is having to upgrade to the latest kernel release only to find out that SKA isn't available and as such I have to sacrifice some of my virtual machines.
But the technology itself kicks ass. For example, my Web site is hosted by Linode.com, which offers User Mode Linux-based servers for very low prices, which means you can have full root access without needing a dedicated server – not trying to get off topic or advertise or anything, just mentioning a very good example of the technology in use.
Creative misinterpretation is your friend.
May I ask what you do for programming/modeling? I use pieces of UML because it works--it is a valid way to convey my design to my co-workers and we can implement together.
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 but "Unified"), could you point me in that direction, or better yet, show me an example of one of your design documents that you think does a great job of conveying your design to someone else?
Ok, by now I got used to this new layout and kind of filtered out what really annoyes me and what not. So, i would prefer if the mod points of each comment where to the left and not to the far right. It is annoying having to look at the end of the line to see whether or not the comment is most likely to be good.
Would you guys mind not dropping my login every time I ship a page back and forth? I hate having to post as an AC.
When I read There is commercial grade software like VMware (which does full virtualization) as opposed to open source approaches like Xen which do partial virtualization. I think, don't he know QEMU (http://fabrice.bellard.free.fr/qemu/) ? The sentence tells commercial apps do full virtualisation and open source ones do partial virtualization...
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 interface lets me reboot the system with a browser, or even boot it on a different root partition -- I occassionally copy the root partition to an unused partition so that I can use it as a backup if the original one gets borked. There's also a way to access the "console" if networking gets misconfigured or I have to boot in single user mode.
Ignore the mod points, set your threshold at -1 and make up your own mind about whether the comment is any good.
You already know what you'll read at the high moderation levels:
Linux and OSS are good
All things MS are bad
Apple is good on MWF and bad on TTH.
Well, I use Firefox, but I just downloaded Opera from their website and opened it. Posting from there now, the site looks fine. Either clear your cache or update your browser. Either way, stop complaining. Granted, I sort of wish slash went a little further, but the new look is a lot better. Adding a few more Web 2 features (more customizable front page?) would be nice, but give it time.
The right to protest the State is more sacred than the State.
Save yourself $20.35 by buying the book here: User Mode Linux. And if you use the "secret" A9.com Instant Reward discount, you can save an extra 1.57%! That's a total savings of $20.89, or 38.58%!
It would be nice if slashdot discussed or made a post about the newslayer somewhere since the new CSS are torture for some of us who like to discuss it without being OT.
Especially for Opera users or those with high resolution desktops.
At least include a poll man.
So far I miss the old one badly
http://saveie6.com/
OpenVZ, which is a subset of the commercial Virtuozzo product, is being lobbyed for inclusion in the kernel.
Although Xen requires patching of the kernel, it is the best performing open source virtualization layer at present.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
FreeBSD Jails and OpenSolaris Zones are current open source solutions as well and their performance likely matches if not excels over para-virtualization solutions such as Xen.
I was given a free copy of the book, by the publisher, in exchange for posting about it or telling my friends about it.
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 source code might. This is not a good writing style for english.
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.
Isn't loadable module support still considered a huge security hole in UML? Last I heard (from a guy who used and liked UML), to have a prayer of being secure, the UML kernel had to be built with no module loading support, because you could just build a module for the UML kernel, load it in, and make it do things in the host environment at will?
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 was he mistaken? It seems correct to me, since the only real change is modifying the Linux kernel code to run as a process on another Linux kernel, so it would have all the potential pitfalls of that (i.e., loading untrusted code via runtime loading/linking means it can take total control).
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
Indeed, OS-level virtualization approach (as in Solaris Zones, Jails or OpenVZ) performance can not be beaten by para-virtualization approach just because OS-level virt. has the least possible overhead (and, say, does not have an overhead of running multiple kernels which both Xen and UML have).
-- Kir Kolyshkin, OpenVZ project leader.
Running Opera on 4800x1200. Looks fine to me. Your specs?