Installation and Configuration of User-Mode Linux (UML)
This article describes how to set-up and configure User-Mode Linux in Fedora 10. User-Mode Linux is a safe, secure way of running Linux versions and Linux processes. User-Mode Linux gives you a virtual machine that may have more hardware and software virtual resources than your actual, physical computer. Disk storage for the virtual machine is entirely contained inside a single file on your physical machine. With properly limited access, nothing you do on the virtual machine can change or damage your real computer, or its software.
Applicable to Fedora Versions
-
Fedora Core 10
Requirements
- You will need a computer running Fedora with an active internet connection configured .
- You will need the Linux Kernel sources to be copied to your system. This can be downloaded from the Kernel official website.
- You will also need a filesystem image to be used along with the User-Mode Linux. You can download the filesystems from the User-Mode Linux official website.
- You will need the UML utilities package. You can download the UML utilities from the User-Mode Linux Official webs
- Make sure you have a Minimum of 2 GB free disk space as the filesystem image when uncompressed takes up approximately 1.5 Gig.
Doing the Work
- Open a terminal
Uncompress the downloaded kernel sources by performing the following:tar -jxvf linux-2.6.28.tar.bz2
- Uncompress the downloaded file system image and UML utilities by performing the following:
- Configure the UML installation by performing the following:
make menuconfig ARCH=um
Make sure the ARCH=um is given exactly as mentioned above as its case sensitive.Save the configuration - Now Compile the Kernel for the UML architecture by performing the following:
- On Successful compilation the binary file by name linux would be generated in the same directory.
- Now, Compile and install the UML utilities by performing the following:
- Now we are ready to run UML. To verify whether UML boots properly, the following command could be given. But to enable more features in UML, Networking, Creating Virtual Network interfaces, Command Line arguments have to be passed as shown in step 4:
- To enable Virtual Networking new interfaces have to be created in UML, these interfaces are virtual interfaces and have nothing to do with the physical interfaces in the Host. To enable Virtual Networking, the following command line arguments have to be passed while we execute the UML Image. The command creates three virtual interfaces,the IP addresses
given in the command are assigned to the TUN/TAP interfaces which would
get created in the host. The IP addresses passed as command line
arguments should be different from the IP addresses that you plan to
assign to the virtual interfaces in the UML. The following command is shown as an example:
- Once UML is booted, you will need to log in as root.
- Open a terminal
- Then enter the following:
ifconfig
Verify the IP addresses and the interfaces created in UML and if you check the interfaces created in the host, you would see three new virtual interfaces tap0, tap1, and tap2 created with the IP addresses specified in. Now you can try pinging the eth0 interface in UML from the host and if the IP addresses are configured properly, the ping should succeed. You could also try doing an ssh to the eth0 interface IP address in UML from the host. If that succeeds, then you can establish a TCP-session between the host and the UML. - To assign an IP address
for a virtual Interface in UML you can perform the following:
tar -jxvf FedoraCore5-x86-root_fs.bz uml_utilities_20070815.tar.bz2
make ARCH=um
make && make install
./linux ubda=FedoraCore5-x86-root_fs mem=128M
./linux ubda=FedoraCore5-x86-root_fs mem=128M eth0=tuntap,,,10.1.1.5 eth1=tuntap,,,20.1.1.6 eth2=tuntap,,,10.1.1.20
ifconfig eth0 192.168.1.5 up
Troubleshooting
How to test
See step 3 above.
Common problems and fixes
More Information
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net
Added Reading

