Install on 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 managed to run the image with Proxmox, which used KVM and Qemu, on the same settings as Ubuntu 18.04. The exact options vary between KVM front ends but choosing a modern Linux version or a modern Linux Kernel version should do the trick - at least it did for me.

Do you get any errors when trying to start the machine?

Thanks

No error messages. Get the SeaBIOS message, the iPXE line, and Booting from Hard Disk. Looks like it’s freezing on boot.

I’m doing this on Fedora Server 32.

I believe that you need to use a UEFI boot environment. I believe that the OVMF UEFI is installed by default with KVM on RedHat based systems but can otherwise can be installed with the edk2-ovmf package.

I checked and already have edk2-ovmf installed. This gave me a clue and with a little searching I found this:

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.

Thanks for your help!

I’m new to Ubuntu and have been a Windows guy my whole life so I went a slightly different path.
Since I’m not as familiar with the command line interface of Ubuntu, I managed to get my base server up and running, connected to the Internet, Cockpit installed with all of the normal dependencies loaded. I created the bridge network my VMs would need to attach to my network with traditional IP ranges from my DHCP server.

From here, I used Cockpit to create a Ubuntu Desktop VM. From the desktop VM, I installed virt-manager which I use to manage the VMs on my base server. This allowed me to follow the Home-Assistant instructions for setting UEFI and selecting the correct generic OS image. Once I had everything setup, I simply turn the desktop VM off until I need it again.

It took me some time, I learned allot but I’m now comfortable with how everything is setup.

Mike