So you P2V’d a Linux box (CentOS, RedHat, Oracle, etc.) that is using LVM and now when it boots you get:
Reading all physical volumes. This may take awhile…
Volume group “VolGroup00” not found
Unable to access resume device (/dev/VolGroup00/LogVol01)
mount: could not find filesystem ‘/dev/root’
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic – not syncing: Attempted to kill init!
Well that sucks–basically initrd didn’t have the right drivers to access the file system.
Reboot the VM with the Linux distro ISO attached
Then it boots from the CD follow the instructions to enter Linux Rescue (usually you type “linux rescue” at the boot prompt)
Now we can rebuild initrd with the missing drivers.
Enter:
1 |
chroot /mnt/sysimage |
1 |
cd /boot |
Type:
1 |
mkinitrd -v -f initrd |
Now hit tab and it will auto complete then add the text that was autocompleted when you hit tab except for the .img
So your command should look like:
1 |
mkinitrd -v -f initrd2.4.18-19.8.0.img 2.4.18-19.8.0 |
Hit enter and it will do it’s thing with a lot of output coming out, when it’s done type exit annd exit again and the VM will reboot automatically. Â Should boot up just fine this time.
September 13th, 2011 at 8:00 am
It’s very helpful. Thank you man.
September 13th, 2011 at 10:23 am
Glad to help
December 2nd, 2011 at 8:51 am
i’ve had similar problems and developed a p2v procedure that include exactly your same step
http://pleasedonttouchthescreen.blogspot.com/2011/12/live-linux-p2v.html
February 2nd, 2012 at 6:17 am
Your solution saved a lot of RD, hat’s of for your article, it saved my day
April 25th, 2012 at 9:40 am
Very useful thanks a lot.
June 8th, 2012 at 10:58 am
Saved my day too!
July 31st, 2012 at 9:07 am
Hi,
Same my day
maybe my job too 😉
October 27th, 2012 at 10:02 pm
Glad to help!
October 23rd, 2012 at 8:19 am
Thanks so much,,, saved my day too,
🙂
October 27th, 2012 at 9:55 pm
Glad to hear!
December 17th, 2012 at 11:07 am
Michael,
thank you for this great working post, it really saved me. I did a WAN P2V of a production environment, it took 15 hours. This really SAVED THE DAY. really great stuff. ciao from Italy
December 28th, 2012 at 11:08 am
Many Thanks! This really helped me out.
March 6th, 2013 at 9:42 pm
Thanks mate! Just spent a couple of days converting physical machine to virtual and then was heart broken when the VM didn’t boot. This solved my problem though. Thanks again!
Nick from Australia.
April 11th, 2013 at 3:10 pm
Happy to help!
April 10th, 2013 at 11:16 am
Worked on CentOS 6.4 Briliantly!
Thanks lad!
April 11th, 2013 at 3:03 pm
Glad to hear!
August 19th, 2013 at 10:36 am
Works fine with Fedora 10 to ESXi 4.1.
Thanks a lot!