HyperV; Copying or Moving a Virtual Machine
Revision as of 16:05, 22 January 2020 by Root (talk | contribs) (Root moved page Hyper-V; Copying or Moving a Virtual Machine to HyperV; Copying or Moving a Virtual Machine without leaving a redirect)
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
or
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
Reboot.
A Suggestion
Make a copy of the Virtual Machines VHDX file first.
An Alternative
This is another suggestion I found, but did not try.