{"id":2288,"date":"2022-12-16T18:11:26","date_gmt":"2022-12-17T01:11:26","guid":{"rendered":"https:\/\/www.itayemi.com\/blog\/?p=2288"},"modified":"2022-12-31T01:14:33","modified_gmt":"2022-12-31T08:14:33","slug":"running-aix-v7-2-vm-on-qemu-hypervisor-on-an-ubuntu-host","status":"publish","type":"post","link":"https:\/\/www.itayemi.com\/blog\/2022\/12\/16\/running-aix-v7-2-vm-on-qemu-hypervisor-on-an-ubuntu-host\/","title":{"rendered":"RUNNING AIX v7.2 VM ON QEMU HYPERVISOR ON AN UBUNTU HOST"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">This procedure documents setting up the latest available QEMU on Ubuntu in order to run an AIX v7.2 VM.\nMost of the steps are from http:\/\/aix4admins.blogspot.com\/2020\/04\/qemu-aix-on-x86-qemu-quick-emulator-is.html?m=1\n\nThe host in this case is an AWS t3.xlarge compute instance running Ubuntu 22.04.1 LTS (Jammy Jellyfish)\nI also attached a secondary EBS volume (55G) to the instance which I mounted on \/wip and where I stored all the relevant files.\n\n\n- Login to the Ubuntu host and install QEMU:\n\nroot@ip-172-31-23-252:~# apt update -y\nroot@ip-172-31-23-252:~# apt install -y gcc make ninja-build\nroot@ip-172-31-23-252:~# wget https:\/\/download.qemu.org\/qemu-7.2.0.tar.xz\nroot@ip-172-31-23-252:~# tar xvf qemu-7.2.0.tar.xz\nroot@ip-172-31-23-252:~# cd qemu-7.2.0\/\nroot@ip-172-31-23-252:~\/qemu-7.2.0# apt install libglib2.0-dev\nroot@ip-172-31-23-252:~\/qemu-7.2.0# apt-get install -y libpixman-1-dev\nroot@ip-172-31-23-252:~\/qemu-7.2.0# apt install ncurses-dev\nroot@ip-172-31-23-252:~\/qemu-7.2.0# .\/configure\n\/\/ ALTERNATIVELY - build only PPC64 support: # .\/configure --target-list=ppc64-softmmu --enable-curses --disable-gtk &amp;&amp; make\nroot@ip-172-31-23-252:~# make\nroot@ip-172-31-23-252:~# make install\n\n\n- Partition the secondary volume and format the file system:\n\nroot@ip-172-31-23-252:~# lsblk\nNAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS\nloop0          7:0    0 24.4M  1 loop \/snap\/amazon-ssm-agent\/6312\nloop1          7:1    0 55.6M  1 loop \/snap\/core18\/2632\nloop2          7:2    0 63.2M  1 loop \/snap\/core20\/1695\nloop3          7:3    0  103M  1 loop \/snap\/lxd\/23541\nloop4          7:4    0 49.6M  1 loop \/snap\/snapd\/17883\nnvme0n1      259:0    0    8G  0 disk\n\u251c\u2500nvme0n1p1  259:1    0  7.9G  0 part \/\n\u251c\u2500nvme0n1p14 259:2    0    4M  0 part\n\u2514\u2500nvme0n1p15 259:3    0  106M  0 part \/boot\/efi\nnvme1n1      259:4    0   55G  0 disk\nroot@ip-172-31-23-252:~#\nroot@ip-172-31-23-252:~# fdisk \/dev\/nvme1n1\nroot@ip-172-31-23-252:~# partprobe\nroot@ip-172-31-23-252:~# mkfs -t ext4  \/dev\/nvme1n1p1\nroot@ip-172-31-23-252:~# blkid\n\/dev\/nvme0n1p1: LABEL=\"cloudimg-rootfs\" UUID=\"687fab62-1ba5-4282-890e-9266064f7d27\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTUUID=\"895d8984-5441-4c70-b87c-a6b6ebb8c95e\"\n\/dev\/nvme0n1p15: LABEL_FATBOOT=\"UEFI\" LABEL=\"UEFI\" UUID=\"B2B4-82AC\" BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"0cf1c52c-98f5-48ae-8a07-fff782190e30\"\n\/dev\/loop0: TYPE=\"squashfs\"\n\/dev\/nvme1n1p1: UUID=\"a5051753-344e-43da-ba1f-cc785cab98b0\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTUUID=\"d816173f-01\"\nroot@ip-172-31-23-252:~# vi \/etc\/fstab\nroot@ip-172-31-23-252:~# grep wip \/etc\/fstab\nUUID=\"a5051753-344e-43da-ba1f-cc785cab98b0\"  \/wip  ext4  defaults 0 0\nroot@ip-172-31-23-252:~#\nroot@ip-172-31-23-252:~# mkdir \/wip\nroot@ip-172-31-23-252:~# mount \/wip\n\n\n- Copy the AIX v7.2 ISO files to the Ubuntu instance. Please ensure you get it from a legal source.\n\nroot@ip-172-31-23-252:~# cd \/wip\nroot@ip-172-31-23-252:\/wip# mkdir AIX72ISOs\nroot@ip-172-31-23-252:\/wip# cd AIX72ISOs\/\nroot@ip-172-31-23-252:\/wip\/AIX72ISOs# scp -i ~\/.ssh\/wipalinux ubuntu@172.31.18.141:\/wip\/AIX72ISOs\/aix_7200-04-02-2027_1of2_072020.iso .\n\n\n- Create a disk for the AIX VM:\nroot@ip-172-31-23-252:~# cd \/wip\/\nroot@ip-172-31-23-252:\/wip# qemu-img create -f qcow2 hdisk0.qcow2 20G\n\n\n- Install AIX (you can change install settings e.g., to include SSH client and server). The installation tool approx 110 mins \nroot@ip-172-31-23-252:\/wip# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -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 \/wip\/AIX72ISOs\/aix_7200-04-02-2027_1of2_072020.iso -prom-env \"boot-command=boot cdrom:\"\n\n   - NOTE: the VM will get stuck in a reboot loop at the end of installation. Use CTRL+C to terminate the VM\n   \n   \n- Fix\/solve the fsck64 issue to fix the reboot loop by booting the VM into maintenance mode:\nroot@ip-172-31-23-252:\/wip# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -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 \/wip\/AIX72ISOs\/aix_7200-04-02-2027_1of2_072020.iso -prom-env \"boot-command=boot cdrom:\"\n   - menu options to select:  1 to \"define the System Console\" > 1 for English > 3 for Maintenance mode > 1 to access root VG > 0 to continue > 1 to select VG\/disk > 1 to \"Access this Volume Group and start a shell\"\n  - NOTE: no keyboard BACKSPACE key, and don't use CTRL+C as that terminates the VM.\n\n  # cd \/sbin\/helpers\/jfs2\n  # cp fsck64 fsck64.org\n\n  - truncate the fsck64 exeutable binary file and replace content with shell script\n  # > fsck64\n  # cat > fsck64 &lt;&lt; EOF\n  #!\/bin\/ksh\n  exit 0\n  EOF\n  #\n  # cat fsck64\n  #!\/bin\/ksh\n  exit 0\n  #\n\n  - Alternative to the cat sequence above is to edit the fsck64 file after truncating it and add the 2 lines to the file:\n  # > fsck64\n  # export TERM=vt100\n  # vi fsck64\n  # cat fsck64\n  #!\/bin\/ksh\n  exit 0\n  #\n\n\n  - Shutdown the VM:\n  #\n  # sync; sync\n  # halt\n\n\n- Create a snapshot of the AIX O\/S disk for backup purposes:\nroot@ip-172-31-23-252:\/wip# qemu-img create -f qcow2 -b hdisk0.qcow2 -F qcow2 hdisk0.snap.qcow2 10G\n\n\n- Boot the VM to AIX O\/S 7.2 using the O\/S disk, and accept license (I excluded cdrom since I no longer need it):\nroot@ip-172-31-23-252:\/wip# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -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 -prom-env \"boot-command=boot disk:\"\n   - choose vt100 (type it and press ENTER) when prompted for terminal type\n   - choose to accept the license (default is no, press TAB key to change it to yes) then ENTER to accept\n   - Esc+0 (hold down ESC then press 0) to go back\n   - accept the software maintenance terms\/conditions\n   - Esc+0 (hold down ESC then press 0) to go back\n   - Set any of the additional settings as required (date\/time; root password; etc)\n   - Option \"Tasks completed - Exit to Login\"\n   \n   - Login as root on the console (prompt)\n-----------------------------------------------\n   \n- Fix the RPM DB error:  https:\/\/bobcares.com\/blog\/rpm-db_runrecovery-errors\/\n# cd \/opt\/freeware\n# tar -chvf `date +\"%d%m%Y\"`.rpm.packages.tar packages\n# rm -f \/opt\/freeware\/packages\/__*\n# \/usr\/bin\/rpm --rebuilddb\n# \/usr\/bin\/rpm -qa\n\n-----------------------------------------------\n   \n   \n- Setup networking: https:\/\/kwakousys.wordpress.com\/2020\/09\/06\/run-aix-7-2-on-x86-with-qemu\/\n<s>    - in this example, we assign IP address 10.0.2.16 to AIX and 10.0.2.20 to the bridge we defined on the Ubuntu host.<\/s>\n\n<s>- Setup a bridge (br0) on the Ubuntu host:\n    root@ip-172-31-23-252:\/wip# apt-get install bridge-utils\n    root@ip-172-31-23-252:\/wip# mkdir -p \/usr\/local\/etc\/qemu\n    root@ip-172-31-23-252:\/wip# echo \"allow br0\" > \/usr\/local\/etc\/qemu\/bridge.conf<\/s>\n\t\n    NOTE: you can put the following network-related commands a single script that you can just run as a single command\n\t\n<s>    root@ip-172-31-23-252:\/wip# ip link add name br0 type bridge\n    root@ip-172-31-23-252:\/wip# ip link set dev br0 up\n    root@ip-172-31-23-252:\/wip# ip addr add 10.0.2.20\/24 dev br0<\/s>\n\n\n- Setup the tap NIC for the AIX VM:\n    root@ip-172-31-23-252:\/wip# ip tuntap add tap0 mode tap\n    root@ip-172-31-23-252:\/wip# ip link set dev tap0 up\n<s>    root@ip-172-31-23-252:\/wip# ip link set dev tap0 master br0<\/s>\n\n    NOTE: tap0 interface comes up when the VM is started\n\n\n- Setup the Ubuntu host for routing (including Internet access from the AIX VM):\n    root@ip-172-31-23-252:\/wip# echo 1 > \/proc\/sys\/net\/ipv4\/conf\/tap0\/proxy_arp\n    root@ip-172-31-23-252:\/wip# ip route add 10.0.2.16 dev tap0\n    root@ip-172-31-23-252:\/wip# arp -Ds 10.0.2.16 eth0 pub\n    root@ip-172-31-23-252:\/wip# echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward\n    root@ip-172-31-23-252:\/wip# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\n    root@ip-172-31-23-252:\/wip# iptables -I FORWARD 1 -i tap0 -j ACCEPT\n    root@ip-172-31-23-252:\/wip# iptables -I FORWARD 1 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT\n        \n\n- Start the AIX VM normally (assign a randomly selected MAC address to the VM's NIC):\nroot@ip-172-31-23-252:\/wip# qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -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 -prom-env \"boot-command=boot disk:\" -net nic,macaddr=be:16:43:37:16:ec -net tap,script=no,ifname=tap0,downscript=no\n\n\n- Assign the IP address 10.0.2.16 to the en0 NIC in AIX  (use SMIT to make it permanent)\n# chdev -l en0 -a netaddr=10.0.2.16 -a netmask=255.255.255.0 -a state=up\n\n- Make the IP assignment permanent with SMIT (assign any IP on the same network as the gateway e.g., 10.0.2.254):\n# smit tcpip > Min Config &amp; Startup > en0 > (setup hostname\/netmask\/IP\/nameserver &amp; domain name &amp; gateway e.g., aix7vm\/10.0.2.16\/255.255.255.0\/8.8.8.8 &amp; acme.com\/10.0.2.254) > \"START Now\" = yes (TAB key to change it) then ENTER key to execute the change\n   NOTE: the name server (e.g., Google's 8.8.8.8 DNS server) and a domain name MUST be provided if you decide to set the name server.\n\n\n- Install BASH shell in AIX VM (bash is easier to use than the default Korn shell):\n\n- increase \/opt as the bash instal requires about 40MB space:\n# chfs -a size=+60M \/opt\n\n# wget http:\/\/www.oss4aix.org\/download\/latest\/aix71\/libiconv-1.16-1.aix5.1.ppc.rpm\n# wget http:\/\/www.oss4aix.org\/download\/latest\/aix71\/bash-5.0-8.aix5.1.ppc.rpm\n# wget http:\/\/www.oss4aix.org\/download\/latest\/aix71\/gettext-0.19.8.1-1.aix5.1.ppc.rpm\n# wget http:\/\/www.oss4aix.org\/download\/RPMS\/gcc\/libgcc-6.3.0-1.aix7.2.ppc.rpm\n# rpm -ivh bash_5_0_8_aix5_1_ppc.rpm gettext_0_19_8_1_1_aix5_1_ppc.rpm libiconv_1_16_1_aix5_1_ppc.rpm libgcc_6_3_0_1_aix7_2_ppc.rpm\n\n- In AIX, after installing bash, \"authorize\" AIX to allow bash shell to run:\n# export TERM=vt100\n   - Edit file \/etc\/security\/login.cfg, append \"\/usr\/bin\/bash\" (without the double quotes)  to the line containing \"shells =\"\n   - Edit file \/etc\/shells, append this on a new line \"\/usr\/bin\/bash\" (without the double quotes)\n   \n\n--------------- END OF PROCEDURE ---------------\n\n\n- Extra step in order to access the AIX VM using SSH from outside the Ubuntu host (particularly useful if you are using the \"--daemonize\" headless option when starting the AIX VM):\nSummary is to use iptables to redirect incoming attempts to connect to the Ubuntu instance on some alternate port (e.g., 2222\/tcp) to port 22 on the AIX VM. Note that you also need to allow incoming traffic on this alternate port in your AWS\/OCI\/GCP VPC\/subnet using the relevant security group rule.\n\nroot@ip-172-31-23-252:\/wip# iptables -A INPUT -p tcp --dport 2222 -j ACCEPT\nroot@ip-172-31-23-252:\/wip# iptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to-destination 10.0.2.16:22\n\n\nYou can then connect to the AIX with putty (Ubuntu IP address and port 2222) or using SSH with a command such as: ssh root@&lt;ubuntu-ip> -p 2222\n\n\n   \nReferences:\nhttp:\/\/aix4admins.blogspot.com\/2020\/04\/qemu-aix-on-x86-qemu-quick-emulator-is.html?m=1\n<blockquote class=\"wp-embedded-content\" data-secret=\"1CyhKIooYe\"><a href=\"https:\/\/kwakousys.wordpress.com\/2020\/09\/06\/run-aix-7-2-on-x86-with-qemu\/\">Run AIX 7.2 on x86 with&nbsp;QEMU<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Run AIX 7.2 on x86 with&nbsp;QEMU&#8221; &#8212; Kwakou SysAdmin\" src=\"https:\/\/kwakousys.wordpress.com\/2020\/09\/06\/run-aix-7-2-on-x86-with-qemu\/embed\/#?secret=HeW8B63fhB#?secret=1CyhKIooYe\" data-secret=\"1CyhKIooYe\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\nhttps:\/\/worthdoingbadly.com\/aixqemu\/\nhttp:\/\/www.visidon.com\/blog\/2015\/02\/bash-on-aix-7-1\/\n<blockquote class=\"wp-embedded-content\" data-secret=\"0qVJL7HKnc\"><a href=\"https:\/\/bobcares.com\/blog\/rpm-db_runrecovery-errors\/\">RPM DB_RUNRECOVERY errors: How to resolve<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;RPM DB_RUNRECOVERY errors: How to resolve&#8221; &#8212; Bobcares\" src=\"https:\/\/bobcares.com\/blog\/rpm-db_runrecovery-errors\/embed\/#?secret=7w0slMTDfE#?secret=0qVJL7HKnc\" data-secret=\"0qVJL7HKnc\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\nhttp:\/\/www.oss4aix.org\/download\/latest\/aix71\/    - download RPMs for various packages\nhttp:\/\/www.oss4aix.org\/download\/RPMS\/gcc\/\nhttps:\/\/public.dhe.ibm.com\/aix\/freeSoftware\/aixtoolbox\/RPMS\/ppc\/\n\n\n- Some useful commands:\n# qemu-system-ppc64  ...  -daemonize  (to run the VM in \"headless\" mode so access it using SSH). If you use this option, delete the \"-serial stdio\" from the command. QEMU starts the VM and gives a message such as \"VNC server running on 127.0.0.1:5900\" so you can use VNC to manage the VM as well.\n\nroot@ip-172-31-23-252:\/wip# mount -o loop \/wip\/bash51-aix71.iso \/iso\n<s>root@ip-172-31-23-252:\/wip# ip link set dev br0 down\nroot@ip-172-31-23-252:\/wip# ip link delete dev br0<\/s>\nroot@ip-172-31-23-252:\/wip# ip a\n# mount -vcdrfs -oro \/dev\/cd0 \/mnt\n\n# entstat -d en0 | grep -i hard\nHardware Address: be:16:43:37:16:ec\n\n#aix# chsh &lt;username> \/bin\/bash\n\nlogout from session, after AIX shutdown is possible using \"~~.\", same as in HMC console\n\nroot@ip-172-31-23-252:\/wip# apt install -y genisoimage\nroot@ip-172-31-23-252:\/wip# mkisofs -max-iso9660-filenames -o bash50.iso .\/bash50\n\n- boot the AIX with the ISO image containing the bash rpm package;\nqemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -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 -prom-env \"boot-command=boot disk:\" -net nic,macaddr=be:16:43:37:16:ec -net tap,script=no,ifname=tap0 -cdrom \/wip\/bash50.iso\n\n\n\n- Some notes:\n\"make\" of QEMU took about 85 mins on t3.xlarge when compiling all supported platforms, but under 10 mins when compiling for ppc64 support only)\nensure you have plenty of space for the compiler. qemu-7.2.0.tar.xz is 117M, extracted folder qemu-7.2.0 is 799M, compiled, the extracted folder goes to almost 6GB!\nif you didn't include the ssh client\/server during the installation, you will need to start the VM with the ISO image inserted in the CDROM so you can install them.\n\n\n- Optionally disable some un-needed services to speed up the boot process:\n     - edit file \/etc\/rc.tcpip and comment out # some services if not required e.g., sendmail, snmpd, hostmibd, snmpmibd, aixmibd\n(look for lines similar to:  start \/usr\/sbin\/aixmibd \"$src_running\")\n\n     - to disable the NFSD server, edit file \/etc\/rc.nfs and comment out the line:  start biod \/usr\/sbin\/biod\n     - you may use the \"stopsrc -s &lt;service-name>\" command to shut them down in the current session as well.\n\n\n- Optionally disable additional services defined in the \/etc\/inittab file to make subsequent boot ups faster (using the following commands):\n# rmitab rcnfs\n# rmitab cron\n# rmitab piobe\n# rmitab qdaemon\n# rmitab writesrv\n# rmitab naudio2\n# rmitab naudio\n# rmitab aso\n# rmitab clcomd\n# chrctcp -S -d tftpd<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">- The networking setup, and AIX VM launch command scripts (execute the network script before the AIX VM launch script so that the VM will have network access):\n\nroot@ip-172-31-23-252:\/wip# cat setup_networking_for_aix.sh\n#!\/usr\/bin\/bash\n\n#- Setup the tap NIC for the AIX VM:\nip tuntap add tap0 mode tap\nip link set dev tap0 up\n\n#NOTE: tap0 interface comes up when the VM is started:\n\n#- Setup the host for routing (including Internet access from the AIX VM):\necho 1 > \/proc\/sys\/net\/ipv4\/conf\/tap0\/proxy_arp\nip route add 10.0.2.16 dev tap0\narp -Ds 10.0.2.16 eth0 pub\necho 1 > \/proc\/sys\/net\/ipv4\/ip_forward\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\niptables -I FORWARD 1 -i tap0 -j ACCEPT\niptables -I FORWARD 1 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT\n\n#- Setup port forwarding so that the AIX VM is accessible remotely:\niptables -A INPUT -p tcp --dport 2222 -j ACCEPT\niptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to-destination 10.0.2.16:22\n\n\n\nroot@ip-172-31-23-252:\/wip# cat launch_aix72_vm.sh\n#!\/usr\/bin\/bash\n\n\/usr\/local\/bin\/qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -prom-env \"boot-command=boot disk:\" -net nic,macaddr=be:16:43:37:16:ec -net tap,script=no,ifname=tap0,downscript=no --daemonize\n#\/usr\/local\/bin\/qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -drive file=hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -prom-env \"boot-command=boot disk:\" -net nic,macaddr=be:16:43:37:16:ec -net tap,script=no,ifname=tap0,downscript=no\n\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">- VNC connection to the AIX VM\nWhen qemu is executed with the --daemonize option, it also creates a VNC session that you can connect to. By default the VNC session is started on only the loopback (127.0.0.1) interface. In the sample command below, it is started on the primary interface of the Ubuntu host with the IP 172.31.23.252. I can then use any VNC viewer such as tightvnc to connect to the VM's console using the Ubuntu hosts' public IP:\nroot@ip-172-31-23-252:\/wip# \/usr\/local\/bin\/qemu-system-ppc64 -cpu POWER8 -machine pseries -m 4096 -drive file=\/wip\/hdisk0.qcow2,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -prom-env \"boot-command=boot disk:\" -net nic,macaddr=be:16:43:37:16:ec -net tap,script=no,ifname=tap0,downscript=no --daemonize -vnc 172.31.23.252:0<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This procedure documents setting up the latest available QEMU on Ubuntu in order to run an AIX v7.2 VM. Most of the steps are from http:\/\/aix4admins.blogspot.com\/2020\/04\/qemu-aix-on-x86-qemu-quick-emulator-is.html?m=1 The host in this case is an AWS t3.xlarge compute instance running Ubuntu 22.04.1 &hellip; <a href=\"https:\/\/www.itayemi.com\/blog\/2022\/12\/16\/running-aix-v7-2-vm-on-qemu-hypervisor-on-an-ubuntu-host\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":336,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1377,1380,1383,1378,1376,1384,1381,1382,1379,1314],"class_list":["post-2288","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-aix","tag-bash","tag-daemonize","tag-qcow2","tag-qemu","tag-rmitab","tag-smit","tag-stopsrc","tag-tuntap","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/users\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/comments?post=2288"}],"version-history":[{"count":11,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2288\/revisions"}],"predecessor-version":[{"id":2307,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2288\/revisions\/2307"}],"wp:attachment":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/media?parent=2288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/categories?post=2288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/tags?post=2288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}