GTX28
Contributor
Contributor

How to install Ubuntu on Fusion Tech preview for M1 June 2022 #Easybutton..

When I got my new MAC for work I was surprised at how difficult it was to get an Ubuntu VM running and abandoned my first efforts and ended up making a QEMU vm with UTM as it was alot less friction to get it running.

The point of this post is to both document how I eventually got an Ubuntu VM working, but also to consolidate information spread across a bunch of posts into one place and make it easier for people to follow a step by step set of instructions and quickly get a VM running. 

A few caveats to start with. This assumes you have Fusion Tech Preview installed, and have some idea how to use Linux cli etc.  I've only been successful so far with Ubuntu 20.04. (other versions may work, but this tutorial will focus on the 20.04 LTS ver of Ubuntu) We will be starting with the Server for ARM edition of the software as it was the easiest one to find thats an ARM edition of the software and has a kernel old enough to still work. Don't worry I'll show you how to build the Desktop environment your used to, its dirt simple 2-3 commands max. I got you bro πŸ˜„

I broke the process into 7 steps:
 
  1. Prep Items & Downloads
  2. VM Build
  3. Prevent Kernel Updates
  4. Install Desktop Environment
  5. Install Open VM Tools
  6. Disable Wayland
  7. Upgrade to 5.14 Kernel

Prep Items & Downloads:
 
Download Tech Preview and Install on your MAC (my ver @ publish time = Professional Version e.x.p (19431034))
 
#I found it difficult to find a version of Ubuntu that would boot as I have a preference for the desktop ver so I've included a link to the file I used.
 
ISO =ubuntu-20.04.4-live-server-arm64.iso
 

VM Build:
 
- Create a new vm select your 20.04 ISO-- select customize settings and enter the hostname you desire for your vm -- select save
- Modify system characteristics cpu/ram/disk etc -- I gave mine 4vCPU/8GB ram/68Gb NVMe disk
- Disable the network
 
#Boot and install from ISO (it will choke a few times trying to reach out to the internet, allow it to timeout and continue etc.)
#I accepted all defaults, and entered a username, hostname and pw etc. then rebooted

Prevent Kernel Updates:
 
#boot to login prompt (It may choke trying to reach the internet let it time out and continue booting)
#login with the user you created
#after login if you run hostnamectl you will see the kernel "Linux 5.4.0-100-generic"

 

sudo dpkg-reconfigure unattended-upgrades 

 

#this will open another screen select NO and it will return you to your command prompt

 

sudo apt-mark hold linux-image-generic linux-headers-generic 

 

#Hopefully it will not update the kernel again-- if anyone has additional input on anything I missed feel free to speak up
 
- Enable network for your VM

 

ip a

 

#verify your network came up as per the config you created during the OS install and you got an ip etc..

 

sudo apt update && sudo apt upgrade
sudo reboot

 

#your kernel ver should not have changed, after reboot and the system boots successfully etc.
#you can run hostnamectl again after reboot to verify you're still on the kernel ver you saw earlier.
 

 
Install Desktop Environment:

 

sudo apt install tasksel
sudo tasksel install ubuntu-desktop

 

#another option is to run the following command instead -- sudo tasksel
#this would allow you to choose a desktop other than the standard ubuntu-desktop
# select the desktop environment you want to run - I chose Ubuntu Desktop this installs the normal Ubuntu Gnome Desktop that ships with the desktop distro - Same as the "sudo tasksel ubuntu-desktop command above etc.

 

sudo reboot

 

#After reboot the box should boot into the desktop environment you've chosen. I did not get an error during the install but I've heard that some people have had issues. If it fails try to re-run the install, it should pick up where it left off.
 

Install Open VM Tools:

 

sudo apt install -y open-vm-tools-desktop
sudo reboot now

 

#if you enabled sharing the clipboard you should be able to cut and paste commands into your VM now..
 

Disable Wayland:

 

sudo nano /etc/gdm3/custom.conf

 

#uncomment the line that says "WaylandEnable=false" -- save the file

 

sudo systemctl restart gdm3

 

 

Upgrade to 5.14 kernel:
 
#login to your system again
#open the terminal

 

mkdir kernel_upgrade
cd kernel_upgrade

 

 

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.14/amd64/linux-headers-5.14.0-051400_5.14.0-051400.202108292331_all.deb https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.14/arm64/linux-image-unsigned-5.14.0-051400-generic_5.14.0-051400.202108292331_arm64.deb https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.14/arm64/linux-modules-5.14.0-051400-generic_5.14.0-051400.202108292331_arm64.deb

 

#I pulled these files from the following page: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.14/
#Had to do some guessing to get this just right, feel free to chime in if I missed anything here..

 

sudo dpkg -i *.deb

 

 

hostnamectl

 

#Check your running Kernel ver

 

reboot
hostnamectl

 

#you should see your new 5.14 kernel running after the reboot

Sorry about the goofy spacing in the article, this is about the best I can do with this automated markup editor... Again feel free to chime in if I missed something in the directions, or there is a better way to do something. I hope that this helps someone.  Happy Tuesday!

Shalom,

David

 

7 Replies
mhawkshaw
Contributor
Contributor

Thanks a lot for taking the time to write these instructions! It worked for me. This step:

sudo tasksel ubuntu-desktop

didn't work for me, but entering "sudo tasksel" and selecting Ubuntu Desktop did.

Hopefully VMware will provide an update to the Fusion M1 Preview Edition in June to support newer kernels

0 Kudos
pittma
Contributor
Contributor

Brilliant work, thanks so much for putting all of this together. Has anyone else struggled to get full screen resolution to work? In full screen, my resolution stays at a low 4:3 ratio. I confirmed that vmtools is working because I can copy across host to guest. Is there a step I've missed along the way?

0 Kudos
pittma
Contributor
Contributor

Sorry, y'all. I hadn't done all of the reading yet. This is a known issue. This discussion covers it: https://communities.vmware.com/t5/Fusion-for-Apple-Silicon-Tech/Ubuntu-Desktop-20-04-3-LTS-resolutio...

0 Kudos
GTX28
Contributor
Contributor

@pittma You can't resize at all?  What is your current res? (For ref I run mine in full screen @ 1920x1080 with no problems)

Also can you post the result of running "hostnamectl" in cli to the thread?

0 Kudos
Mikero
Community Manager
Community Manager

The issue isn't that we don't support newer kernels, it's that there's a bug in Linux that hasn't been picked up by various distros yet.

I'm testing 5.17, 5.18 all day long, they work great so long as they don't have this bug.

You can verify that the fix it's not in Ubuntu kernels at all by comparing the patched fbmem.c and the one that Ubuntu is using.

https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal/tree/drivers/video/fbdev/co...

-
Michael Roy - PM/PMM: Fusion & Workstation
0 Kudos
ashe1
Contributor
Contributor

Thank you for this! Saved me a lot of time

0 Kudos
GTX28
Contributor
Contributor

@mhawkshaw -- My apologies I screwed up the command when I typed the article here. The correct command is:

sudo tasksel install ubuntu-desktop

Thank you for the feedback, I fixed the original post to reflect the correct command.

0 Kudos