Here is an incredibly hacky way to proceed with installation.
Both the virtual CD drive and virtual hard disk should be attached as SATA devices.
The Ubuntu 18.04.6 arm64 installer uses kernel version 4.15.0-156 so I prepared a tarball including additional kernel modules for this release. Specifically, I used a Docker container to download the modules for this version:
apt update
apt install -y --no-install-recommends linux-modules-4.15.0-156-generic linux-modules-extra-4.15.0-156-generic
tar cf /output/modules.tar /lib/modules/4.15.0-156-generic
Here /output
was a volume mount to a FAT32 USB hard drive I had attached to macOS.
Then I attached the same hard drive to the virtual machine. The Ubuntu installer correctly enumerated this device so I mounted it:
mkdir /mnt/modules
mount -t vfat /dev/sda1 /mnt/modules
Then I installed the drivers:
tar xf /mnt/modules/modules.tar -C /
It was a bit of guesswork to find the right drivers to load but I found these to be sufficient:
modprobe ahci isofs
This caused /dev/sr0
to appear, which I mounted:
mount -t iso9660 /dev/sr0 /cdrom
Then running exit
got me back into the installer with the CD mounted.
The installer was a little quirky, and didn't allow me to select packages to install. After the base system is installed I had to manually proceed to the GRUB installation step.
The produced VM boots fine. Related to the package selection bug, the /etc/apt/sources.list
file still installs packages from the installer CD (which works flawlessly). To install packages from the Internet, I copied over /etc/apt/sources.list
from another system.