Super User Asked on January 1, 2022
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.
So what I’m trying to achieve is to boot a QCOW2 image in UEFI mode on a headless system, i.e. without virt-manager
. (If you are on a desktop machine, I believe you won’t have this problem but can just use virt-manager
instead of Cockpit.)
So how do you do it?
Disclaimer: I am not really familiar with UEFI, don't even know exactly what it does, so if this answer can be improved, please comment or edit accordingly.
This is what worked for me:
apt-get install ovmf
cd /usr/share/ovmf/
Check that the file OVMF.fd
is there, because that is what libvirt
needs to boot the image. (If yours is somewhere else for some reason, find it and change the path below accordingly.)
Assuming that you already have created a virtual machine called HASS (using the import image button in Cockpit and using the QCOW2 image provided on the home assistant installation page, you can now edit that VM on the command line (make sure the machine is turned off before proceeding):
virsh edit HASS
Locate the section, mine looked like this:
<os>
<type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
<boot dev='hd'/>
</os>
And insert <loader readonly='yes' type='rom'>/usr/share/ovmf/OVMF.fd</loader>
after the type tag:
<os>
<type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
<loader readonly='yes' type='rom'>/usr/share/ovmf/OVMF.fd</loader>
<boot dev='hd'/>
</os>
Save and exit and you're done. If you now start VM it should boot the HASS image.
Answered by Christoph on January 1, 2022
0 Asked on October 8, 2020 by user2014551
1 Asked on October 7, 2020 by antsamotady
3 Asked on October 7, 2020 by wtrdk
0 Asked on October 5, 2020 by nai
2 Asked on October 4, 2020 by ruben
1 Asked on October 3, 2020 by herdsman
0 Asked on October 2, 2020 by wilkadam
1 Asked on October 1, 2020 by quant
1 Asked on October 1, 2020 by chaklader-asfak-arefe
0 Asked on September 30, 2020 by e-kochkurov
1 Asked on September 29, 2020 by marselliusw89
5 Asked on September 27, 2020 by pacerier
1 Asked on September 26, 2020 by bdr9
jumplist microsoft office microsoft office 2013 taskbar windows 7
2 Asked on September 23, 2020 by user2129761
0 Asked on September 23, 2020 by kishore-babu
0 Asked on September 19, 2020 by chris
1 Asked on September 17, 2020 by helloworld1e
1 Asked on September 16, 2020 by glenneroo
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP