KB ID: 115917
Overview
When restoring a CentOS VM, backed up from an ESXi server (VMware), to a Hyper-V server, the Instant Boot recovery fails, and the VM enters Shell Emergency mode during the recovery process on Hyper-V.
Steps to Resolve
Follow these steps on the Linux-based machine to resolve the issue and successfully restore the CentOS VM from VMware to Hyper-V.
1. Modify the Boot Image
Ensure the necessary drivers are included in the boot image by running the following command:
sudo dracut -f -v -N
2. Verify Hyper-V Drivers in the Boot Image
After modifying the boot image, confirm that Hyper-V drivers are present by running:
lsinitrd | grep hv
- If Hyper-V drivers are included, the output will list files or modules such as:
/lib/modules/4.15.0-123.el7.x86_64/kernel/drivers/hv/hv_vmbus.ko
/lib/modules/4.15.0-123.el7.x86_64/kernel/drivers/hv/hv_storvsc.ko
- If no output is returned, it indicates that Hyper-V drivers are missing, and further actions are required to include them.
3. Check and Modify dracut Configuration Files
- Verify that no dracut configuration files contain the line hostonly="yes", as this can restrict the drivers included in the boot image. Use the command:
grep -r 'hostonly=' /usr/lib/dracut/dracut.conf.d/
- If any configuration files contain hostonly="yes", edit them to set hostonly="no" to include all necessary drivers.
After ensuring the correct drivers are included in the boot image:
- Perform a new full backup using the Backup and Disaster Recovery (BDR) system.
- Once the backup is complete, initiate Instant Recovery to the Hyper-V server.
The CentOS VM should now boot successfully without entering emergency mode.
Conclusion
By modifying the boot image, verifying the presence of Hyper-V drivers, and updating configuration files, you can resolve the issue of a CentOS VM entering Shell Emergency mode during Instant Boot recovery on Hyper-V. These steps ensure a smooth cross-platform restore from VMware to Hyper-V.