Because of no official support on VirtualBox, I decided to use UTM for my M1 Mac.
Download ARM version Ubuntu iso image from the official site.
Ubuntu for ARM | Download | Ubuntu
Download Ubuntu Server for ARM with support for the very latest ARM-based server systems powered by certified 64-bit…
Download UTM into Mac M1 from the official site.
Not only can you run the latest and greatest operating systems, you can also emulate older operating systems whether…
Start UTM to install Ubuntu by “Create a New Virtual Machine”.
Mount the Ubuntu iso image on CD/DVD device then Start.
Install Ubuntu Server.
Configure Ethernet address.
Check all Disk and Device configurations.
Select option PKGs.
Once complete the Ubuntu installation close the terminal window then dismount CD/DVD and restart.
Got the terminal screen again.
How to mount the Shared directory
Mount the Shared directory on Mac by writing “VirtFs” capability into /etc/fstab and fixing the file permission error.
Most popular Linux distributions will have the correct drivers already built in. If you are building your own kernel…
$ sudo mkdir /Shared_Directory
# Edit and add the mount point
$ sudo vi /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-LgTcmbgci0iy5FRG56KuEdy0IDVymzedXRlFgK1glu3wMNA6sxf0pSbGqsQji0yr / ext4 defaults 0 1
# /boot was on /dev/vda2 during curtin installation
/dev/disk/by-uuid/05b539cb-c914-436f-a0c7-db40e560b4d3 /boot ext4 defaults 0 1
# /boot/efi was on /dev/vda1 during curtin installation
/dev/disk/by-uuid/C024-11A7 /boot/efi vfat defaults 0 1
/swap.img none swap sw 0 0
share /Shared_Directory 9p trans=virtio,version=9p2000.L,rw,_netdev,nofail 0 0
# Change file permission
$ sudo chown -R $USER.$USER /Shared_Directory
Increase LVM partition
Since the LVM partition did not extend to the predetermined capacity on UTM settings, the following command needs to fix
$ sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
$ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
Install Ubuntu-desktop by apt
$ sudo apt install ubuntu-desktop