HyperV; Copying or Moving a Virtual Machine

Jump to navigation Jump to search

Ingredients of this Issue

Hyper-V on Windows Server 2012 or 2016 Host

CentOS 7 (should work with other versions), Generation 2 Virtual MachineT

The Issue

The Virtual Machine will not boot.

The Error Message

Failed to open \EFI\... Not Found


Failed to load image \EFI\Boot... Not Found

The Solution

Boot from a DVD, preferably a recent one. Follow the prompts of the boot DVD, have it find the OS, mount the found OS as the root file system (the boot DVD will prompt you for these items)

mv /boot/efi/EFI/BOOT /boot/efi/EFI/BOOT.old
cp -R /boot/efi/EFI/centos /boot/efi/EFI/BOOT
cp /boot/efi/EFI/BOOT/shimx64.efi /boot/efi/EFI/BOOT/BOOTX64.efi
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg 


A Suggestion

Make a copy of the Virtual Machines VHDX file first.

An Alternative

This is another suggestion I found, but did not try.