0% found this document useful (0 votes)
166 views

AIX QEMU Blog

The document details the steps taken to install AIX 7.2 in a QEMU virtual machine on a MacBook Pro running macOS. It involves creating an mksysb backup of an AIX system on IBM Power hardware, converting it to an ISO, copying the ISO to the MacBook and using QEMU to boot from the ISO and install to a virtual disk. Some post-installation steps are also described.

Uploaded by

Aissam Lorak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

AIX QEMU Blog

The document details the steps taken to install AIX 7.2 in a QEMU virtual machine on a MacBook Pro running macOS. It involves creating an mksysb backup of an AIX system on IBM Power hardware, converting it to an ISO, copying the ISO to the MacBook and using QEMU to boot from the ISO and install to a virtual disk. Some post-installation steps are also described.

Uploaded by

Aissam Lorak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

After reading this https://worthdoingbadly.

com/aixqemu and this


https://lists.gnu.org/archive/html/qemu-ppc/2018-05/msg00387.html, I was inspired and
very curious. Could I get AIX 7.2 running on QEMU on my MacBook Pro (running Mac OS X
10.13.6)?

Well, the answer my friends, is yes...sort of.

Many thanks to Rob McNelly who originally tweeted this link,


https://worthdoingbadly.com/aixqemu. If he had not, I would never have made the journey
to QEMU land. So thanks Rob!

Also, thanks to Liang Guo for his assistance. Your guidance was greatly appreciated.

Note: What I describe here is NOT supported by IBM. It is purely a lab experiment to see
what was possible with qemu-system-ppc64.

If you want to follow along at home, please follow and test the steps outlined here,
https://worthdoingbadly.com/aixqemu, first. If this works then you should be good to go
with the rest of this article.

I've never used QEMU until now. So all of this is very new to me. I'm still learning, so if you
see something wrong with my instructions. Sorry. I'll do better next time.

The first thing you need to do, is install AIX 7.2 in a Logical Partition (LPAR VM), on a Power
system, somewhere. If you don't have an IBM Power System of your own, you could try
using the https://www.ibm.com/partnerworld/page/stg_com_sys_power-development-
platform. I recommend using AIX 7.2 TL3 SP1 for this experiment. My source LPAR was
running 7200-03-01 on POWER8. Once you have an AIX system that you can use, follow
each of the steps outlined below.

1. Create mksysb image of the source AIX system.

AIXlpar# mksysb -i /nim/mksysb/AIXhost-mksysb

Creating information file (/image.data) for rootvg.

Creating list of files to back up.

Backing up 93071 files.......

93071 of 93071 files (100%)


0512-038 mksysb: Backup Completed Successfully.
2. Create ISO image from the mksysb image created in step 1.

AIXlpar# mkdvd -S -I /nim/mksysb -m /nim/mksysb/AIXlpar-mksysb


Initializing mkdvd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
Creating temporary file system: /mkcd/cd_fs...
Populating the CD or DVD file system...
Building chrp boot image...
Copying backup to the CD or DVD file system...
..
Creating Rock Ridge format image: /nim/mksysb/cd_image_20119974
Running mkisofs ...
.
mkrr_fs was successful.

Making the CD or DVD image bootable...

Removing temporary file system: /mkcd/cd_fs...


#

# ls -ltr
total 43709952
-rw-r--r-- 1 root system 2905600000 Oct 08 08:38 AIXlpar-mksysb
-rw-r--r-- 1 root system 3022819328 Oct 08 08:41 cd_image_20119974
# mv cd_image_20119974 AIX72.iso
# ls -ltr
total 43709952
-rw-r--r-- 1 root system 2905600000 Oct 08 08:38 AIXlpar-mksysb
-rw-r--r-- 1 root system 3022819328 Oct 08 08:41 AIX72.iso

3. Copy the ISO image to your MacBook.

$ scp AIXlpar:/nim/mksysb/AIX72.iso .

4. Assuming that QEMU is installed on your Mac, create a qcow2 disk image. Now you
have two files, 1) AIX72.iso (which is the mksysb ISO of your AIX VM from your Power
system) and 2) AIX72.img, which will be used to install (restore) the mksysb ISO image in
the QEMU environment; this is your install hdisk device for rootvg.

