Running MINIX 3 on QEMU and KVM

This page describes the process of installing MINIX 3 on QEMU and KVM.

1. Preliminaries

Please install QEMU or KVM. QEMU and KVM sources can be downloaded from their webpage. If you're running a Linux distribution, you can install QEMU and KVM via the package manager.

2. Virtual Machine Setup

Before you install Minix 3, you will need to create a new virtual machine configuration. The VM configuration specifies the parameters of your Virtual machine, e.g., how much memory you want the VM to use, how big you want the virtual hard disk to be, etc.

Open a terminal, change directory to where you want to create the Hard Disk Image, and write:

# qemu-img create minix.img 2G

This will create a 2GB hard disk image named minix.img, which we will use to install the operating system.

3. Installation

Assuming you have downloaded and decompressed a MINIX 3 ISO image from the download page, you can mount the ISO file:

# qemu -localtime -net user -net nic -m 256 -cdrom minix.iso -hda minix.img -boot d

where minix.iso is the .iso we downloaded earlier(which is mounted as cdrom), minix.img is the disk image we created, and 256 is the amount of memory dedicated to the Virtual Machine. The option -boot d makes sure that we boot from the cdrom.

Then you can follow the normal installation instructions.

When the installation is over, type

shutdown 

to exit Minix.

When you get the fd0> type off in order to shutdown the Virtual Machine.

4. Booting MINIX 3

Now you have installed MINIX 3 on the virtual machine. To boot minix from the virtual disk image, type:

# qemu -localtime -net user -net nic -m 256 -hda minix.img

5. Post-install Configuration

You should read Post Installation for some configuration tips.

6. Known problems

MINIX >= 3.1.3 does not boot on KVM 0.12.2. Use an older version (such as 0.11.x) or plain QEMU without KVM acceleration.

7. Workarounds

For QEMU 0.9.x with MINIX 3 releases before 3.1.4.:

Hit ESC quickly when you see the bootloader offer to boot into MINIX.

If you didn't manage to hit ESC quickly enough, don't worry. Boot into MINIX, ignore any errors related to the network, and shutdown MINIX which will also get you into the bootloader. Assuming you hit ESC right away, your screen will look something like this. Set the qemu_pci=1 option in the bootloader and save it. You need to do this just once.

By default, MINIX 3 will automatically load in 3 seconds.
Press ESC to enter the monitor for special configuration.
Hit a key as follows:
    1  Start MINIX 3
    2  Start Small MINIX 3 (uses less memory)
    3  Start Custom MINIX 3
[ESC]
d0p0s0>qemu_pci=1
d0p0s0>save
d0p0s0>boot

Now you should be able to boot into MINIX 3 installed on your hard disk image and have the network enabled as well.

MinixWiki: UsersGuide/RunningMinixOnQemu (last edited 2010-02-09 19:54:10 by ErikVanDerKouwe)