UML icon
User Mode Linux FAQ

Operating Systems, 32 vs 64-bit, skas, performance

  • Can I run UML on Microsoft Windows, FreeBSD or Solaris? etc
  • No. UML relies on the Linux kernel (it would theoretically be possible to port it to other platforms but this is unlikely to ever happen)
  • Can I run a 32-bit UML kernel on a 64-bit host? 32-bit host?
  • Yes. When compiling on a 64-bit host, use the switch SUBARCH=i386, ie:
    make ARCH=um SUBARCH=i386
  • Can I run a 64-bit UML kernel on a 64-bit host? 32-bit host?
  • You can only run a 64-bit UML kernel on a 64-bit host.
    Note: 64-bit UML kernels do not support 32-bit binaries.
  • Can I use SMP? (more than one CPU)
  • No.
  • What is UML good at?
  • UML can be quite useful for testing, kernel development and debugging, isolating a process, education, etc. (more uses)
    It has been used for virtual hosting in the past, but modern virtualization solutions have supplanted it in this area, see above.
  • How fast is it compared to other virtualization technologies
  • If performance is your primary concern, you should probably use something else.
    Open-source solutions include:
    • QEMU: "QEMU is a generic and open source machine emulator and virtualizer" - actually slower than UML..
    • KVM: accelerated version of QEMU for supported CPUs
    • VirtualBox: originally based on QEMU, has non-free/non-open-source extensions
    • Lguest: "allows you to run multiple copies of the same 32-bit kernel" via a kernel module.
    There are also many more non-free implementations.
  • What is skas? skas3, skas0, tracing thread?
  • UML was originally written with a single tracing thread, this was very slow so the skas3 patch was designed to provide a major speed boost. Unfortunately it was never merged into the mainline kernel and it is no longer supported. All recent kernels support skas0, which is almost as fast.

Usage: gdb, modules, SELinux, disk formats

  • How can I debug with GDB?
    • compile your kernel with DEBUG_INFO and FRAME_POINTER
    • start the process in gdb, or attach to an existing UML process
    • tell gdb to ignore SIGSEGV: handle SIGSEGV noprint nostop pass
    more info
  • Can I run SELinux inside UML
  • Yes
  • Does UML understand VDI or VMDK disks?
  • No. UML works with raw disks, stored as files or even real devices.
    However, it will support all partition formats and filesystem formats that you compiled in.

Common Problems

  • "VFS: Cannot open root device"
  • Ensure you have specified a ubda=root_fs option to the kernel's command line
  • I can't load any modules?
  • You need to copy the modules you compiled into the filesystem image - the easiest way is to loop mount it.
  • The system starts but I never get a login prompt
  • A number of filesystem images have problems running under UML and may not start a shell login. Your options are:
    • Try another image
    • boot with init=/bin/bash (no other process will be started and the root filesystem will still be read-only!)
    • Loop mount the image prior to launching and ensure the network/sshd are configured so you can login via ssh