$ qemu-img create -f qcow2 AIX72.img 100G


Formatting 'AIX72.img', fmt=qcow2 size=107374182400 cluster_size=65536
lazy_refcounts=off refcount_bits=16

$ qemu-img info AIX72.img


image: AIX72.img
file format: qcow2
virtual size: 100G (107374182400 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false

5. Boot from the ISO image (AIX72.iso) and install AIX into the QEMU disk image
(AIX72.img). The ‘boot cdrom: -s verbose’ option, will start the VM and boot from the
virtual CD device (in this case the ISO image we created). The verbose option is really only
required if you are curious as to what is happening during the boot and installation steps.
BE PATIENT! It will take several mintues for the VM to boot.
Note: There is a lot of output when verbose boot is enabled. I have trimmed the output
shown (in this article) to make it easier to read.

Once the BOS installation menu appears, you can “follow the bouncing ball” and complete
the mksysb restore to hdisk0. If you’ve ever installed AIX in the past, you’ll be very familiar
with this process.

$ qemu-system-ppc64 -cpu POWER9 -machine pseries -m 2048 -serial mon:stdio \


-drive file=AIX72.img,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 \
-cdrom AIX72.iso \
-prom-env boot-command='boot cdrom: -s verbose'

SLOF **********************************************************************
QEMU Starting
Build Date = Jun 21 2018 19:08:08
FW Version = git-7d37babcfa48a6eb
Press "s" to enter Open Firmware.

Populating /vdevice methods


Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
8200000000000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"
Populating /pci@800000020000000
00 0000 (D) : 1234 1111 qemu vga
00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]
00 1000 (D) : 1af4 1004 virtio [ scsi ]
Populating /pci@800000020000000/scsi@2
SCSI: Looking for devices
100000000000000 DISK : "QEMU QEMU HARDDISK 2.5+"
Installing QEMU fb

Scanning USB
XHCI: Initializing
USB Keyboard
USB mouse
No console specified using screen & keyboard

Welcome to Open Firmware

Copyright (c) 2004, 2017 IBM Corporation All rights reserved.


This program and the accompanying materials are made available
under the terms of the BSD License available at
http://www.opensource.org/licenses/bsd-license.php

Trying to load: -s verbose from: /vdevice/v-scsi@71000003/disk@8200000000000000:


... Successfully loaded

AIX
...etc...
AIX Version 7.2
exec(/etc/init){1,0}

INIT: EXECUTING /sbin/rc.boot 1


exec(/usr/bin/sh,-c,/sbin/rc.boot 1){917792,1}
exec(/sbin/rc.boot,/sbin/rc.boot,1){917792,1}
+ PHASE=1
+ + bootinfo -p
exec(/usr/sbin/bootinfo,-p){983330,917792}
PLATFORM=chrp
...
----------------
Time: 0 LEDS: 0x538
Invoking top level program -- "/usr/lib/methods/cfgrule_vrtcore"
exec(/bin/sh,-c,/usr/lib/methods/cfgrule_vrtcore ){1048868,983342}
exec(/usr/lib/methods/cfgrule_vrtcore){1048868,983342}
....etc...

******* Please define the System Console. *******

Type a 1 and press Enter to use this terminal as the


system console.
...etc...

>>> 1 Type 1 and press Enter to have English during install.


...etc...

>>> Choice [1]:1

Error Warning << Note: You can ignore this warning message...

An invalid disk (42-T1-01) was specified in the


location field of the data file.

To reboot the system, press reset.

>>> 1 Continue with Install


...etc...

>>> Choice [1]: 1

Welcome to Base Operating System


Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Make Additional Disks Available

5 Select Storage Adapters

88 Help ?
99 Previous Menu

>>> Choice [1]:2

System Backup Installation and Settings

Either type 0 and press Enter to install with the current settings, or type the
number of the setting you want to change and press Enter.

Setting: Current Choice(s):

1 Disk(s) where you want to install ...... hdisk0


Use Maps............................. No
2 Shrink File Systems..................... No
3 Import User Volume Groups............... No
4 Recover Devices......................... No

>>> 0 Install with the settings listed above.


+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [0]: 0

6. With AIX installed, boot from the ISO image again (‘boot cdrom:’), enter maintenance
mode and edit the /sbin/helpers/jfs2/fsck64 file. You’ll need to replace the command
with a script that simply exits with a zero return code. When you are done, run ‘sync;sync’
and halt the VM.

$ qemu-system-ppc64 -cpu POWER9 -machine pseries -m 2048 -serial mon:stdio \


-drive file=AIX72.img,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 \
-cdrom AIX72.iso \
-prom-env boot-command='boot cdrom:'
...etc...
Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Make Additional Disks Available

5 Select Storage Adapters

88 Help ?
99 Previous Menu

>>> Choice [1]:3

Maintenance

Type the number of your choice and press Enter.

>>> 1 Access a Root Volume Group


2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
5 Configure Network Disks (iSCSI)
6 Select Storage Adapters
7 Install from a System Backup

>>> Choice [1]: 1

Warning:

If you choose to access a root volume group, you will not be able to return
to the Base Operating System Installation menus without rebooting.
Type the number of your choice and press Enter.

0 Continue

88 Help ?
>>> 99 Previous Menu

>>> Choice [99]:0

Access a Root Volume Group

Type the number for a volume group to display the logical volume information
and press Enter.

1) Volume Group 000000000000000000000166344f68a5 contains these disks:


hdisk0 102400 00-10

Choice: 1

Volume Group Information

------------------------------------------------------------------------------
Volume Group ID 000000000000000000000166344f68a5 includes the following
logical volumes:

hd5 hd6 hd8 hd4 hd2 hd9var


hd3 hd1 hd10opt hd11admin lg_dumplv livedump

------------------------------------------------------------------------------

Type the number of your choice and press Enter.

1) Access this Volume Group and start a shell


2) Access this Volume Group and start a shell before mounting filesystems

99) Previous Menu

Choice [99]: 1
Importing Volume Group...
...etc...
Filesystems mounted for maintenance work.
# cd /sbin/helpers/jfs2
# >fsck64
# vi fsck64
#!/bin/ksh
exit 0
:w!
# ls -ltr | grep fsck64
-r-xr-xr-x 1 root system 18 Oct 3 05:25 fsck64
# cat fsck64
#!/bin/ksh
exit 0
#
# sync ; sync
# halt

....Halt completed....
cgibson@xwing : ~/Downloads/POWER/aix/AIX72 $
7. Boot from the disk image (AIX72.img, ‘boot disk:’). Don't used the verbose option
(unless you need to). This will boot the VM directly from your AIX hdisk device
(AIX72.img). BE PATIENT!

$ qemu-system-ppc64 -cpu POWER9 -machine pseries -m 2048 -serial mon:stdio \


-drive file=aix72.img,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 \
-cdrom aix72.iso \
-prom-env boot-command='boot disk:'

SLOF **********************************************************************
QEMU Starting
Build Date = Jun 21 2018 19:08:08
FW Version = git-7d37babcfa48a6eb
Press "s" to enter Open Firmware.

Populating /vdevice methods


Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
8200000000000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"
Populating /pci@800000020000000
00 0000 (D) : 1234 1111 qemu vga
00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]
00 1000 (D) : 1af4 1004 virtio [ scsi ]
Populating /pci@800000020000000/scsi@2
SCSI: Looking for devices
100000000000000 DISK : "QEMU QEMU HARDDISK 2.5+"
...etc...

Trying to load: from: /pci@800000020000000/scsi@2/disk@100000000000000: ...


Successfully loaded
....etc...
Saving Base Customize Data to boot disk
Starting the sync daemon
Starting the error daemon

System initialization completed.


