- VMWare Fusion Tech Preview 2023 is out.
- Will henceforth be adding the latest ISO I can find on the Internet that works with these scripts in a Release. Please keep an eye out for that.
A semi-automated way of setting up ArchLinux in VMware Fusion for Apple Silicon
-
Acquire an ArchLinux ISO for aarch64. This can be done in a variety of ways. This repo maintains one in it's release page.
-
Setup a new "Custom Virtual Machine" in VMware.
- Choose "Other Linux 6.x kernel 64-bit Arm"
- Create a disk with at least 16 GiB of space because my script defaults of 8GiB of swap and 512 MiB for ESP. Both of these are configurable if you so choose.
- Setup the processor count and RAM size - I personally set it to 4cores and 8GiB respectively.
- Make sure to check
Use full resolution for Retina display
inDisplay
- Also select
Accelerate 3D Graphcis
and select the recommended amount inShared Graphics Memory
- The default Hard Disk Bus type is assumed to be NVME.
- In
CD/DVD (SATA)
make sure to checkConnect CD/DVD Drive
and from the drop down menu below select the ISO Image you acquired in Step 1. - I personally remove all
Sound Card
andCamera
devices - but this is optional. - Donot remove the
USB & Bluetooth
device. Peripherals are attached via USB inside the VM - so your keyboard for one will stop functioning.
-
Start the VM
-
Set a root password in the VM:
echo -e "root\nroot" | passwd
This will, of course, set the password to root
.
- Get the ip address of the VM:
ip addr
- Now open a terminal window in your
Mac host
and clone this repo cd
into the repo directory- Run:
ADDR="<ip address from step 5>" \
ARCHUSER="preferred username (default:daimaou92)" \
ARCHHOSTNAME="preferred machine name (default:archmachine)" \
ARCHTZ="preferred timezone (default:Asia/Kolkata)" \
make vm/install
All configurable options are right on top of the Makefile
. Configure as needed.
If you are using SATA as the Bus type for Hard Disk
make sure to add
ABLOCKDEVICE="sda" PARTITIONPREFIX=""
to the above command.
-
This will install Archlinux and create provided user with password =
root
. The VM will be restarted and you should be able to login with your user. The default shell for the user will be set tozsh
. I typically take a VM Snapshot at this stage. -
ArchLinuxARM packages doesn't have open-vm-tools yet so we'll have to build it ourselves.
-
From the newly started VM fetch your current ip
ip addr
-
From the terminal in you Mac Host - and inside this repo directory run:
ADDR="<ip address from step 11>" \
ARCHUSER="preferred username (default:daimaou92)" \
make vm/openvmtools
This step downloads the latest commit from the default branch of open-vm-tools, builds for aarch64 and installs it. So shared clipboard directories should start working as soon as you install your DE or setup your WM. Your system will be restarted at the end of this.
- After logging in verify the service status of the following:
sudo systemctl status vmtoolsd.service
sudo systemctl status vmware-vmblock-fuse.service
Check /mnt/hgfs
to see if the directory you've shared exists.
ls -la /mnt/hgfs
There should be no errors.
Check if the file /etc/xdg/autostart/vmware-user.desktop
exists:
ls /etc/xdg/autostart/vmware-user.desktop
This needs to be autostarted at login and is required for clipboard sharing.
- Change the user password:
passwd
and the root password:
sudo passwd
- If everything has gone as per documentation so far - you can stop reading further and set up your home environment the way you prefer.
sudo pacman -Sy xorg xorg-xinit i3-gaps i3status i3lock dmenu alacritty dex xss-lock ntp
You'll need to start the x server
at login followed by i3
and handle DPI.
We'll do it with ~/.Xresources
, ~/.xinitrc
and ~/.zprofile
.
And lastly we have to enable ntpd.service
so that it can keep our time in sync.
I don't install and enable this service as part of the OS Install script since VMWare synchronizes time with the VM and I have faced issues with booting the VM on enabling this during OS install.
You can disable this by going to your VM Settings and clicking on Advanced
-
the very last option. In there just uncheck the Synchronize Time
option.
echo 'Xft.dpi: 220' | tee -a ~/.Xresources > /dev/null
echo 'xrdb -merge ~/.Xresources' | tee -a ~/.xinitrc > /dev/null
echo 'exec i3' | tee -a ~/.xinitrc > /dev/null
echo 'startx' | tee -a ~/.zprofile > /dev/null
sudo systemctl enable ntpd.service
Now reboot
sudo reboot
On logging in for the first time after installing i3 you'll be asked if the
~/.config/i3/config
file should be created. Press Enter
for Yes
.
Another screen pops up asking your choice of modifier key
(called $mod
henceforth). Choose Cmd
or Alt
per preference using
arrow keys and hit Enter
.
The time may not look quite right with your configured timezone after this first boot.
Don't panic - verify the ntpd.service
status with
sudo systemctl status ntpd
If the status is active(running)
just let the system run for a bit.
ntp
takes some time to correct any skew it discovers.
Hit $mod+Enter
. This should open up Alacritty
.