Instructions for installing Ubuntu Server in VirtualBox on a Mac with an ARM64 processor and connecting Guest Additions.
Installing VirtualBox
Download the ARM64 build of VirtualBox, mount the image and transfer VirtualBox.app to Applications.
Configuring a virtual machine
We create a new machine, specify the Linux type and the Ubuntu version (64-bit ARM). In the settings we set:
- TPM – disable
- UEFI – disable
- RAM – 4096 MB.
- Graphics controller – VMSVGA (for VBoxLinuxAdditions).
- Processor – 4 cores.
Installing Ubuntu Server
Mount the Ubuntu Server ISO image for ARM64 into the CD-ROM drive. In the download section, put the optical drive first in the list. We start the machine and go through the installation of Ubuntu Server.
Installing xubuntu-desktop
Install the XFCE graphical environment:
sudo apt update
sudo apt install -y xubuntu-desktop
In the login manager selection dialog, select lightdm.
Reboot the guest system:
sudo reboot
Guest Additions
After the first boot, install packages for building kernel modules:
sudo apt update
sudo apt install -y build-essential linux-headers-$(uname -r)
We mount the disk with Guest Additions through the VirtualBox menu: Devices → Mount Guest Additions disk image. The disk will appear inside the guest in the /media/$USER directory.
Open a terminal in Xubuntu, go to the directory of the mounted disk and run the installer:
cd /media/$USER/*
sudo ./VBoxLinuxAdditions-arm64.run
Reboot the guest system:
sudo reboot
What should work after installation
We check that the kernel modules are loaded:
lsmod | grep vbox
The output should include vboxguest and vboxsf.
Add a shared folder in the machine properties and mount it inside the guest:
sudo mkdir -p /media/sf_shared
sudo mount -t vboxsf shared /media/sf_shared
Working features:
- Shared folders – the host directory is visible inside the guest via vboxsf.
- Shared clipboard – copy text between host and guest.
- Mouse integration – the cursor freely extends outside the machine window.
- Automatic resolution change – the guest screen adjusts to the window size.
- Time synchronization – the guest’s time is adjusted to the host’s time.
Sources
https://www.virtualbox.org/manual/topics/guestadditions.html
https://forums.virtualbox.org/viewtopic.php?t=112886
Leave a Reply