Difference between revisions of "HyperV; Copying or Moving a Virtual Machine"

Wiki.TerraBase.info
Jump to navigation Jump to search
Line 1: Line 1:
=== Ingredients of this Issue ===
== Ingredients of this Issue ==
Hyper-V on Windows Server 2012 or 2016 Host
Hyper-V on Windows Server 2012 or 2016 Host


CentOS 7 (should work with other versions), Generation 2 Virtual Machine
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 ==
[https://noobient.com/post/165797742756/fixing-the-efi-bootloader-on-centos-7 This] is another suggestion I found, but did not try.

Revision as of 14:04, 15 February 2018

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.