aix-vm-with-qemu
aix-vm-with-qemu
Introduction
What can it be used for?
Prerequisities:
1. QEMU Install
2. aix_7200-04-00-1937_1of2_112019.iso
3. Fedora 40 Linux Install (Recommended)
QEMU commands
PowerPC System Board-specific
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
mkdir aix72VM
cd aix72VM
aix_7200-04-00-1937_1of2_112019.iso
cd aix72VM
mv aix_7200-04-00-1937_1of2_112019.iso AIX72.iso
cd aix72VM
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom $PWD/AIX72.iso \
-prom-env "input-device=/vdevice/vty@71000000" \
-prom-env "output-device=/vdevice/vty@71000000"
Type 2
Type 4
Type 5
Type 0
Press Enter to install AIX
?? Ctrl + C ??
Fix boot issue
Boot from cd-rom
cd aix72VM
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom $PWD/AIX72.iso \
-prom-env "input-device=/vdevice/vty@71000000" \
-prom-env "output-device=/vdevice/vty@71000000"
Type 3
Type 0
Type 1
Type 1
????????
Fix boot issue
cd /sbin/helpers/jfs2
mv fsck64 fsck64.old
ln -s fsck fsck64
mv logredo64 logredo64.old
ln -s logredo logredo64
sync;sync;
halt
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom $PWD/AIX72.iso \
-prom-env "output-device=/vdevice/vty@71000000"
Type vt100
Post-tasks
- Disable some problematic services
rmitab diagd
rmitab rcnfs
rmitab aso
rmitab clcomd
rmitab pfcdaemon
stopsrc -s clcomd
stopsrc -s pfcdaemon
- Network setup
On Linux)
net_tap.sh:
BRIDGE=virbr0
NETWORK=192.168.99.0
NETMASK=255.255.255.0
GATEWAY=192.168.99.1
DHCPRANGE=192.168.99.2,192.168.99.50
TAP=tap0
#dns_cmd=(
# dnsmasq
# --strict-order
# --except-interface=lo
# --interface=$BRIDGE
# --listen-address=$GATEWAY
# --bind-interfaces
# --dhcp-range=$DHCPRANGE
# --conf-file=""
# --pid-file=/var/run/qemu-dnsmasq-$BRIDGE.pid
# --dhcp-leasefile=/var/run/qemu-dnsmasq-$BRIDGE.leases
# --dhcp-no-override
#)
Run net_tap.sh
bash net_tap.sh
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom $PWD/AIX72.iso \
-nographic
On AIX)
lsdev -Cc if
# Set the ip
- Install OpenSSH
mount -v cdrfs -o ro /dev/cd0 /mnt
mkdir /tmp/ssh_install
cd /mnt/installp/ppc
cp openssh* /tmp/ssh_install
cd /tmp/ssh_install
lssrc -s sshd
“ error: cannot open Packages index using db4 - Invalid argument (22)
error: cannot open Packages database in /opt/freeware/packages
error: db4 error(22) from dbenv->open: Invalid argument
Solution: fixrpm.sh
#!/usr/bin/ksh
cd /opt/freeware
rm -f *.rpm.packages.tar
rm -f /opt/freeware/packages/__*
/usr/bin/rpm --rebuilddb
exit 0
Edit /etc/initab, insert the line after the rctcpip
dnf_aixtoolbox.sh :
https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_aixtoolbox.sh
openssl-1.1.2.2000.tar.Z :
https://www.ibm.com/resources/mrs/assets?source=aixbp&S_PKG=openssl
cd /home/worktmp
uncompress openssl-1.1.2.2000.tar.Z
cd openssl-1.1.2.2000
openssl version
cd /home/worktmp
rpm --rebuilddb
ksh dnf_aixtoolbox.sh -y
/opt/freeware/bin/dnf update
- Optional tasks
> Custom the prompt, create the profile /.profile
> Timezone
smitty > System Environments > Change/Show Date and Time > Change Time Zone Using
System
echo $TZ
Edit: /etc/environment
TERM=xterm
??????
- ?? CD ISO ?
??qemu ???? -cdrom /path/to/your-cd.iso
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom $PWD/AIX72.iso \
-nographic
AIX ????
- ???2?????
? Linux ????? 5G ???? hdisk1.qcow2
cd aix72VM
-drive file=hdisk1.qcow2,if=none,id=drive-virtio-disk1 \
-device scsi-hd,drive=drive-virtio-disk1 \
??????
-cdrom $PWD/AIX72.iso \
-device virtio-scsi-pci,id=scsi \
-drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 \
-device scsi-hd,drive=drive-virtio-disk0 \
-drive file=hdisk1.qcow2,if=none,id=drive-virtio-disk1 \
-device scsi-hd,drive=drive-virtio-disk1 \
-nographic -smp 2
root@aixvm:> lspv
Manufacturer................QEMU
Part Number.................
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)........
PLATFORM SPECIFIC
Name: disk
Node: disk
- ?? vCPU
?? QEMU ?? 1 vCPU???? AIX ??????????????? vCPU?
qemu-system-ppc64 ??????
- ????????
qemu-system-ppc64 ????????????
-net nic \
-net nic \
-net tap,script=no,ifname=tap0 \
-net nic,macaddr=56:44:45:30:31:31 \
-net nic,macaddr=56:44:45:30:31:32 \
-net tap,script=no,ifname=tap0 \
References
AIX on qemu-system-ppc64
Run AIX 7.2 on x86 with QEMU – Kwakou SysAdmin
Qemu?????AIX 7.2 ?? - ????? - ??? (cnblogs.com)
Run your AIX VM on x86 using KVM and QEMU (ibm.com)
qemu7????aix72,?????????_aix 7.2??qcow2??????-CSDN??
???? AIX 7.2 ??? QEMU VM
AIX 7.2 ????? - ???{?????????}??? (jia.je)
AIX for System Administrators: DEVOPS - QEMU (aix4admins.blogspot.com)
YT: AIX 7.2 installation in QEMU - YouTube
YT: Install AIX on QEMU using virsh and virt-manager tools - YouTube
YT: Updates on Install AIX and run PowerHA using virsh and virt-manager - YouTube
libvirt: QEMU command-line passthrough
Revision #105
Created 25 September 2024 13:34:07 by Admin
Updated 16 October 2024 15:08:34 by Admin