Hello
We were trying to convert a DELL server into a virtual image (P2V) using VCenter Converter 4.0 (ESXi4.0). There was no error during the whole convert process. However, once the virtual machine booted up we received the following error message:
root ( hd0,2)
Error: 22. no such partition
We modified the boot partition from (hd0,2) to (hd0,0) and received the following errors:
insmod: error inserting '/lib/accraid.ko': -1 No such devices
ERROR: /bin/insmod exited abnormally (pid 507)
No volume groups found
Volume group "VolGroup_ID_5090" not found
ERROR: /bin/lvm exited abnormally (pid 534)
mount: error 6 mounting ext3
mount: error 2 mounting none
switchroot: mount failed: 22
umount /initrd/dev failed: 2
kernel panic - not syncing: Attempted to kill init!
Any idea how we can fix this? Thanks.
rguang,
Welcome to the VMware Converter Community Forum!
Yeah, it looks like you had logical volumes or software raid on source system. the virtual machine will not contain any logical volumes or pointers, so that's where we are seeing some errors now.
It should be possible to resolve this via a Linux Rescue off of the OS disc. Please forgive poor formatting as this is copy and paste, and you will need to modify the steps to suit your specific virtual machine. This is very similar to a KB we have: http://kb.vmware.com/kb/1002402/
I have not personally tested this process. I would suggest taking a snapshot of the virtual machine before modifying it. If the steps work, then commit the snapshot to save your changes.
Boot cd
F5
Linux rescue
English
Us
No to network
Continue to mnt system
Ok
Chroot /mnt/sysimage
Cd /etc
Mv lvm lvm.bak
Rpm --erase --nodeps lvm2
(Error may occur with above command. Just continue to the next step)
Issues above – error: %postun(lvm2-2.02.06-6.0.RHEL4.i386) scriptlet failed, exit status 255
Rpm -- erase -- nodeps dmraid
Nano /boot/grub/grub.conf
Remove lines so there are only 3 selections remaining
Change h0,2 to hd,0 (or 1)
Replace VolGroupID_XXXX…/LogVolX with sdb1
Ctrl – 0
Ctrl – X
Nano /etc/modules.conf (should be blank)
Nano /etc/modprobe.conf
The lines should match the following:
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih
alias scsi_hostadapter2 mptscsih
alias scsi_hostadapter3 mptscsih
alias scsi_hostadapter4 mptscsih
(as may as are listed. Do not add additional lines)
Ctrl-O
Ctrl-X
Cd /
Cat /etc/grub.conf and do a print screen for reference.
Ls /lib/modules
Verify the initrd file referenced in grub.conf is present in the modules directory.
Mkinitrd –v –f /boot/initrd-EvilOne
VMware vExpert 2009
NOTE: If your problem or questions has been resolved, please mark this thread as answered and award points accordingly.
Thanks a lot.
I will give a try and let you know if it works.
It worked with some minior errors.
Thanks for the help!
Any feedback is useful for tuning the documentation, as I am looking to get this into a formal KB article.
Regards,
EvilOne
VMware vExpert 2009
NOTE: If your problem or questions has been resolved, please mark this thread as answered and award points accordingly.
One thing to note that, when the system reboots it shows some SELinux related messages:
Warning: SELinux relabel is required
Disabling security enforcement
Relabling could take a very long time
depending on file system size
Apparently our file system is like 200G......
Thanks, this saved me after some experimentation!
I would just like to note that the root (hd0,1) setting for each grub entry seems to be pretty dynamic. I looked at the /etc/grub.conf file once I re-ran grub-install /dev/sda in order to see where it points to the grub files (this line: splashimage=(hd0,0)/grub/splash.xpm.gz)
Then I knew I had to set root (hd0,0) in order for grub to find my initrd file on boot
Hope that helps someone else who doesn't know too much about editing grub!
Hello,
I've performed all the recommended steps on this forum and I'm still hitting a brick wall doing a P2V conversion.
my errors:
----------------------------------------------------------------------------
Loading dm-snapshot.ko module
md: Audodetecting RAID arrays.
md: autorun ...
md: Autodetecting RAID arrays.
md: autorun ...
md: ...autorun DONE.
Making device-mapper control node
scanning logical volumes
Reading all physical volumes. This may take a while...
cdrom: open failed.
No volume groups found
Activating logical volumes
cdrom: open failed.
Volume group "main" not found
Error: /bin/lvm exited abnormally! (pid 510)
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mouting none
Switching to new root
switchroot: mount failed: 22
unmount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!
--------------------------------------------------------------------------------
Before following the instructions my grub.conf looked like this:
default=0
timeout=5
title Mitel Standard Linux (2.6.9-55.0.2.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.2.ELsmp ro root=/dev/main/root
initrd /initrd-2.6.9-55.0.2.ELsmp.img
initrd /intird-2.6.9-55.0.2.ELsmp-virt.img
title Mitel Standard Linux-up (2.6.9-55.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.2.EL ro root=/dev/main/root
initrd /initrd-2.6.9-55.0.2.EL.img
initrd /initrd-2.6.9-55.0.2.EL-virt.img
I changed the "root=/dev/main/root" to "root=/dev/sda2/root" and still received the error. I've been going at this for almost 2 weeks now and could gladly use some assistance.
Thanks in advance.