Wednesday, April 27, 2022

Installing arm64 version of Ubuntu Server 22.04 as virtual machine in Proxmox

After installing the arm64 version of Debian as a virtual machine in Proxmox, I used the same procedure to install Ubuntu Server 22.04 for arm64, using the ISO image from here. (See end of this post for a step by step.)
 
Like the Debian installation, the entire installation process took around one and a half hours to complete. Ubuntu Server 22.04 does not come with a desktop environment, and there was no option to choose one during the installation process. It will need to be manually installed subsequently.
 
Unlike the Debian installation, when rebooting, grub boots up fine and I go straight into Ubuntu without having to go through the EFI shell.
 
Note that this is not a net installer, so you will need to use apt to update the packages installed.

I went on to install a desktop environment with
sudo apt install xubuntu-desktop
which took around two and a half hours to install... anyway, I chose lightdm for the display manager when prompted during the process. After rebooting, I was able to use Proxmox's noVNC client to see this screen.


This is the Tellsis language translator on the "Software" app of Ubuntu. It is automatically built for arm64 platform by snapcraft, and can be installed via the "latest/edge" channel. Ubuntu has integrated snap into its software backend and thus snap packages available on the Snap store will also show up in the "Software" app of Ubuntu. This makes installing snap packages very easy in Ubuntu. Of course, not everyone likes the snap concept... but that's another story.

After installing it, yes, I managed to run it. 😍

This VM is definitely much slower than running on bare metal arm64, but that is because you are trying to use a x86 platform to emulate a arm64 one. For reference, I installed this VM (and the Debian one) on a Dell Poweredge R720 rack server with dual E5-2667v2 processors (base 3.3GHZ, boost up to 4GHz, all-core boost 3.6GHz).
 
Step by step instructions:

I have taken the instructions for Debian from here and adapted it for the following set of instructions which I used to install Ubuntu Server 22.04, arm64 version.
 
- Upload the Ubuntu arm64 iso to the Proxmox server, either by downloading it to a local computer and then uploading to the server, or using the web UI to download it directly to the server
- Use the Proxmox web UI to create a VM on the node you want
- Give the VM a name and assign it a VM ID; in this example, the VM ID will be 101 > Next
- For OS, set the Type to Linux, Version to 5.x - 2.6 Kernel and select Do not use any media > Next
- On the System tab set the BIOS for OVMF (UEFI), Uncheck the Add EFI Disk checkbox > Next
- On the Hard Disk tab, set the Storage device and Disk size to 16 (adjust as needed) > Next
- On the CPU tab, set the number Cores to 4 (adjust as needed) > Next
- On the Memory tab, set the Memory to 8192 (adjust as needed) > Next
- Leave the defaults on the Network tab > Next
- Verify the summary and click Finish
- Select the VM in the left navigation pane
- Select Hardware from the left navigation sub-menu
- Click on the CD/DVD Drive to select it > Click Remove at the top of the main content area > Click Yes to confirm
- Click Add > Serial Port > Leave the Port Number 0 > Click Add
- Click Add > Select CD/DVD Drive > Set the Bus/Device to SCSI > Select the Storage device where the Ubuntu arm64 iso is uploaded > Select the uploaded Ubuntu arm64 iso > Click Create
- Double click Display to edit it > Set the Graphic card value to Serial terminal 0 > Click OK
- Select Options from the left navigation sub-menu
- Double click Boot order to edit it > Drag/drop the SCSI2 device (where the Ubuntu iso is attached) to the top of the list > Click OK
- Right click the ProxMox node name > Console
- Run the following commands in the terminal
# edit the VM conf file, change 101 to the VM ID for the VM
nano /etc/pve/qemu-server/101.conf
- Add the following line to the bottom of the .conf file:
arch: aarch64
- Find the line starting with vmgenid: and comment it out by adding a # to the beginning of the line
- Press CTRL+O, Enter, CTRL+X to write the changes to the conf file
- Back in the Proxmox web UI, select the VM from the left navigation menu
- Click console in the left sub-navigation menu
- Click Start at the top right of the screen to start the VM
- Wait a moment for the serial console to initialize
- Follow the prompts to complete the OS installation
NOTE: This will feel slower than normal, allow it time to complete; for me, it took around one and a half hours
- After the installation completes, at the prompt to reboot, do not reboot; instead, select the Shutdown dropdown at the top of the screen > Stop
- Select Hardware from the left sub-navigation menu
- Double click the CD/DVD Drive to edit it > Select Do not use any media > Click OK
- Go back to the VM console
- Click Start at the top right of the screen to start the VM again
- The GRUB menu should boot and start loading Ubuntu

Hope this helps!

(Old... does not really help...) Note: initramfs takes a long long time to create boot images because it uses zstd. One way is to change to gzip instead by 
sudo nano /etc/initramfs-tools/initramfs.conf
and changing the line
COMPRESS=zstd
to
COMPRESS=gzip
instead.

No comments: