Installing AIX on Qemu!

YES it’s real!

I’m using the Linux subystem on Windows, as it’s easier to build this Qemu tree from source. I’m using Debian, but these steps will work on other systems that use Debian as a base.

First thing first, you need to get your system with the needed pre-requisites to compile:

apt-get update;apt-get upgrade
apt-get install build-essential pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev

Great with those in place, now clone Artyom Tarasenko’s source repository

git clone --branch 40p-20190406-aix-boots --single-branch

Since the frame buffer apparently isn’t quite working just yet, I configure for something more like a text mode build.

./configure --target-list=ppc-softmmu --disable-sdl --disable-vnc --disable-gtk

Now for me, GCC 7 didn’t build the source cleanly. I had to make a change to the file config-host.mak and remove all references to -Werror. Also I removed the sound hooks, as we won’t need them. remove the following lines:


Now you can build Qemu. it’ll happily build in parallel so feel free to build using the -j parameter with how many cores you have. I have 32, so I use

make -j32

Okay, all being well you now have a Qemu. Now following the steps from
Artyom Tarasenko’s blog post, we can get started on the install!

First we create a 8GB disk

qemu-img create -f qcow2 aix-hdd.qcow2 8G

Next we need the custom BIOS with serial as the console.


You’ll need some AIX. I tried a 3.2.5 CD-ROM and it didn’t pick up, but AIX 4.3.3 did.

Now with all those bits in place, it’s time to run Qemu.

./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix-hdd.qcow2 -vga none -nographic -net none -cdrom Volume_1.iso

Now telnet to your localhost on port 4441 and you will see the console doing it’s BIOS initialize and eventually drop to the OK prompt.

One trick I’ve found is that from the Open Firmware prompt you can find out what partitions are recognized from the firmware. If it see’s partitions then there is some hope that the image you have is valid enough to boot. In the last few days I’ve found quite a few AIX images, which are lacking the partition table, and unable to boot.

.partitions cdrom

simply type in boot cdrom:2 to kick off the installer. It may take a minute or so for the installer to kick off.

If all goes well, you’ll see the BIOS reload itself, then after a minute you’ll be prompted to press 1 to select the console

It doesn’t echo, don’t panic!

Next select your language. I’m doing English.

Next it’ll ask about installation type. Default ought to be fine.

Because this will destroy the contents of the disk (which doesn’t matter as it’s blank) it’ll prompt for confirmation.

After this it’ll begin the installation. Depending on how fast your disk & CPU is this will take a while.

For me, the installation took about 11 minutes. This is using my Xeon E5-2667 v2. It took 17 minutes on my 2006 Mac Pro, with X5365’s it .

After it’s done, right around the 96% time it’ll reboot back to the BIOS

Once you are back at the OK prompt, you can now boot disk:

it’ll look like it’s hung for a minute, then it’ll start booting from disk!

Once the OS is booted up, you select the terminal type. I’m using putty but I’ll select the vt100. Of note the function keys are selected by hitting escape and then the number key. So F3 is ESC 3.

I’m just going to finish the install, as we can always run smitty to mess with the system more, but right now I’m just interested in a base install of the BOS (Base Operating System, and IBM ISM).

A few moments later, you’ll get dumped to the login prompt.

By default there is no password, so just login as root, and there you go, your very own virtual AIX 4.3 system.

# uname -a
AIX localhost 3 4 000000004C00

So there you go! All thanks to Artyom’s hard work!

Author: neozeed

I live in SE Asia, doing generic work, enjoying my life & family

