Site Home Page
The UML Wiki
UML Community Site

UML mini-HOWTOs

Figuring out a UML's UMID (Unique Machine ID)
There are a few ways to do this:
  • Specify it on the UML command line
    umid=my-uml
    
    Then you automatically know what it is. It shouldn't contain slashes ("/") or null characters ("\0").
  • On the host, examine the boot output for a line similar to:
    mconsole (version 2) initialized on /home/jdike/.uml/KFM6Of/mconsole
    
    The umid in this case is KFM6Of.

    Inside the UML, you can run dmesg and look for the mconsole initialization line.

  • Look at your ~/.uml - any subdirectory under that is a umid. If you are running one UML, there should be one subdirectory, and that is your UML's umid.
Choosing an IP for a TUN/TAP interface
Choose an IP address that's part of your local IP range. It can't be in use by another host on the network. However, it can be the same as another of the host's network interfaces. Reusing the IP address from the host eth0 is popular when free IP addresses are in short supply.
Choosing an IP for a UML eth interface
The easiest thing to do is pick a IP that's on your local network and unused anywhere else, including the host. In particular, it must be different from the IP address you gave the host end of the TUN/TAP device.

If you don't have a local network, just a single IP given to you by your ISP, then use an address in the 192.168.x.x or 10.x.x.x ranges.

Installing the uml_utilities on the host
You may already have it - look for /usr/bin/uml_net or /usr/bin/uml_mconsole. If you need humfsify, then the package you have installed is probably not new enough and you should download and install it.

Download this tarball and:

  • Uncompress it
    host% bunzip2 uml_utilities_20060622.tar.bz2 
    
  • Untar it
    host% tar xf uml_utilities_20060622.tar
    
  • Build
    host% cd tools-20060622/
    host% make 
    
  • Install, as root
    host# make install
    
Setting up NAT on the host
Setting up NAT for the benefit of a UML is most often needed when the host is the only machine on your network and the only IP address you use is the one assigned to it by your ISP. In this case, the following command will set up masquerading for the UML, if eth0 is the device that you use to communicate with the Internet.
host# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
If eth0 isn't your connection to the rest of the world, then change the "eth0" accordingly. If you're on a dialup connection, then "ppp0" is likely to be correct.
Hosted at SourceForge Logo