Installation and Configuration of User-Mode Linux (UML)
This article describes how to setup and configure User-Mode Linux in Fedora Core 6. 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 6
Requirements
- You will need a computer running Fedora Core with an active internet connection configured .
- You will need the package User-Mode Linux on your FC system. This package can be downloaded from the User-Mode Linux 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.
- 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 images 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:
bunzip2 linux-2.6.22-rc2 FedoraCore5-x86-root_fs.bz
./linux-2.6.22-rc2 ubda=FedoraCore5-x86-root_fs mem=128M
./linux-2.6.22-rc2 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