TE=OFF
CHKEXEC=OFF
CHKSHLIB=OFF
CHKSCRIPT=OFF
CHKKERNEXT=OFF
STOP_UNTRUSTD=OFF
STOP_ON_CHKFAIL=OFF
LOCK_KERN_POLICIES=OFF
TSD_FILES_LOCK=OFF
TSD_LOCK=OFF
TEP=OFF
TLP=OFF
Successfully updated the Kernel Authorization Table.
Successfully updated the Kernel Role Table.
Successfully updated the Kernel Command Table.
Successfully updated the Kernel Device Table.
Successfully updated the Kernel Object Domain Table.
Successfully updated the Kernel Domains Table.
Successfully updated the Kernel RBAC log level.
Successfully updated the Kernel RBAC log level.
OPERATIONAL MODE Security Flags
ROOT : ENABLED
TRACEAUTH : DISABLED
System runtime mode is now OPERATIONAL MODE.
Setting tunable parameters...
Starting Multi-user Initialization
Performing auto-varyon of Volume Groups
Activating all paging spaces
0517-075 swapon: Paging device /dev/hd6 is already active.
Performing all automatic mounts
Multi-user initialization completed
...etc...

AIX Version 7
Copyright IBM Corporation, 1982, 2018.
Console login:

8. AIX will eventually boot to a login prompt (console tty).

AIX Version 7
Copyright IBM Corporation, 1982, 2018.
Console login:

9. At this point you should be able to login to the VM.

AIX Version 7
Copyright IBM Corporation, 1982, 2018.
Console login: root
root's Password:
*******************************************************************************
* *
* *
* Welcome to AIX Version 7.2! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
Last unsuccessful login: Wed Oct 3 18:38:16 AEST 2018 on /dev/vty0 from localhost
Last login: Fri Oct 5 13:35:42 AEST 2018 on /dev/vty0

#
# chdev -l inet0 -a hostname=aix_on_mac

10. I had to remove/disable a bunch of services, to make the VM usable.

# rmitab mbverify
# rmitab phauiserver
# rmitab pfcdaemon
# rmitab diagd
# rmitab artex
# rmitab clcomd
# rmitab xmdaily
# rmitab nim
# rmitab cron
# rmitab rcnfs
# rmitab writesrv
# rmitab qdaemon
# rmitab wparpcmsrv
# rmitab aso
# rmitab naudio2

# chrctcp -S -d tftpd

# lsitab -a
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | /usr/bin/alog -tboot > /dev/console #
Power Failure Detection
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
securityboot:2:bootwait:/etc/rc.security.boot > /dev/console 2>&1
rc:23456789:wait:/etc/rc 2>&1 | /usr/bin/alog -tboot > /dev/console # Multi-User
checks
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rctmiscsi:23456789:wait:/etc/rc.tmiscsi > /dev/console 2>&1
rckrb5:2:wait:/etc/rc.krb5 > /dev/console 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | /usr/bin/alog -tboot > /dev/console
# run /etc/firstboot
clusterconf:23456789:once:/usr/sbin/clusterconf
piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1 # pb cleanup
cons:0123456789:respawn:/usr/sbin/getty /dev/console
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
trustedboot:2:wait:/etc/rc.trustedboot > /dev/console 2>&1 # Get trusted log and
start TCSD
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
rcwpars:2:once:/etc/rc.wpars > /dev/console 2>&1 # Corrals autostart
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
perfstat:2:once:/usr/lib/perf/libperfstat_updt_dictionary >/dev/console 2>&1
ha_star:h2:off:/etc/rc.ha_star >/dev/console 2>&1
pmperfrec:2:once:/var/perf/pm/bin/config_pm_ext.sh -P yes
ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /var/ct/ctrmc-inittab.err 2>&1

aix_on_mac:/ # lssrc -a | grep active


clcomd caa 3604796 active
sshd ssh 4850090 active
ctrmc rsct 5177646 active
pmperfrec 4653482 active
IBM.HostRM rsct_rm 5767458 active
IBM.ConfigRM rsct_rm 5243314 active
IBM.DRM rsct_rm 5374386 active
IBM.MgmtDomainRM rsct_rm 4063670 active
IBM.ServiceRM rsct_rm 5439970 active

At this point, you now have an AIX VM running on QEMU. You can now enter familiar AIX
commands and explore the environment.
aix_on_mac:/ # oslevel -s
7200-03-01-1838

aix_on_mac:/ # uname -L
0 aix_on_kvm

aix_on_mac:/ # lparstat -i
Node Name : aix_on_mac
Partition Name : aix_on_kvm
Partition Number : 0
Type : Shared
Mode : Capped
Entitled Capacity : 1.00
Partition Group-ID : 1
Shared Pool ID : 1
Online Virtual CPUs : 1
Maximum Virtual CPUs : 1
Minimum Virtual CPUs : 1
Online Memory : 2048 MB
Maximum Memory : 2048 MB
Minimum Memory : 2048 MB
Variable Capacity Weight : 128
Minimum Capacity : 1.00
Maximum Capacity : 1.00
Capacity Increment : 1.00
Maximum Physical CPUs in system : 1
Active Physical CPUs in system : 1
Active CPUs in Pool : 1
Shared Physical CPUs in system : -
Maximum Capacity of Pool : -
Entitled Capacity of Pool : -
Unallocated Capacity : 0.00
Physical CPU Percentage : 100.00%
Unallocated Weight : 0
Memory Mode : Dedicated
Total I/O Memory Entitlement : -
Variable Memory Capacity Weight : -
Memory Pool ID : -
Physical Memory in the Pool : -
Hypervisor Page Size : -
Unallocated Variable Memory Capacity Weight: -
Unallocated I/O Memory entitlement : -
Memory Group ID of LPAR : -
Desired Virtual CPUs : 1
Desired Memory : 2048 MB
Desired Variable Capacity Weight : 128
Desired Capacity : 1.00
Target Memory Expansion Factor : -
Target Memory Expansion Size : -
Power Saving Mode : -
Sub Processor Mode : -

aix_on_mac:/ # prtconf
System Model: IBM pSeries (emulated by qemu)
Machine Serial Number: Not Available
Processor Type: PowerPC_POWER9
Processor Implementation Mode: POWER 9
Processor Version: PV_9_Compat
Number Of Processors: 1
Processor Clock Speed: 1000 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 0 aix_on_kvm
Memory Size: 2048 MB
Good Memory Size: 2048 MB
Platform Firmware level: Not Available
Firmware Version: SLOF,aik
Console Login: enable
Auto Restart: true
Full Core: false
NX Crypto Acceleration: Not Capable

Network Information
Host Name: aix_on_mac
IP Address: 10.1.1.10
Sub Netmask: 255.255.255.0
Gateway:
Name Server:
Domain Name:

Paging Space Information


Total Paging Space: 512MB
Percent Used: 1%

Volume Groups Information


==============================================================================
Active VGs
==============================================================================
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 799 710 159..146..85..160..160
==============================================================================

INSTALLED RESOURCE LIST

The following resources are installed on the machine.


+/- = Added or deleted from Resource List.
* = Diagnostic support not available.

Model Architecture: chrp


Model Implementation: Uni-Processor, PCI bus

+ sys0 System Object


+ sysplanar0 System Planar
* vio0 Virtual I/O Bus
* vscsi0 Virtual SCSI Client
Adapter
* cd0 Virtual SCSI Optical
Served by VIO Server
* ent0 Virtual I/O Ethernet
Adapter (l-lan)
* vsa0 LPAR Virtual Serial
Adapter
* vty0 Asynchronous Terminal
* pci0 PCI Bus
* scsi0 qemu_virtio-scsi-pci:0000:00:02.0 Virtio SCSI Client
Adapter (f41a0800)
* hdisk0 qemu_virtio-scsi-pci:0000:00:02.0-LW_0 MPIO Other Virtio SCSI
Disk Drive
+ L2cache0 L2 Cache
+ mem0 Memory
+ proc0 Processor

aix_on_mac:/ # df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2883584 2328520 20% 15047 6% /
/dev/hd2 6291456 1794272 72% 57149 22% /usr
/dev/hd9var 2621440 1686568 36% 4234 3% /var
/dev/hd3 4456448 4182992 7% 1083 1% /tmp
/dev/hd1 262144 260680 1% 21 1% /home
/dev/hd11admin 262144 261416 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 2359296 807288 66% 12416 13% /opt
/dev/livedump 524288 523552 1% 4 1% /var/adm/ras/livedump

aix_on_mac:/ # lsvg
rootvg

aix_on_mac:/ # lspv
hdisk0 00000000344f6122 rootvg active

aix_on_mac:/ # lsvg -l rootvg


rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 4 4 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 11 11 1 open/syncd /
hd2 jfs2 24 24 1 open/syncd /usr
hd9var jfs2 10 10 1 open/syncd /var
hd3 jfs2 17 17 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 9 9 1 open/syncd /opt
hd11admin jfs2 1 1 1 open/syncd /admin
lg_dumplv sysdump 8 8 1 open/syncd N/A
livedump jfs2 2 2 1 open/syncd
/var/adm/ras/livedump

aix_on_mac:/ # lscfg -vp


INSTALLED RESOURCE LIST WITH VPD

The following resources are installed on your machine.

Model Architecture: chrp


Model Implementation: Uni-Processor, PCI bus

sys0 System Object


sysplanar0 System Planar
vio0 Virtual I/O Bus
vscsi0 Virtual SCSI Client
Adapter
cd0 Virtual SCSI Optical
Served by VIO Server
ent0 Virtual I/O Ethernet
Adapter (l-lan)

Network Address.............525400123456
Displayable Message.........Virtual I/O Ethernet Adapter (l-lan)

vsa0 LPAR Virtual Serial


Adapter
vty0 Asynchronous Terminal
pci0 PCI Bus
scsi0 qemu_virtio-scsi-pci:0000:00:02.0 Virtio SCSI Client
Adapter (f41a0800)

Hardware Location Code......qemu_virtio-scsi-pci:0000:00:02.0

hdisk0 qemu_virtio-scsi-pci:0000:00:02.0-LW_0 MPIO Other Virtio SCSI


Disk Drive

Manufacturer................QEMU
Machine Type and Model......QEMU HARDDISK
Part Number.................
ROS Level and ID............322E352B
Serial Number...............
EC Level....................
FRU Number..................
Device Specific.(Z0)........00000512FA000012
Device Specific.(Z1)........
Device Specific.(Z2)........
Device Specific.(Z3)........
Device Specific.(Z4)........
Device Specific.(Z5)........
Device Specific.(Z6)........

L2cache0 L2 Cache
mem0 Memory
proc0 Processor

PLATFORM SPECIFIC

Name: /
Model: IBM pSeries (emulated by qemu)
Node: /
Device Type: chrp

Name: openprom
Model: SLOF,aik
Node: openprom

Name: vga
Node: vga@0
Device Type: display
Physical Location: qemu_VGA:0000:00:00.0

Name: usb
Node: usb@1
Device Type: xhci
Physical Location: qemu_nec-usb-xhci:0000:00:01.0

Name: scsi
Node: scsi@2
Physical Location: qemu_virtio-scsi-pci:0000:00:02.0
aix_on_mac:/ #

aix_on_mac:/opt/freeware/packages # date
Mon Oct 8 10:56:55 AEDT 2018

aix_on_mac:/ # uptime
10:57AM up 24 mins, 1 user, load average: 1.72, 1.76, 1.54

aix_on_mac:/ # nmon
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ------------------------------ │
│ N N M M OOOO N N For online help type: h │
│ NN N MM MM O O NN N For command line option help: │
│ N N N M MM M O O N N N quick-hint nmon -? │
│ N N N M M O O N N N full-details nmon -h │
│ N NN M M O O N NN To start nmon the same way every time? │
│ N N M M OOOO N N set NMON ksh variable, for example: │
│ ------------------------------ export NMON=cmt │
│ TOPAS_NMON │
│ 1 - CPU currently │
│ 1 - CPU configured │
│ 1000 - MHz CPU clock rate │
│ PowerPC_POWER9 - Processor │
│ 64 bit - Hardware │
│ 64 bit - Kernel │
│ 0,aix_on_kvm - Logical Partition │
│ 7.2.3.1 TL03 - AIX Kernel Version │
│ aix_on_mac - Hostname │
│ aix_on_mac - Node/WPAR Name │
│ 000000 - Serial Number │
│ IBM pSeries (emulated by qemu) - Machine Type │
│ │

aix_on_mac:/ # topas

Topas Monitor for host:aix_on_mac EVENTS/QUEUES FILE/TTY


