dropdown menu


QEMU - AIX on x86

QEMU (Quick EMUlator) is a machine emulator program, which is capable to create VMs with different processor architectures. For example if we want to test a Solaris (with RISC processor) or an HP-UX (with HPPA) or an AIX (with Power processor) QEMU can emulate that processor type and run the specified OS on that. So on Windows or Linux (on x86) with QEMU we can run AIX.

After installing QEMU, we can use a command to create an empty virtual disk and after a VM (with specified RAM and additional devices). If we use an AIX DVD during the boot, AIX will be installed there. (After installation not all AIX commands are available but many things still possible to do.)

Without any prior experience in QEMU, I used these 2 sources:


AIX on Linux

Very important: be patient during this process, things can be (very) slow sometimes.

On Windows I installed VirtualBox and I created a Linux VM (CentOS 8). The plan was that on this linux VM in VirtualBox I will create an AIX VM using QEMU. After CentOS 8 installation completed, I configured network, so I could ssh to my linux server and do these steps:

0. Download AIX DVD 
From IBM ESS site download AIX DVD. I used 7.1 TL5 SP5, DVD1 is enough (710505.iso). Copy  to any directory, I used /root/aix.

1. Install Qemu
I could not find latest qemu package on linux (only version 2 was available, but that did not support latest Power systems), so it had to be compiled from source code:
(I had to install git and other missing things like glib-devel ...)
# git clone git://git.qemu.org/qemu.git   <--it downloads latest source code (automatically creates a qemu dir where I start command)
# cd qemu                                 <--go to qemu dir which was created by git
# mkdir build; cd build                   <--create a build directory and go there
# ../configure                            <--checks if all requirements are OK
# make                                    <--this compiles the source code (it can take long)
# make install                            <--it installs compiled software
# qemu-system-ppc64 --version             <--check if it works correctly
QEMU emulator version 4.2.50 (v4.2.0-2665-g3d0ac34603)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

2. Create a disk file
Go to the AIX DVD dir and create a disk which will be used by AIX
# qemu-img create -f qcow2 hdisk0.qcow2 20G
It will create an empty 20GB qcow2 disk image file, but its initial size is very small, as it is a sparse file. (So we have AIX DVD and this image file in our dir)

3. Create an AIX VM
This command will create an AIX VM with specified settings and boot it from DVD:
# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot cdrom:"

Parameters used:
-cpu: processor type, here POWER8
-machine: machine type, here pseries
-m: memory size, here 2GB
-serial: redirects serial output to specified device
-drive: the disk file we created before
-device: virtio-scsi-pci (not fully sure, but maybe this will create a virt. eth. adapter device)
-device: scs-hd (probably this will create hdisk device)
-cdrom: this is our downloaded AIX DVD which will be used during boot
-prom-env: sets NVRAM variable for PPC and SPARC servers, here a boot-command is used, which points to cdrom (DVD)

AIX boot will take several minutes, sometimes output can hang for 3-5 minutes. If everything is fine, the usual AIX install menu will apper (choose console and english language and default settings during install). The install will take about 2 hours, and disk file size will grow to 2.3GB. The installation process tries to restart AIX automatically after the install completed, but it was hanging, so after some time I did CTRL-C.

4. Fix fsck64 issue in Maintenance mode
fsck fails during boot and boot will hang. A workaround to this issue is to overwrite fsck64 file with exit 0. Boot our new AIX to maintenance moe:
# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot cdrom:"

When the "Welcome to Base Operating System" menu appears:  choose 3 (Start Maintenance Mode) --> 1 (Access a Root VG) -->  0 Continue  --> 1 (VG on hdisk0) --> 1 (Access this VG and start a shell). 

After that we will get a prompt with an environment where filesystems are already mounted:
# cd /sbin/helpers/jfs2    <--go to this location
# > fsck64                 <--delete content of that file
# vi fsck64                <--vi and insert these 2 lines. File is readonly, so save and quit with :w! and :q
exit 0

# cat fsck64               <--it should contain 2 lines (#!/bin/ksh and exit 0)
# sync ; sync              <--write cached memory to disk
# halt                     <--halt AIX

5. Boot from disk
This is the first time AIX will be booted from disk:
# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot disk:"

This boot will take much longer (about 5-10 minutes) as some daemons will fail and it will hang at NFS part until timeout, but we will get a prompt. After that some services will be disabled (so next boots will be faster) and installed ssh from DVD.
Disabling services in inittab:
# rmitab rcnfs
# rmitab cron
# rmitab piobe
# rmitab qdaemon
# rmitab writesrv
# rmitab naudio2
# rmitab naudio
# rmitab aso
# rmitab clcomd
# chrctcp -S -d tftpd