24 thoughts on “Installing AIX on Qemu!”

  1. AIX 4.1 was the first version to support PCI, which was the bus type starting with the PowerPC range. Version 3.2 and older require Micro Channel.

    It’s interesting that 4.1 installs directly. Chris Gibson at IBM wrote an article on how to get AIX 7.2 running under QEMU but this requires restoring a mksysb image so you need to already have an AIX LPAR running from where you can collect a mksysb backup.

    1. I think the dump images I found for 4.1 are missing something as the partition table isn’t recognized. That said I remember having a 4.1 iso I could install on both a 43p, and power based 5xx machines.

      1. I’ve got a 7011-250, but I’ve never tried any AIX 3.x on it, and 4.3.3 is pretty glacial. Unfortunately, my fast Ethernet card and sound card aren’t supported in 3.x so I guess I’m stuck with it. Might be fun to mess with though, provided I can find install media.

    1. Its because AIX would display an error code on the hardware LCD display, which Sun hardware did not have. I wrote a clock program that displayed current time on the LCD. Lets just say IBM service technicians did not approve.

    1. mount an aix4 installer .iso install image, mount it with appropriate fs specitication when invoking mount, and then find some binaries and “file” them from your favourite host system – if neozeed remained unreachable 🙂

    2. If AIX has ELF it must be something much later, as I recall it always being COFF.

      # file /bin/sh
      /bin/sh:        executable (RISC System/6000) or object module

      I know this isn’t what you are looking for.

  2. Oooh, thanks for the QEMU hacks Artyom and thanks for the find Jason.

    I started working with this in the mid to late 90s on Bull DPX/20s (think drawer cabinet with a block of concrete at the bottom). I bootstrapped Samba on it to manage classrooms with NT4 workstations. It hosted ghost images, $HOME to H:\, web pages (via~/public_html), shell accounts with mail, JDK, C-compilers. It ran Oracle instances and a GCOS 6 emulators too while that poor windows server was sulking in a corner trying not to blue-screen whilst playing BDC.

    My current shop tossed the AIX blades for RedHat VMs a few years ago and damn I miss that OS. What is it with AIX that grows on you? The 400+ day uptimes despite patches? The perfect blend of SYSV and BSD? The Rockwell grade of closed source? The absence of Bostic and Stallman’s smelly socks? The admins it attracts? I don’t know.

    Probably have to network it over serial, but I’ll give 4.3 a spin. Thanks again.

    1. I got my start on version 3.2(1) on the POWER 520 in college. It was the first time I saw an actual class on learning UNIX as a user, and it was super valuable. During the class I was on one of my local BBS and found this weird thing called SLS Linux. It took about a week to download enough @ 2400 baud to get enough where I could bootstrap it.

      The price gulf between consumer 32bit machines (which were still pretty expensive!) and the RISC machines of the day was just so incredibly high. Not to mention the incredible expense of getting your own UNIX @home was just insurmountable to me. If I’d known 386BSD was a thing I’d have used that, but I don’t recall a single peep about it on usenet. For better or worse groups stayed on topic pretty well, so you would learn new things about something, but not necessarily learn about new things.

      But AIX was the first real Unix I messed around with for real. Even though in highschool we did have that QNX garbage network on the Unisys ICONs, but I didn’t have any books or resources on Unix, nor did the teachers have any idea how to really use the stuff. Sadly back in the 80’s if it wasn’t in the library it was like being SOL as I just didn’t know enough to order stuff I didn’t know about. Electronic card catalogs just didn’t exist, and I couldn’t order stuff that I just didn’t know about. I really should have paid the $99 and mail ordered coherent, but I was brought up to distrust mail-order stuff. So stupid.

      the AMD PCnet driver will load on 4.1.5 but as soon as I try to telnet in, it’ll lock Qemu up hard. I’ll have to build it on a native Linux machine to see if it’s Qemu or what. I tried the following flags:

      ./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix0.vmdk -vga none -nographic -L pc-bios -net nic,model=pcnet -net user,hostfwd=tcp::42323-:23


      ./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix0.vmdk -vga none -nographic -L pc-bios -netdev user,id=ethernet.0,hostfwd=tcp::42323-:23 -device pcnet,netdev=ethernet.0

      Oh well.

      1. I think it’s a hostfwd bug. I hit it a couple of times with qemu-system-sparc, but had no reliable way to reproduce. Usually it worked like months with no problems. Would be cool if you could make a bug report for it (maybe it’s easier to wait till my patches are accepted in the upstream first though).

        The workaround would be a ssh reverse tunnel. You gonna need the ssh client for AIX 4.3.3 though. Don’t know if there is one compatible with the current servers.

        BTW, why are you using vmdk? qcow2 has compression and snapshots. Does vmdk have any advantages for non x86 guests?

        1. VMDK will slip into VMWare okay. I always wanted to see if those JFS patches for Linux could actually read a disk from an RS/6000. I suspect the answer is no, but it seemed easier to to use VMDK.

          I think it was somewhere in the 0.9-1.0 days that qcow2 broke stuff badly, but I’ve been gunshy on that one for years now….

          I noticed that outbound seemed okay, but as soon as I went to go in, it went off the rails.

          I have that GNAT GCC thing somewhere, I guess I can go through the motions and build a gcc 2.something chain. pass1 is fine by me.

            1. It’s more so a call back to sing ADA to fix your system…, where I had re-created the painful steps of getting a bare bones GCC to a RS/6000 over dialup when I was in college, to get something kicked off on the SUN/SPARC emulation in Qemu.

              I’m always glad when people make binaries (along with sources/patches) available as this stuff does tend to fall off the face of the earth once people decide it’s all garbage. I just recently found the patches to GAS to generate COFF objects, and the Xenix patches for GCC 1.x, which is another source of frustration in the open source past obliteration efforts.

              Speaking of.. there is a lot of gems on this CD-ROM, although they are naturally missing all the big stuff like GCC gnu libs, G++, etc etc.

    1. Nice blog! I see we have some overlap which is always a good thing.

      I need to update all the gunkies stuff. SIMH 4.0 is never going to really happen…

  3. 0821-510 ifconfig: error calling entry point for /usr/lib/drivers/if_en: Cannot establish a connection to a remote service.
    I tried to make the network adaptor work, but got the message, any idea?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.