Mon Oct 8 11:00:58 2018 Interval:2 Cswitch 78 Readch 0
747 Syscall 98 Writech 219
CPU User% Kern% Wait% Idle% Physc Entc% Reads 0 Rawin 0
Total 0.4 8.2 0.0 91.4 1.00 100.20 Writes 0 Ttyout 219
Forks 0 Igets 0
12twork BPS I-Pkts O-Pkts B-In B-Out Execs 0 Namei 11
Total 0 0 0 0 0 Runqueue 2.00 Dirblk 0
Waitqueue 0.0
Disk Busy% BPS TPS B-Read B-Writ MEMORY
Total 0.0 0 0 0 0 PAGING Real,MB 2048
0 Faults 0 % Comp 26
FileSystem BPS TPS B-Read B-Writ Steals 0 % Noncomp 13
Total 0 0 0 0 PgspIn 0 % Client 13
PgspOut 0
0ame PID CPU% PgSp Owner PageIn 1 PAGING SPACE
topas 5046588 1.7 1.79M root PageOut 0 Size,MB 512
5il 721178 0.4 124K root Sios 0 % Used 1
3ock_rcv 2556252 0.4 60.0K root % Free 99
sec_rcv 2687318 0.3 60.0K root NFS (calls/sec)
clcomd 4522472 0.2 1.69M root SerV2 0 WPAR Activ 0
sendmail 3998082 0.1 1.16M root CliV2 0 WPAR Total 0
netm 655640 0.0 60.0K root SerV3 0 Press: "h"-help
vrtscsi_ 1311022 0.0 84.0K root CliV3 0 "q"-quit
vtiol 327950 0.0 64.0K root SerV4 0
rmcd 4456908 0.0 11.9M root CliV4 0
syncd 1835398 0.0 604K root
ksh 3932560 0.0 588K root
pilegc 459026 0.0 92.0K root
init 1 0.0 772K root
IBM.Mgmt 5374384 0.0 5.34M root
lvmbb 1179946 0.0 60.0K root
j2gt 1245534 0.0 64.0K root
vmptacrt 196874 0.0 60.0K root
j2pg 1442098 0.0 196K root
j2sync 1507636 0.0 76.0K root

aix_on_mac:/cg # lsmpio
name path_id status path_status parent connection

hdisk0 0 Enabled Sel scsi0 0,0

aix_on_mac:/cg # lsmpio -q
Device Vendor Id Product Id Size Volume Name
---------------------------------------------------------------------------------
hdisk0 QEMU QEMU HARDDISK 100.00GiB -

aix_on_mac:/ # lspv -u
hdisk0 00000000344f6122 rootvg active
33130drive-virtio-disk00DQEMU HARDDISK04QEMUvrtscsi 8eca6bf6-b924-
0872-c039-8cb2a62de21a

aix_on_mac:/ # lsdev -Cc adapter


ent0 Available Virtual I/O Ethernet Adapter (l-lan)
pkcs11 Available ACF/PKCS#11 Device
scsi0 Available 00-10 Virtio SCSI Client Adapter (f41a0800)
vsa0 Available LPAR Virtual Serial Adapter
vscsi0 Available Virtual SCSI Client Adapter

aix_on_mac:/ # lsdev -Cc disk


hdisk0 Available 00-10 MPIO Other Virtio SCSI Disk Drive

aix_on_mac:/ # lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 512MB 1 yes yes lv 0

aix_on_mac:/ # smtctl
smtctl: SMT is not supported on this system.

aix_on_mac:/ # echo cvai | kdb -script


read vscsi_scsi_ptrs OK, ptr = 0x7449E90
(0)> cvai
Executing cvai command
NAME STATE CMDS_ACTIVE ACTIVE_QUEUE HOST
vscsi0 0x000007 0x0000000000 0x0 qemu->vscsi0

End of execution for cvai command


(0)> Executing q command

aix_on_mac:/ # lspath
Enabled hdisk0 scsi0

Warning! Some commands don’t work!


aix_on_mac:/ # ps
Segmentation fault(coredump)
To stop the VM, you can either issue the ‘halt’ command from inside the AIX VM or select
‘Quit’ from the QEMU console menu (as shown below).
In the next phase of my journey into “AIX on QEMU”, I plan to try and get networking up
and running inside the AIX VM. I think this blog post might help… https://blog.san-
ss.com.ar/2016/04/setup-nat-network-for-qemu-macosx

You might also like