Install ssh and change root pw:
# chfs -a size=+200M /home
# mount -v cdrfs -o ro /dev/cd0 /mnt
# mkdir /home/ssh; cd /mnt/installp/ppc; cp openssh.base openssh.license openssh.man.en_US openssh.msg.en_US /home/ssh; umount /mnt
# cd /home/ssh; installp -acXY -d . all
# passwd root
# halt

After that booting up from disk should be faster.

6. Network setup
I wanted to use ssh on AIX, so network setup was needed. (When I worked in qemu terminal and I did ctrl-c, the whole qemu session (process) was stopped, so I had to boot again the VM, that was another reason to use ssh sessions.) Without knowing linux network virtualization techniques, it was not easy, but found this site, which worked: http://hostrepo.com/article.php?id=193. Basically a network bridge was needed, so network communication could be possible between my Linux and AIX VM. On Linux this network bridge function can be achieved by a TAP (Terminal Access Point) device and with ARP proxy. The following steps are needed each time after Linux is restarted, so these can be put in a script as well. (There are lots of internet sites which shows different other methods.)

current IP on Linux: (enp0s3)
planned IP on AIX: (en0)

On the Linux VM:
# ip tuntap add tap0 mode tap                      <--create tap0 interface ('ifconfig' will not show it, 'ip a' shows state is DOWN)
# ip link set tap0 up                              <--bring up tap0 ineterface ('ifconfig' will show tap0 state is UP)
# echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp  <--enable proxy arp on tap0 (empty file was already there)
# ip route add dev tap0                  <--setup routing for (AIX IP) on tap0 device ('ip route' shows new route)
# arp -Ds enp0s3 pub                     <--broadcast ARP for AIX IP ('yum install net-tools' was needed for arp, netstat commands)

Boot up AIX using tap0 device:
# cd /root/aix
# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot disk:" -net nic,macaddr=56:44:45:30:31:32 -net tap,script=no,ifname=tap0

Then on AIX:
# chdev -l en0 -a netaddr= -a netmask= -a state=up

After that ping and ssh is possible to AIX. AIX IP configuration will survive restarts, but Linux steps are needed each time after Linux VM is rebooted. In future if we want to start AIX in the background without a console this can be used:
# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot disk:" -net nic,macaddr=56:44:45:30:31:32 -net tap,script=no,ifname=tap0 -daemonize

(logout from session, after AIX shutdown is possible using "~~.", same as in HMC console)


AIX on Windows

It is possible to do the same steps (as above) directly on Windows without VirtualBox and a Linux VM. The only difference is that we need to give qemu commands in command prompt (cmd) or in a terminal emulator (like MobaXterm). With these terminals on Windows there could be character problems.

We need to install latest Qemu on Windows: https://www.qemu.org/download/#windows. After install completed, above steps can be  followed, with slight modification in qemu commands:

Create a disk file: 
"C:\Program Files\qemu\qemu-img.exe" create -f qcow2 hdisk0.qcow2 20G

Boot an AIX VM and install AIX from DVD:
"C:\Program Files\qemu\qemu-system-ppc64.exe" -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=dev / 0 0 s\" ibm,aix-diagnostics\" property boot cdrom:\ppc\chrp\bootfile.exe -s verbose" -display vnc=:1

Boot our newly installed VM into Maintenance Mode and fix fsck64:
"C:\Program Files\qemu\qemu-system-ppc64.exe" -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot cdrom:" -display vnc=:1

Boot AIX from disk:
"C:\Program Files\qemu\qemu-system-ppc64.exe" -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom 710505.iso -prom-env "boot-command=boot disk:" -display vnc=:1



  1. Awesome post. Complicated set-up. Congratulations and many thanks!

  2. I am currently using Windows 10.
    Based on my explanation, we are successful in installing aix7.1 in qemu. By the way, installation takes a long time, is it supposed to be like that?

    Since he is Korean, there is a possibility of misunderstanding the conversation by using a translator.

    1. Yes installation takes a long time, I think with QEMU it is normal.

  3. qemu-system-ppc64 -cpu POWER8 \
    > -machine pseries \
    > -m 2048 \
    > -serial stdio \
    > -drive file = hdisk0.qcow2, if = no, id = drive-virtio-disk0 \
    > -device virtio-scsi-pci, id = scsi \
    > -device scsi-hd, drive = drive-virtio-disk0 \
    > -cdrom aix7.2.iso -prom-env "boot-command = boot cdrom :"
    qemu-system-ppc64: -drive file: Could not open 'on': No such file or directory

    I am testing on qemu 5.1.0 version.
    When I type the command as above after creating disk, a message saying that on could not be found appears. The AIX CD is 7.2.

    1. Unfortunately I don't know the answer, but I would try with 4GB memory, and in my example I used if=none and maybe if possible with AIX 7.1 (if I remember right I had also some issue with 7.2)

  4. Replies
    1. Hi, it is not opensource, so my official answer is, that you need to get in contact with IBM.

    2. Be quite and get it from here => https://thepiratebay.org/description.php?id=6943475

  5. got a question please . i get a keymap error for "en-us" when -display vnc=:1 is set any idea howto resolve it ! Thanks !

    1. Probably you can try to change keyboard layout on your windows to en-us, but it is just a guess.

  6. Thanks for your detailed steps. While trying to run the commands I get the below error.

    Attempting to configure device 'sys0'
    Time: 0 LEDS: 0x811
    Invoking /usr/lib/methods/cfgsys_chrp -1 -l sys0
    exec(/bin/sh,-c,/usr/lib/methods/cfgsys_chrp -1 -l sys0){1310762,1245234}
    Number of running methods: 1
    Illegal Trap Instruction Interrupt in Kernel
    058C1ACC tweqi r0,0 r0=0

    Could you please help me to proceed further. I am using Aix 7.1.

    1. Hi please check this link, it may help: https://bugs.launchpad.net/qemu/+bug/1846816

    2. ... or try with a newer AIX image: https://www.ibm.com/support/pages/lpar-wont-boot-power-8-machine

  7. Hi,how can make the aix on windows to be ssh?

    1. Hi, no idea (probably something similar which is described in step 6 for linux).

  8. This comment has been removed by the author.

  9. Hi,
    I am installing it on my CentOS VM and everything is fine, but I need the AIX to be able to connect with other VMs.
    For example :
    CentOS IP:
    AIX on CentOS IP:
    otherVM IP:

    My other WM is not able to conect with AIX, only with CentOS.

    May you help me please?

  10. Just follow the tutorial. I could access other VM in the same subnet but I couldn't goto the internet. Ping was okay.
    AIX IP:
    Host IP:

    Modem router:

    Anyone can help me?

    1. This comment has been removed by the author.

    2. Now I could connect to the internet by mixing the tutorial network script and some from my searching.
      #!/bin/sh -v

      ip tuntap add tap0 mode tap
      ip link set tap0 up
      echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
      ip route add dev tap0
      arp -Ds ens192 pub
      echo 1 > /proc/sys/net/ipv4/ip_forward
      iptables -t nat -A POSTROUTING -o ens192 -j MASQUERADE
      iptables -I FORWARD 1 -i tap0 -j ACCEPT
      iptables -I FORWARD 1 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT

    3. Hi On the sky, I really appreciate that you are sharing your great solution. Thx!

  11. Hi, I'm trying to boot with two hard drives but without success, is there anyone who knows if it's possible ?
    Thank you.

  12. 很棒的网站,干净整洁,非常专业!

  13. When I tried to create an AIX 6.1 or AIX 7.1 qemu with latest qemu version, both hung at "Welcome to AIX" stage.

  14. Found on the terminal window,
    AIX Version 6.1
    Illegal Trap Instruction Interrupt in Kernel
    041E1AB4 tweqi r0,0 r0=0

    same for AIX 7.1

  15. Also QEMU emulator version 4.1.1 (qemu-4.1.1-1.fc31), and QEMU emulator version 6.0.93 gave same result.

    1. There are some hits in Google for Illegal Trap..., which says that you need an updated AIX version to avoid this.

  16. I tried 7.1 and 7.2 in a CentOS 7.8 in VirtualBox, both failed with 'Illegal Trap Instruction Interrupt in Kernel', anyone built it in a Virtual Machine can share or sell? either VirtualBox or VMware are ok

  17. Hi,
    tryed with qemu 6.1.0 and AIX 7.2 TL3 (AIX_v7.2_Install_7200-03-00-1837_DVD_1_of_2_92018.iso)
    but after I see the boot Message the VM stop.
    I build the VM with virt-manager 3.2.0
    because if I run the qemu by hand it is so slow you can see a new charter per 2 seconds

  18. macaddr=56:44:45:30:31:32 , why specify the MACADDR ?

    1. Apparently it was a random MAC Address, but! It worked...

  19. Hello, how to config the network if the qemu hosting on a windows 10 pc

  20. I was able to use these network arguments to connect the VM to my existing bridge interface, allowing it to grab DHCP from my home router and interact without having to set up a tap device each time:

    -net nic,macaddr= -net bridge,id=n1,br=

    1. Ok, well, formatting munged up the commands. Here's the exact example, substitute your own MAC and bridge interface name for the br= option:

      -net nic,macaddr=56:44:45:30:31:32 -net bridge,id=n1,br=br0

  21. Hi, can you pls share virtual box image. I found very difficult to do above process. Thanks in advance

  22. Hi all, if any one installed AIX on Virtual box, can you pls share the image. I am unable to install in my machine. Thanks in advance.