How to install HASS on OpenMediaVault on a Virtual Machine?

I would like to run Home Assistant (HASS) in a virtual machine on OpenMediaVault 5. Up until OMV 4, this was easy because OMV (and the underlying Debian) supported VirtualBox and VB apparently didn’t have any problems booting UEFI images. Because OMV 5 (and the underlying Debian 10) no longer support VirtualBox, OMV now uses KVM ( libvirt ) for virtual machines (and it supports Cockpit to manage them). Unfortunately, this entails that it is no longer trivial to boot UEFI images on OMV/Debian 10, and - you guessed it - the official Home Assistant image for KVM (QCOW2) needs UEFI and trying to import and boot it in Cockpit will fail. I was unable to find any button or command in Cockpit that allows me to set the boot mode to UEFI.

I somehow managed to figure it out and documented my solution here:

Book marked for future reference.

I’ve been pondering putting Hass on my OMV server for a wile. I updated OMV to ver 5 a few weeks ago. And was not aware of the underlying system changes to the virtual side of things.

Thanks.