KVM gets stuck at "Booting from hard disk"

Miodrag asked:

I am trying to run Ubuntu-server-16.04 virtual machine on a KVM converted from .vhdx (Hyper-V) to .qcow2 (KVM).

When I import my virtual disk image and start virtual machine, the KVM hangs on “Booting from Hard Disk”. I’ve already managed to import almost the same virtual machine, but that VM had the Grub boot loader installed, so I guess that’s the problem.

I’m wondering if there is any way to import the virtual machine on the KVM that does not have the Grub boot loader?

My answer:

Virtual machines created on Hyper-V these days are almost always Generation 2 virtual machines. These boot with UEFI. In order to boot the VM on a different hypervisor, you must configure it to boot with UEFI.

For instance, using virt-manager you would set UEFI (and Q35 chipset) while importing the virtual machine image.

virt-manager customize VM screenshot

If the UEFI option is disabled, you need to install the OVMF firmware package on your system, which provides UEFI firmware to virtual machines. The package name varies depending on Linux distribution, and you didn’t say what you were running, so you will need to find this yourself.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.