Archive

Qemu Use Cases

This page describes some of the ways in which a QEMU virtual machine can be used.

Test Linux Upgrade

I have a laptop running Ubuntu Breezy. I’d like to have a look at what’s coming in the next release, but I don’t want to upgrade my laptop and potentially break it, and I don’t want to dedicate a whole machine to running the new release. With QEMU I can run Linux in a virtual machine and take a copy of the disk image file before performing the normal upgrade process. If the upgrade goes well – well enough [continued…]

Qemu Emulation

Qemu is a generic and open source processor emulator and has two operating modes:

  • Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including a processor and various peripherials. It can be used to launch different Operating Systems without rebooting the PC or to debug system code. Full system emulation is available for x86, PowerPC, Sparc32, Sparc64 with MIPS currently under development.
  • User mode emulation (Linux host only). In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU.
  • Note that QEMU has recently been updated from 0.7.2 to 0.8.0. [continued…]

    Qemu And Windows XP

    Getting Started

    The first thing we need is a virtual hard disk to install Windows XP onto. It’s a good idea to create a dedicated directory for your hard disk images. This can be anywhere – a separate partition is advisable if you have a large number of virtual machines though. This example creates a dedicated directory on the root of the filesystem, the ‘/vm’ directory.

    $ sudo mkdir /vm $ sudo chown username:group /vm $ cd /vm

    Creating a disk image

    The command below creates a compressed disk image will has a maximum capacity of 8GB. Therefore, if you [continued…]

    Qemu And VNC

    Qemu and VNC

    A very nice feature of qemu is using it with a VNC server on the host machine. What can you do with it? You can basically run qemu “inside” a VNC server and then control that virtual machine from anywhere (your LAN, your Internet connection).

    The instructions below were tested on qemu version 0.7.2-1 (Debian) with vnc4server version 4.0-8 (Debian).

    How?

    On the host machine (where you run qemu from) open an xterm and run the following:

    vnc4passwd vnc4server :1 -geometry 800x600 -alwaysshared -depth 16 export DISPLAY=:1.0

    Now in the same xterm [continued…]

    Qemu And Free BSD

    Qemu and FreeBSD

    When I was trying to get FreeBSD to work under Qemu, I kept having a problem with the disk partitioning. The disk would always be 0Mb and of course FreeBSD didn’t like this.

    The reason for this was because I was using qemu-img to create the virtual hard drive for FreeBSD. The solution was to use dd’ to create a file full of zeros (/dev/zero`) that was the size that I wanted the virtual hard drive (for example 5Gb).

    After doing this and pointing qemu to the 5Gb file I’d [continued…]

    Updating Grub

    If you are using Debian, please read “The Debian Way”, at the bottom

    This is initially aimed at those new to Linux, who have decided to update their kernel from the stock one that came with their distribution.

    Installing a kernel is described in KernelBuilding but once that is done, grub.conf needs editing so that it’s possible to boot your new kernel.

    grub.conf needs to point to two separate places to be able to run your new kernel.

    When making your kernel, the image is created, previously this has been bzImage, which gets saved [continued…]

    What Is DNS

    What is DNS?

    DNS problems are blamed for many of the Internet’s problems, yet many people don’t really understand what DNS is.

    DNS is really, really simple. It’s a way to change human-readable domain names (like “google.com”) into machine-readable addresses (like 216.239.57.99).

    The DNS hierarchy

    The nice, trite statement above sounds all too easy, until you get down to working out how to do it. How can a system work for every domain in the world without excessively loading the infrastructure, and cope with random failures? The trick is to get many computers (called “name servers”) [continued…]