Kernel Panic error after migrate Linux VM from ESXi to HYPER-V

Various Linux Servers maybe have in your environment for different purposes. But how can migrate from Esxi to HYPER-V if requested? Today you can find different solutions to do the migration.

I have try different solution like 5Nine , MVMC ,Statwind V2V Converter . For Windows convertion all works well but for Linux conversion i get an error when try to start VM in HYPER-V after conversion.

Kernel panic - not syncing: Attempted to kill init  .......   

After that nothing happened.

What you must done to resolve this error after finish the conversion from Esxi to Hyper-v ?

This is the topic that i would like to discuss today.

The specific problem related with Centos 5.9 which used by specific server in my environment.

I didn't have try with previous or earlier versions to check if the same problem exist.

So if you have Centos 5.9 and try to migrate your Linux Server from Esxi to HYPER-V  prepare to face kernel error while first boot from HYPER-V.

Why this happened?

This can be happened when add the Linux Integration Components through  installation process of HYPER-V

After that follow the steps to resolve the error.

  • When boot with Centos DVD iso then you will see the first screen.
  • Type F5 to boot in rescue mode

.

  • Type linux-rescue to start Centos in rescue mode.

  • Select your language and click OK

  • Select the type of keyboard and click OK

  • Select if you want to enable the network interface.

  • Click Continue to start find the Linux installation.

  • When finish click OK in the info which say that find and mount the installation under /mnt/sysimages

  • Now you are in command mode.
  • Find and open the file grub.conf which most of the times you can find it in etc/grub.conf to identify the exact version of install kernel.
  • Now run the following command and replace the version with the version that you find in grub.conf

mkinitrd /boot/initrd-VERSION.el5.img VERSION.el5 --preload hv_storvsc --preload hv_vmbus --preload hv_utils -f

For example in my case the kernel version was 2.6.18-348.1.1.el5

mkinitrd /boot/initrd-2.6.18-348.1.1.el5.img 2.6.18-348.1.1.el5 --preload hv_storvsc --preload hv_vmbus --preload hv_utils -f

  • type exit 2 times and the Centos will reboot.
  • This time the Centos will start normally in your HYPER-V Host.

It's hard when you run a migration and face this problems. You want to proceed smoothly without need to search for hours or days for the solution.

If you are still here you maybe find helpful our Tools Page that include tools from different categories like Hyper-v,Backup,Training and more.

I hope this small article to find it useful and use it if you face same problem.

Have a nice weekend!!

Don't forget before leave from the article to share with us your experience or your issue with related article in our commented system

Tags