April 19, 2019

User Mode Linux: Coming to a Kernel Near You, Part 1

What Exactly is User Mode Linux?

  • March 12, 2003
  • By Dee-Ann LeBlanc

There are a number of fundamental additions coming in the next Linux kernel. One of these will be a great boon to software developers, beta testers, product reviewers, hosting services, and more: User Mode Linux (UML). Just as VMware allows us to run a machine within a machine, UML lets us do run multiple, separate, isolated instances of Linux on a single Linux box.

Seems a bit too good to be true, doesn't it? Let's take a closer look at UML, how it works, and the pros and cons involved in determining if this upcoming kernel feature is for you.

The name for this feature isn't the most self-explanatory. User Mode Linux is thusly named because it runs in user space. With a UML, you can run a miniature Linux system with its own kernel and filesystem without needing root access to the entire machine. Your UML is your own little world, and you can configure its kernel, networking, and all other aspects of the virtual machine to your satisfaction.

You're not limited to the same distribution of Linux, either. While VMware lets you run any operating system it's designed to handle within its virtual machine, UML allows you to run any particular distribution's kernel and filesystem setup. The key is that you run the UML kernel as you would run any other command, and the UML kernel then communicates directly with the host machine's kernel--though at times the UML kernel must modify instructions before sending them to the main kernel. Limitations come in when a package must communicate directly with hardware instead of an intermediary, but there are workarounds available that solve most of these issues.

Your UML filesystem is actually contained in a single file (per UML you've set up), swap space and all, making it a sort of filesystem within a filesystem. Between the isolated filesystem and kernel, a UML can act as an island where users can enter, but cannot break out through the shark-infested waters to reach the main system. A break-in only effects the UML system. The overall kernel and filesystem remain untouched.

Most Popular LinuxPlanet Stories