9

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?

JonathanDavidArndt
  • 1,414
  • 3
  • 20
  • 29
Miodrag
  • 91
  • 1
  • 1
  • 4

1 Answers1

9

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.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Thank you @Michael Hampton, you are good man, you realy helped me ! – Miodrag Mar 01 '18 at 12:43
  • 2
    Exactly what I needed. I didn't use Q35 however, I used 1440FX. the ovmf firmware package was key I just `sudo apt install ovmf` for success. – Lon Kaut Oct 17 '18 at 22:29
  • 1
    @LonKaut I just saw your comment today. It's 2020 and now there is no reason to use i440fx except to run obsolete operating systems e.g. Windows 2000 and earlier. This simulates a 1996-era PC and isn't very appropriate for today's OSes, even if it does mostly work. The default is now Q35 anyway in current versions of libvirt/virt-manager. – Michael Hampton Sep 01 '20 at 20:54