Another big release of Ubuntu has gone live since the 26th of April: Ubuntu 18.04. I wanted to try it out and so I went ahead and installed the desktop edition in Parallels Desktop. So far I can only tell you that Parallels does (at the time of writing this article) not support kernel version 4.15, which Ubuntu 18.04 comes with out of the box. I have fixed this by downgrading to kernel version 4.14 manually, and I can tell you that things are buttery smooth now! In this article I am demonstrating every step so that you can enjoy a fresh and working Ubuntu 18.04 VM on your Mac too.
A small checklist
This guide is for people who are familiar with working in a terminal window. Things can get really technical, so please warm yourself up for some hackery. For the people who are unfamiliar with working in a terminal window: you are better off with skipping Ubuntu 18.04 for now, unfortunately.
Getting an older kernel
It is quite possible that any kernel version lower than 4.15 might work. Make sure to check out kernel.org to check for the latest longterm kernel release. At the time of writing this article, 4.14.39 was the latest version to download.
Fetching older kernel versions for Ubuntu is quite convenient, as Canonical provides the community with prebuilt kernels of literally any version you could wish for. Go ahead and see for yourself!
The link for this page is http://kernel.ubuntu.com/~kernel-ppa/mainline/.
Go ahead and download the highlighted packages from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14.39/. Ofcourse, do this inside your VM. And replace the version number with a newer number if available.
Once you have downloaded the four highlighted packages, you need to open up a terminal with the CTRL + ALT + T key combination. Navigate to your Downloads directory with
cd Downloads and execute
sudo dpkg -i *.deb from there. This will install your downloaded kernel along with its headers and modules.
Removing the default kernel
Before you restart, run this command to remove the default kernel:
sudo apt purge linux-headers-4.15.* linux-image-4.15* linux-modules-4.15* linux-modules-extra-4.15*
If you get a question asking you if you should abort, answer with no.
This step is mandatory because if you didn't do this, you would still boot with the 4.15 kernel by default, and we don't want that to happen.
It's time to reboot your VM. Please note that it might take very long (think about four to eight minutes) to boot, this is a bug and I am not sure what's causing it. If it takes too long, switch between TTYs with CTRL + ALT + F2 and back to tty1 with CTRL + ALT + F1. Anyway, you can install Parallels Tools after you have logged in. If you don't know how to do that: in the menu bar, go to Actions, Install Parallels Tools. It can also be that it is called Reinstall Parallels Tools for you. Click it, and you'll see that an optical disk with the label 'Parallels Tools' has been mounted inside your VM. Open it, and copy all the contents from the drive to your Documents folder.
If there's only one file with some weird characters in the filename, please eject the disk in files and try redoing this part.
Open a terminal again (with CTRL + ALT + T) and navigate to your Documents folder with the
cd Documents command. We now need to make all files inside this directory executable in order to successfully install Parallels Tools. You can do this with the command
sudo chmod -R +x *. Install
libelf-dev too with the command
sudo apt install libelf-dev as it is required as a dependency for the build process. Execute the command
sudo ./install and Parallels Tools will install for you, without errors.
Make sure to remove the downloaded files and the Tools installation files in the Documents folder. Reboot your VM and you should see that everything works: 3D acceleration, bigger screen sizes, better mouse integration.
If something did not work for you, please tell me in the comments. If it did work for you, congratulations!