1 2 Previous Next 16 Replies Latest reply on Mar 5, 2017 6:43 PM by Bigwills24

    V2V LVM2 Conversion and resize causes kernel panic

    ThatITguy201110141 Lurker

      After not seeing an option for using Converter 5 Beta to convert a powered off CentOS 5 VM to a larger VM with a bigger hard drive, I attempted to convert a powered on CentOS 5 VM (formatted with LVM2) using the "Powered-on machine" source type.

       

      After setting the VirtualDisk1 (/boot) to thin and VirtualDisk2 (/ and swap) to thin as well and changing the size of / from 15.97 to 100 gigs I kicked off the converter job and it completed successfully.  Powering on the converted VM and the error messages are displayed:

       

      * Mounting /dev/VolGroup00/LogVol00 on /sysroot

      mount: mounting /dev/VolGroup00/LogVol00 on /sysroot failed: No such file or directory

      mount: mounting /dev on /sysroot/dev failed: No such file or directory

      * Switching / to /sysroot

      switch_root: bad newroot /sysroot

      Kernel panic - not syncing: Attempted to kill init!

       

       

      Is this configuration supported and what can I do to get it to work?

        • 1. Re: V2V LVM2 Conversion and resize causes kernel panic
          ivivanov Expert
          VMware Employees

          Unfortunately CentOS is not officially supported by Converter 5. I have tried your steps and was able to reproduce the problem. As a workaround I can suggest two options:

           

          1. Option 1 - in the Converter wizard, on Data to copy page, switch to Advanced view, select Destination, in the table with target virtual disks select the one where the root partition resides and click the "To Basic" button below the table. This will trigger the old 4.3 behavior where LVM was not preserved and / will be stored in a basic volume. The destination VM will boot, however your root folder will be no longer in a LVM volume. If it is OK for you this is the easiest way.

           

          2. Option 2 - rebuild initrd image manually. I have followed the steps described at http://comments.gmane.org/gmane.linux.centos.general/106216 (scroll to the last post) and it worked for me. To summarize the steps I have done:

           

          • Boot from a rescue disk/live CD
          • Activate the root filesystem logical volume on the target if not recognized (lvchange -a y VolGroup00/LogVol00 should be enough, VolGroup00 and LogVol00 should be replaced with the actual volume group name and logical volume name, they could be obtained through vgscan and lvscan)
          • Mount the root filesystem under e. g. /mnt/root (mount /dev/VolGroup00/LogVol00 /mnt/root)
          • Mount boot partition under /mnt/root/boot (mount /dev/sda1 /mnt/root/boot in case boot partition is /dev/sda1)
          • Mount /dev, /proc and /sys filesystems under /mnt/root with these commands:
            • mount /dev /mnt/root/dev
            • mount /proc /mnt/root/proc
            • mount /sys /mnt/root/sys
          • Change root to be /mnt/root (chroot /mnt/root)
          • Backup the existing initrd image
          • Run mkinitrd command, e. g. mkinitrd -f /boot/initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5. Note the initrd image name must be the same as the one originally backed up (because if changed grub.conf should be updated to reflect the new name). The kernel version must also match.
          • Exit and reboot.

           

          Hope this helps,

          Ivan

          • 2. Re: V2V LVM2 Conversion and resize causes kernel panic
            ds236 Novice

            I tried to use method 1 above. In the advanced, there's no "To Basic" button as described. At least not in the present version of the converter. There is a "basic" link above the table that takes you back to the basic, but it wasn't clear if this would have the effect you described.

             

            Since I had Converter 4.3 on another virtual machine on my Mac, I ran an experiment with that. Indeed 4.3 did the conversion into my vSphere 5.0 environment without trouble. I then went in and checked on the target with the client, and had to issue an "update virtual machine hardware", since I got a warning when I tried to edit the VM. So I did that, then adjusted parameters as needed, and the CentOS machine worked.

             

            CentOS will be supported as well (or poorly) as RedHat, really. It's the same distribution save for branding and cosmetics. I'd be really surprised if the 5.0 converter produced any different results with a RHEL 5.x P2V conversion.

             

            RHEL 3.x and CentOS 3.x on the other hand are not handled by the Converter in any usable form.

            • 3. Re: V2V LVM2 Conversion and resize causes kernel panic
              ivivanov Expert
              VMware Employees

              I tried to use method 1 above. In the advanced, there's no "To Basic" button as described. At least not in the present version of the converter. There is a "basic" link above the table that takes you back to the basic, but it wasn't clear if this would have the effect you described.

              You need to use Converter 5.0. You need to select "Advanced" view above the table, it opens a page with two tabs - Source volumes and Destination volumes. Each of them contains a table. After you select Advanced view you need to switch to Destination volumes tab (by default Source volumes is selected) and after selecting a virtual disk you have the option to convert it to Basic or to LVM using a button below the table.

              CentOS will be supported as well (or poorly) as RedHat, really. It's the same distribution save for branding and cosmetics. I'd be really surprised if the 5.0 converter produced any different results with a RHEL 5.x P2V conversion.

              We have tested RHEL 5.0 and it worked. Obviously there are some differences after all.

              RHEL 3.x and CentOS 3.x on the other hand are not handled by the Converter in any usable form.

              RHEL 3.x should be supported by Converter 5.0. What problems do you have?

              • 4. Re: V2V LVM2 Conversion and resize causes kernel panic
                ds236 Novice

                Yes, I switched to Advanced, then to Destination. There is no button "To Basic". Ah, I found it. There's a greyed-out button "To LVG" that changes to "To Basic" when in there. That wasn't so obvious. I'll try this on a conversion during a maintenance window this evening.

                 

                In my case, I really did want to get rid of LVM on the machines I'm converting, so this is a big help. With VMWare, it seems like doing a V2V would be sufficient for changing the disk size, should it ever be needed anyway.

                 

                Too bad VMWare doesn't bother supporting the exceptionally-popular CentOS. Funny, though, that some of your virtual appliances are actually built on CentOS. VMDR, for example.

                 

                As for CentOS 3, the conversion results in a non-functional VM. Could be the same disk issues I suppose. End result is a VM that gets copied, but will not boot. Also note that the "Reconfigure destination virtual machine" checkbox is greyed out when converting a CentOS 3 machine. I'd be delighted if you have any details on ways to get the converter to take care of CentOS 3. I've got three ancient physical servers I'd love to get virtualized. We will ultimately build VMs with newer Linux to replace them, but the timeline to complete that project may be longer than the remaining lifespan of the old server hardware, so virtualizing first makes sense (it'll also save a ton of power that the old machines waste).

                • 5. Re: V2V LVM2 Conversion and resize causes kernel panic
                  ds236 Novice

                  With CentOS 3, when running the 5.0 converter it puts up a yellow warning triangle and the message: "Warning: The destination guest OS cannot be reconfigured. It may not boot up properly."

                   

                  Beyond that, I get "the specified network name is no longer available" at 11%. This is especially interesting since the physical machine is on the same network segments as CentOS 5 and Windows Server machines that I've successfully converted. Data is clearly copied for a good while, with the counters marching along nicely. When the converter puts up its FAILED message, a tar process and an sshd process are left behind on the source. It's not clear if the complaint is the client talking to the source, client to destination helper, client to vcenter, helper to source, or some other combination.

                  • 6. Re: V2V LVM2 Conversion and resize causes kernel panic
                    adrianodsb Lurker

                    The second method worked for me, many thanks.

                     

                     

                    • 7. Re: V2V LVM2 Conversion and resize causes kernel panic
                      robroxy Lurker

                      Often converting CentOS 4/5 from Xenserver to VMWare requires using this mkinitrd command (with modules):

                       

                      mkinitrd -f -v --with=scsi_mod --with=sd_mod --with=mptbase --with=mptspi --with=mptsas --with=mptscsih /boot/initrd-2.6.18-371.4.1.el5.img 2.6.18-371.4.1.el5

                       

                      This helped me a lot !!!

                       

                      see also this and RedHat related topic:

                      http://efreedom.net/Question/2-457443/Issues-Migrating-CentOS-Xen-Guest-VMWare

                      • 9. Re: V2V LVM2 Conversion and resize causes kernel panic
                        pigio Lurker

                        dracut -f .....

                         

                        work for me in Debian Squeeze ;-)

                        • 10. Re: V2V LVM2 Conversion and resize causes kernel panic
                          useraf Novice

                          Hi all,

                           

                          I've a similar problem, using Converter 5.5 to virtualize Suse-10.1 server.

                          I was trying all options, but allways I obtained a kernet panic...

                           

                          In this foro-thread I resumed all the steps I did, but I've haven't any help : http://www.forosuse.org/forosuse/showthread.php?t=32288

                           

                          Thanks in advance

                           

                           

                           

                          • 11. Re: V2V LVM2 Conversion and resize causes kernel panic
                            claudiovt Lurker

                            Maybe an old issue, but version 6.0 of VMConverter worked for me.

                            I tried 5.5 which gave me the /sysroot failed error and also 4.3 which did not even listed the volumes, only the /boot  partition.

                            • 12. Re: V2V LVM2 Conversion and resize causes kernel panic
                              useraf Novice

                              In these threads I explained how I solved this problem :

                               

                              Re: Kernel panic -- boot Suse-10.1 virtualized

                               

                              Kernel panic al arrancar Suse 10.1 VMware - ForoSUSE

                               

                              In our case, the software version wasn't the problem

                              • 13. Re: V2V LVM2 Conversion and resize causes kernel panic
                                hcrissman Lurker

                                Centos wiki link worked for me on Centos/Scientific Linux 6.6.

                                • 14. Re: V2V LVM2 Conversion and resize causes kernel panic
                                  ramonxavier Lurker

                                  After a long time I can solve this problem. Here what I do:

                                   

                                  * Before convert machine, make a copy of your initrd.img from your /boot

                                       e.g: cp /boot/initrd.img-2.6.26-2-amd64 /boot/initrd.img-2.6.26-2-amd64.bkp

                                  * Convert your machine (In this case I used the version 5.5)´

                                  * Boot the VM with problem with a Live CD in rescue mode

                                  * Mount my /boot in some path like /root/boot/

                                      # mount /dev/sda1 /root/boot/

                                  * Recover you backup of you initrd.

                                       # mv /root/boot/initrd.img-2.6.26-2-amd64 /root/boot/initrd.img-2.6.26-2-amd64.bkp2

                                       # mv /root/boot/initrd.img-2.6.26-2-amd64.bkp /root/boot/initrd.img-2.6.26-2-amd64


                                  * Reboot you VM.


                                  This works for me!

                                   

                                  Sorry for english!

                                  1 2 Previous Next