Trying to install on Fedora Server 32 w/KVM

I’ve tried to use the QCOW2 VM file on my server. When I import it using Cockpit, it has to know what OS am I installing. Generic Linux isn’t an option. Anything else I’ve tried locks up the VM on boot. What should I use if I want to run the QCOW2 VMfile?

I am using KVM on Fedora 32 and it installed flawlessly through virt-manager. Sorry, I have never used Cockpit to do anything with the VMs other than look at them. I know it’s kind of new and is RedHat’s future view, but apparently doesn’t have the controls you need for selecting setting up a special VM like this. Maybe it’s UEFI that is tripping you up?

I didn’t want to use virt-manager since it’s been deprecated by Red Hat. I’m also running this as a bare metal server with no graphical interface.

I had to edit the config for the vm (virsh edit vm_name). Looked for the section and added the line (This is specific for Fedora 32, but should work with minor path/file edits)

<loader readonly='yes' type='rom'>/usr/share/OVMF/OVMF_CODE.fd</loader>

It now boots and works fine.

1 Like

Glad you found a working solution for Cockpit. My config, created by virt-manager:

<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>

Now, I have learned something new (if we are to trust the KVM editor who allowed a typo on the most crucial detail. lol)

Whether the boot loader is a typical BIOS (rom) or a UEFI firmware (pflash). Each value sub-element under the type enum represents a possible value for the type attribute for the element in the domain XML. E.g. the presence of pfalsh under the type enum means that a domain XML can use UEFI firmware via: type=“pflash” …>/path/to/the/firmware/binary/.

https://libvirt.org/formatdomaincaps.html#elementsOSBIOS

Any thoughts on what file I should be choosing using CentOS 8?

The following files are installed in /usr/share/edk2/ovmf are:

EnrollDefaultKeys.efi  
OVMF_CODE.cc.fd  
OVMF_CODE.secboot.fd  
OVMF_VARS.fd  
OVMF_VARS.secboot.fd  
Shell.efi  UefiShell.iso

I’ve also tried forcing the os tag to ‘efi’ using the following which shows correctly in Cockpit as UEFI option, but still fails to boot.

  <os firmware='efi'>
    <type arch='x86_64' machine='pc-q35-rhel8.2.0'>hvm</type>
    <boot dev='hd'/>