Recipe: Set up an Arch Linux ARM virtual workstation with VMWare Fusion on Apple Silicon computers
/docs/other/developer-workstation/arch-aarch64/apple-silicon-vmware-fusion/
Note
As of February 2025, the Gnome UI may not come up. That appears to be an upstream bug related to the VMWare virtual graphics card that causes the Gnome session to crash.
Install VMWare Fusion for Apple Silicon computers
- This product can be obtained from https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion. It appears it is now available free of charge.
Obtain an Arch Linux ARM image
- Download an image whose filename contains string “latest”, and ends with “.iso” from https://release.archboot.com/aarch64/latest/iso/.
Run the Arch Linux ARM image as the virtual machine to create the development VM with
-
Run VMWare Fusion.
-
In VMware Fusion, create a new virtual machine:
-
In the window titled “Select the Installation Method”, select “Create a custom virtual machine”. Click “Continue”.
-
In “Choose Operating System”, select “Linux” and “Other Linux 6.x kernel 64-bit Arm”. Click “Continue”.
-
In “Choose a Virtual Disk”, select “Create a new virtual disk”. You cannot change the displayed size in this dialog window. Click “Continue”.
-
In “Finish”, select “Customize Settings”. Save the file to “ubosdev” or another suitable name. Click “Save”.
-
Now there are two windows: the VM (currently off) and the Settings window. In the Settings window:
-
In “System Settings / Processors & Memory”: select a number of processor cores (such as 4) and memory (such as 8192 MB) that are suitable for your needs. Select “Show All”.
-
In “Removable Devices / Network Adapter”: make sure the checkbox “Connect Network Adapter” is checked, and “Internet Sharing / Share with my Mac” is selected. Select “Show All”.
-
In “Removable Devices / Hard Disk (NVMe)”: set a disk size suitable for your needs, such as 60 GB. This only means the disk may grow up to 60GB, not that it starts out that large. Click “Apply”. Select “Show All”.
-
In “Removable Devices / CD/DVD (SATA)”, turn on the check-box “Connect CD/DVD Drive”.
-
In the same “Removable Devices / CD/DVD (SATA)”, in the popup, select “Choose a disc or disc images” and select the Arch Linux ARM ISO file you downloaded previously. Select “Show All”.
-
-
-
Start the VM by clicking the big white triangle. Accept all defaults until you get to “Hit ENTER for login routine or CTRL-C for bash prompt”; that will take a 5-10 minutes. Then hit
^C
to get the bash shell. (If you find yourself in the Archboot Arch Linux Installation with its blue background: cancel, and select “Exit Program”.)
Install Arch on the empty disk and configure it
-
Update the bootstrap VM and install some packages we need:
# pacman -Sy # pacman -S archlinux-keyring # pacman -Su # pacman -S btrfs-progs gptfdisk parted dosfstools arch-install-scripts vi
-
Zero out the first bytes on the disk for extra robustness:
# dd if=/dev/zero of=/dev/nvme0n1 bs=1M count=8 conv=notrunc
-
Clear the partition table:
# sgdisk --clear /dev/nvme0n1
-
Create the partitions (UEFI,
/boot
and/
) and change them to the right types.# sgdisk --new=1::+1M /dev/nvme0n1 # sgdisk --new=2::+512M /dev/nvme0n1 # sgdisk --new=3:: /dev/nvme0n1 # sgdisk --typecode=1:EF02 /dev/nvme0n1 # sgdisk --typecode=2:EF00 /dev/nvme0n1
-
Make sure changes are in effect:
# sync # partprobe /dev/nvme0n1
-
Create filesystems for partitions other than the UEFI partition:
# mkfs.vfat /dev/nvme0n1p2 # mkfs.btrfs /dev/nvme0n1p3
-
Mount the partitions so we can install:
# mount /dev/nvme0n1p3 /mnt # mkdir /mnt/boot # mount /dev/nvme0n1p2 /mnt/boot
-
Perform the actual install of the base packages:
# pacstrap /mnt base
-
Generate the right
fstab
:# genfstab -U -p /mnt >> /mnt/etc/fstab
-
Chroot into your future root disk and finish the installation:
# arch-chroot /mnt
-
Add the Arch Linux ARM keyring:
# pacman -S archlinuxarm-keyring
-
Install more packages:
# pacman -Sy # pacman -S linux-aarch64 mkinitcpio amd-ucode sudo vim btrfs-progs \ gdm gnome-console gnome-control-center gnome-session gnome-settings-daemon \ gnome-shell gnome-keyring nautilus
If asked which alternatives to install, choose the defaults.
-
Check that the auto-generated content of
/etc/pacman.d/mirrorlist
makes sense. Edit accordingly. -
Create a ramdisk:
# mkinitcpio -p linux-aarch64
-
Configure the boot loader:
# bootctl --path /boot install
-
Install a locale:
# perl -pi -e 's!#en_US.UTF-8 UTF-8!en_US.UTF-8 UTF-8!' /etc/locale.gen # locale-gen
-
Set up networking:
# echo '[Match]' > /etc/systemd/network/wired.network # echo 'Name=en*' >> /etc/systemd/network/wired.network # echo '' >> /etc/systemd/network/wired.network # echo '[Network]' >> /etc/systemd/network/wired.network # echo 'DHCP=ipv4' >> /etc/systemd/network/wired.network # echo 'IPv4Forwarding=1' >> /etc/systemd/network/wired.network # echo 'IPv6Forwarding=1' >> /etc/systemd/network/wired.network # systemctl enable systemd-networkd systemd-resolved systemd-timesyncd
-
Create a user with the right permissions and no password:
# useradd -m ubosdev # chmod 755 ~ubosdev # passwd -d ubosdev # echo ubosdev ALL = NOPASSWD: ALL > /etc/sudoers.d/ubosdev # chmod 600 /etc/sudoers.d/ubosdev
-
No root password:
# passwd -d root
-
Exit from the
arch-chroot
shell with^D
.
-
-
Remainder of networking setup:
# rm /mnt/etc/resolv.conf # ln -s /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf
-
Configure UEFI:
-
Loader configuration:
# echo timeout 4 > /mnt/boot/loader/loader.conf # echo default arch >> /mnt/boot/loader/loader.conf
-
Boot entry configuration:
# echo title Arch > /mnt/boot/loader/entries/arch.conf # echo linux /Image >> /mnt/boot/loader/entries/arch.conf # echo initrd /amd-ucode.img >> /mnt/boot/loader/entries/arch.conf # echo initrd /initramfs-linux.img >> /mnt/boot/loader/entries/arch.conf # echo options root=PARTUUID=$(lsblk -o PARTUUID /dev/nvme0n1p3 | tail -1 ) rootfstype=btrfs rw cgroup_disable=memory add_efi_memmap >> /mnt/boot/loader/entries/arch.conf
-
-
Power off the virtual machine:
# systemctl poweroff
-
Remove the ISO file from the VM:
- In the menu bar of the VM, click the tiny CD icon. If you don’t see such an icon, you may have to expand the list of icon by clicking on the tiny “>” icon first.
- In the popup, select “Disconnect CD/DVD”.
Remaining configuration
-
Start the VM again.
-
At the console, log in as
ubosdev
. There is no password. -
Fix the locale (command won’t run earlier)
% sudo localectl set-locale LANG=en_US.UTF-8
-
Enable Gnome:
% sudo systemctl enable gdm
-
Install the VMWare Guest utilities. Unfortunately, ArchLinuxARM does not pre-compile this package. You can either compile it yourself, or get it from the UBOS “virt” repository. Then enable the core services with:
% sudo systemctl enable vmtoolsd vmware-vmblock-fuse
-
Power off the virtual machine:
% sudo systemctl poweroff