(Disclaimer: this article has been written for our blog at IBM)
Getting started
If you want to explore the Linux distributions that run on IBM Power (ppc64le) but lack the latter, you can emulate it thanks to QEMU. You can check the Linux compatibility matrices in Power at the following link, and decide which distribution and version you want to try :)
Like any other HW architecture emulation, it has challenges. What inspired me to write this article was this inspiring tutorial, Run a full-system Linux on Power environment from Microsoft Windows, by Emma Erickson and Paul Clarke. I wanted to suggest a more “user-friendly” approach, the network running by default and a GUI to explore all the options available or to modify existing deployments.
For this demo, I will be using a standard (and cheap) x86 box running the latest Ubuntu (23.04) and the packages included in the distribution itself. No need to compile anything.
System preparation
This is my system, but it should work on any x86 machine with virtualization capabilities.
ubuntu@sixe-dev:~$ cat /proc/cpuinfo | grep model
model name : Intel(R) Xeon(R) CPU E5-1410 v2 @ 2.80GHz
ubuntu@sixe-dev:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar
We make sure all updates are applied and reboot.
ubuntu@sixe-dev:~$ sudo apt update && sudo apt upgrade
ubuntu@sixe-dev:~$ sudo reboot
I will use virt-manager as a GUI for QEMU, which would help me (or any other “QEMU newbie”). It’s just what people are used to doing with Virtualbox or VMWare Player, and that’s why I like it :)
ubuntu@sixe-dev:~$ sudo apt install -y qemu-system-ppc qemu-kvm virt-manager virtinst libvirt-clients bridge-utils
In my case, I ssh from Windows WSL, redirecting the X. Another option would be to provide a minimal graphical environment and connect via RDP or VNC.
~$ ssh -X ubuntu@sixe-dev
Warning: No xauth data; using fake authentication data for X11 forwarding.
Welcome to Ubuntu 23.04 (GNU/Linux 6.2.0-35-generic x86_64)
Download .iso files
I will be downloading two free and open Linux distros with great support on Power. The download folder will be /var/lib/libvirt/images, which is used by virt-manager by default.
ubuntu@sixe-dev:~$ cd /var/lib/libvirt/images/
ubuntu@sixe-dev:~$ sudo wget https://repo.almalinux.org/almalinux/8/isos/ppc64le/AlmaLinux-8-latest-ppc64le-minimal.iso
ubuntu@sixe-dev:~$ sudo wget https://download.opensuse.org/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-ppc64le-Media.iso
Launch the Virtual Machine Manager
Although it’s a little-known tool (unless you’re a Linux geek), it’s as simple and powerful as VirtualBox or VMware Player. It also integrates with QEMU to test operating systems on any other architecture.
ubuntu@sixe-dev:~$ virt-manager
Creating and installing a new VM from .iso
To install the .iso, create a new VM. Choose ppc64le as the architecture, tune CPU and memory, and add a new virtual disk. I recorded a video to show the whole process, you can skip the last part, in our case the installation GUI took almost 9 minutes to finish :)
Deploying Alma & OpenSUSE Linux on IBM Power (ppc64le) using QEMU on x86
All the installation settings work. For your information, I used a default LVM configuration for storage and automatic DHCP on my NAT network device.
Here you can see the emulated CPU being detected correctly.
Once the system is installed, I recommend checking the virtual IP address
… and make sure the sshd daemon is running
hugo@almapower:~$ systemctl start sshd
So I connect from my local host using ssh
ubuntu@sixe-dev:~$ ssh root@192.168.122.28
root@192.168.122.28's password:
Last login: Fri Oct 27 03:58:07 2023 from 192.168.122.1
From now on I will ssh into the VM from my host machine. This way I can copy, paste and resize the console without any problems.
Try other distros like OpenSUSE Leap
You can do the same with other distributions. In my case, the second distribution that works well is OpenSUSE Leap.
I even installed the graphical environment.
.. as well as Firefox, and started the web browser to visit our website. You’ll need a little patience, though, as it won’t be lightning fast.
What to do now?
Your Linux is nothing special, except running on a much more secure, powerful, and stable architecture. The operation is the same as on x86. Apple has changed its architecture several times, and more and more manufacturers are betting on alternatives to x86 (see ARM).
For example, another popular Red Hat-derived distribution, Rocky Linux, includes not only x86 and ppc64le on its download page, but also ARM or s390x (Linux One / mainframe environments).
You can add other repositories or consult the database of packages available for Linux at IBM Power – https://www.ibm.com/it-infrastructure/resources/power-open-source/
As a disclaimer, although we have them running in production on LPARs with PowerVM, we have not been able to find the combination of configurations and OS versions that would allow us to run Rocky 9.2 and Ubuntu 22.10/23.04 on QEMU. So my recommendation is to try AlmaLinux or OpenSUSE. Of course, their enterprise-supported “sisters” RHEL and SUSE work just as well.
In future articles we will discuss use cases like AWX or Kubernetes on Linux (ppc64le), emulated or real :)
I hope this article leaves you with no excuses for not trying Linux on Power.