ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Updating the Linux boot image before migrating from VMWare to Hyper-V

    IT Discussion
    linux centos centos 5 centos 6 centos 7 initrd how to hyper-v migration vmware
    5
    13
    36.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      The Elastix 2.4 VM migrated well. I had to remove the network adapter afterwards and put in a legacy adapter from Hyper-V but then it came right up.

      1 Reply Last reply Reply Quote 2
      • R
        rg2016
        last edited by

        Hello. Was pointed to this thread by someone in the Spiceworks Community. I'm migrating VMware VMs to Hyper-V. Some are CentOS machines. In order to create an initramfs file with the hyper-v modules, do I need to install something for hyper-v in the VM as it sits on VMware? Thanks for any input.

        JaredBuschJ 1 Reply Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch @rg2016
          last edited by

          @rg2016 said in Updating the Linux boot image before migrating from VMWare to Hyper-V:

          Hello. Was pointed to this thread by someone in the Spiceworks Community. I'm migrating VMware VMs to Hyper-V. Some are CentOS machines. In order to create an initramfs file with the hyper-v modules, do I need to install something for hyper-v in the VM as it sits on VMware? Thanks for any input.

          No, this should be a core part of CentOS.

          R 1 Reply Last reply Reply Quote 0
          • R
            rg2016 @JaredBusch
            last edited by

            @JaredBusch said in Updating the Linux boot image before migrating from VMWare to Hyper-V:

            @rg2016 said in Updating the Linux boot image before migrating from VMWare to Hyper-V:

            Hello. Was pointed to this thread by someone in the Spiceworks Community. I'm migrating VMware VMs to Hyper-V. Some are CentOS machines. In order to create an initramfs file with the hyper-v modules, do I need to install something for hyper-v in the VM as it sits on VMware? Thanks for any input.

            No, this should be a core part of CentOS.

            Thank you very much!

            1 Reply Last reply Reply Quote 0
            • R
              rg2016
              last edited by

              Thank you for posting this. It was a great help to me. I found that I could use 5Nine to transfer the VM to Hyper-V, boot into rescue mode when bringing up the VM on Hyper-V and run the mkinitrd command. The VM then boots normally.

              JaredBuschJ 1 Reply Last reply Reply Quote 1
              • JaredBuschJ
                JaredBusch @rg2016
                last edited by

                @rg2016 said in Updating the Linux boot image before migrating from VMWare to Hyper-V:

                Thank you for posting this. It was a great help to me. I found that I could use 5Nine to transfer the VM to Hyper-V, boot into rescue mode when bringing up the VM on Hyper-V and run the mkinitrd command. The VM then boots normally.

                That is what I posted above. You had to do it either before or after the migration. I had current backups to roll back to in case of a problem, so I simply did it prior to the migration. Either way works to rebuild it though.

                1 Reply Last reply Reply Quote 0
                • dengelhardtD
                  dengelhardt
                  last edited by

                  I've successfully migrated several Ubuntu VMs from ESXi and XenServer to HyperV 2012 by exporting the VM and then using Starwind's VHD converter. I've not had to run any scripts on the Linux VMs before shutting them down and exporting.

                  1 Reply Last reply Reply Quote 1
                  • AdamFA
                    AdamF
                    last edited by

                    SUPER old post, I know, but I am running into this issue as well.

                    I am migrating one VM (CentOS 7, FreePBX) from a KVM VM to a Hyper-V server. I used the conversion tool "qemu-img" which worked great for another Windows workload I converted.

                    I did not run the command as you noted in the post before the conversion. so now I am stuck with a boot error:

                    Warning /dev/s7_freepbx/root does not exist
                    Warning /dev/s7_freepbx/swap does not exist
                    

                    I booted into rescue mode with a recovery DVD/Image. I pressed 1 to continue. It told me "Your system has been mounted under /mnt/sysimage. I pressed return to drop into a shell.
                    I tried the command below.

                    mkinitrd -f -v --with=hid-hyperv --with=hv_utils --with=hv_vmbus --with=hv_storvsc --with=hv_netvsc /boot/initramfs-$(uname -r).img $(uname -r)
                    

                    I got the error:

                    dracut: Cannot find /usr/lib/dracut/dracut-init.sh
                    

                    So I typed "chroot /mnt/sysimage" and tried the command again.

                    and got the error below
                    hyper-verrror.png

                    1 Reply Last reply Reply Quote 0
                    • AdamFA
                      AdamF
                      last edited by

                      After I posted this, I ran the same command again, and it appeared to complete successfully. Then I rebooted and got the same exact error message.

                      Warning /dev/s7_freepbx/root does not exist
                      Warning /dev/s7_freepbx/swap does not exist
                      
                      1 Reply Last reply Reply Quote 0
                      • AdamFA
                        AdamF
                        last edited by

                        In case anyone else runs across this same issue, I got this resolved with a simple command:

                        dracut --regenerate-all -f && grub2-mkconfig -o /boot/grub2/grub.cfg
                        

                        After doing this, everything booted up properly.

                        I then installed hyperv-daemons, rebooted, and everything works great.

                        1 Reply Last reply Reply Quote 2
                        • 1 / 1
                        • First post
                          Last post