Lustre development on ARM machines is possible but requires some more care on an Apple Silicon Mac due to some kernel restrictions. Most out of the box EL8 aarch64 versions assume a 64K page size which is not supported on Apple Silicon. 4k and 16k are supported. As result a install ISO file loops in Grub since the kernel cannot boot. This is fixed for EL9+ aarch64 versions and do not require this process.
This document walks through the steps required to run EL8 virtualized on an Apple Silicon Mac.
Virtualization is not possible. Therefore, we must emulate a VM to build a kernel with a compatible page size. Due to emulation, this is very slow. Here, we use UTM with QEMU. This walk-through uses Rocky 8.7 aarch64 as an example.
Edit->QEMU
and untick Use Hypervisor
to enable emulation. In the same settings window, change Display->Emulated Display Card
from virtio-gpu-pci
to virtio-ramfb
otherwise there is not display output.dnf -y groupinstall 'C Development Tools and Libraries' dnf -y groupinstall 'Development Tools' dnf -y install ncurses-devel openssl-devel elfutils-libelf-devel python3 dnf config-manager --set-enabled powertools dnf -y install dwarves wget |
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.18.tar.gz tar xf linux-4.18.tar.gz |
cd linux-4.18/ make O=~/build/kernel mrproper cp /boot/config-`uname -r` ~/build/kernel/.config |
make menuconfig
search CONFIG_ARM64_64K_PAGES
and change it to 4K
.make O=~/build/kernel menuconfig sed -ri '/CONFIG_SYSTEM_TRUSTED_KEYS/s/=.+/=""/g' ~/build/kernel/.config grep PAGES ~/build/kernel/.config # sanity check |
vim Makefile # to change `EXTRAVERSION` kernel name suffix sed -i 's/^EXTRAVERSION.*/EXTRAVERSION = -4Kpages/' Makefile # alternative make O=~/build/kernel kernelversion # check kernel version target |
make -j 4 O=~/build/kernel make O=~/build/kernel modules_install |
cp ~/build/kernel/arch/arm64/boot/Image /boot/vmlinuz-4.18.0-4Kpages cp -v ~/build/kernel/System.map /boot/System.map-4.18.0-4Kpages kernel-install add 4.18.0-4Kpages /boot/vmlinuz-4.18.0-4Kpages |
Reboot into the new kernel. If successful, shutdown the VM.
Re-enable the Use Hypervisor
option and change the Emulated Display Card
back to virtio-gpu-pci
to enable virtualization.
Refer to this guide for building Lustre MASTER with Rocky 8.7. Double check there is enough space available in the VM.
VMware Fusion Pro does not support emulation and therefore the used Rocky image cannot boot without building a kernel with a compatible page size first. Moreover, even when migrating to VMware, the stock kernel is incompatible. So, it is important to first build the Lustre kernel.
Note, Oracle Linux 8.7 is the only flavor that can boot out of the box with VMware Fusion. Rocky/Alma/CentOS do not boot without a compatible kernel.
The following documents the steps for a successful migration:
dracut --force --no-hostonly
which rebuilds the initramfs with all drivers available. This is important to support the storage bus type in VMware. Later (when in VMware), dracut --force
rebuilds initramfs only with the needed drivers.qemu-img
. If command not available, install qemu (e.g., via brew: brew install qemu
). This command creates a new vmdk file, leaving qcow2 untouched.:# First, navigate to the UTM VM directory qemu-img convert -p -f qcow2 -O vmdk <VM_file_name>.utm/Data/*.qcow2 ~/Downloads/rocky8-7.vmdk |
Add VM in VMware Fusion and use Create a custom virtual machine
, choose Use an existing virtual disk
.
Boot into the existing Lustre kernel.
Final steps:
Fix swap: swapon /dev/mapper/rl-swap --fixpgsz
The NIC has changed, so the old config file no longer applies: Navigate to /etc/sysconfig/network-scripts/
, change the file name and the config, i.e., the NAME
and DEVICE
fields.
Set a new hostname
Regenerate hostkeys cd /etc/ssh && rm ssh_host_* && ssh-keygen -A
nvme nvme0: I/O 123 QID 2 timeout, aborting; nvme nvme0: Abort status: 0x0
. This can be avoided by changing the disk interface to SATA in the VM disk settings.Reboot and done.