::: Virtual Aleph ::: Virtualization Techniques: Virtualize a Linux Server with VmWare Converter 3.0.1

VMworld 2016 Banner

VMworld 2016 Banner
VMworld 2016 Barcelona

07 May, 2007

Virtualize a Linux Server with VmWare Converter 3.0.1

Hi all,
I've spent my last saturday virtualizing physical Linux servers by a customer site. As VmWare Converter is in experimental status for now for virtualizing Linux I think that's a good idea to put the procedure I've used and that I've described in my two previous posts (1, 2) but without screenshots ;) .

So, let's begin with conversion: first of all shut down your physical linux box and put the VmWare Converter CD - I've used the last one, 3.0.1 - in your CD reader and boot. Follow the on screen procedure and send the images to your target Virtual Infrastructure host. At the end of the cloning task you'll find the definition of your brand new VM browsing your Virtual Infrastructure Client.
Take a Linux rescue CD, my favourite is Fedora Core 2 rescue linux ('cause works with all the linux boxes I've virtualized), set it as boot device and fire up your VM.
Be sure to boot from the rescue CD. Otherwise you'll surely get a Kernel Panic messages

If you use FC2 rescue CD just press enter (with other rescue CD you'll have to type linux rescue at the boot prompt)

Select the language...

... keyboard...

... and do NOT connect the network (sometimes it bring to an hanged system)

Linux rescue will try to mount the virtual machine file system in /mnt/sysimage: let's mount it in read-write mode.

As for the messages from your linux console, you can set /mnt/sysimage as your root environment; press the OK button and you'll be in a shell as root user.

Issue the chroot /mnt/sysimage command,

and edit /etc/modules.conf with your favourite editor, changing every scsi alias with BusLogic and each eth nic with pcnet32. Save and exit.

Change directory to /boot and make a backup copy of your initrd-2.x.y-zz.img .
Then issue the mkinitrd command (mkinitrd -v -f /boot/initrd-2.x.y-zz.img 2.x.y-zz, all on one line as you can see in the below figure). Wait for the command to end,

... and reboot

Disconnect the linux rescue boot CD and see your virtualized linux box that come up.

During the first boot the virtualized box will reboot (sometimes) and kudzu will check for new hardware prompting for removing physical scsi modules configuration and for adding BusLogic and PcNet32 modules (always).
This procedure has worked for Fedora Core 6, Red Hat Enterprise Linux 3 with 2.4.XX-ELsmp kernels and for Red Hat 6.2 and 6.1 with 2.2.x-YYsmp kernels. The RH6.1 box has LILO instead of grub: I must issue the lilo command after the mkinitrd session in order to rewrite the MBR (don't know why...), and to get this vm working.

All the procedure is based on www.vmwiz.com but, I hope, more in depth explained and used after VmWare Converter cloning (not after P2V / Ghost cloning)


Sean said...

I attempted to follow this guide but continue to get Kernel panic: VFS: Unable to mount root partition.

I also tried rebuilding the kernel with --with=BusLogic enabled but still get the same error.

Any ideas how to fix?

Anonymous said...

On Redhat Linux 8.0, I had to use the "grub-install /dev/sda" command in rescue-mode before it would boot.

Otherwise, I just got a blank screen with a _ curser at the top-left of the screen.

Manlio Frizzi said...

didi you edit the /etc/modules.conf as stated in the post? What linux rescue version did you use? what's the version of the linux distro on physical box?


Manlio Frizzi said...

Good point Anonymous... it seems that on some distro the MBR went overwritten...



Anonymous said...

Thanks for the guide Manlio. I have a couple of gotchas for you to note:

On Redhat Enterprise Server 4 (RHEL4), /etc/modules.conf is called /etc/modprobe.conf

Also, your approach only works if the BusLogic kernel module is installed already. This certainly wasn't the case with our RHEL4 system, so it might be worth noting that the BusLogic module needs to be installed prior to migration.

If it hasn't (as was my case), download the driver dd disk and rpm package from http://www.vmware.com/support/esx2/doc/esx2-rhel4u4-dd-rpm.html and use RPM to install it on the original system, then copy the BusLogic.ko file to the /lib/modules/2.x.y-zz/updates directory (create updates if necessary) and then follow your instructions.

Final point: the RHEL4 rescue disk (install disk 1) does not include the BusLogic driver either, so when prompted for boot, use "linux dd rescue" to get the rescue mode to ask for a dd disk - then provide the one downloaded above.


Mike Cretan

Anonymous said...

Hi Mike,

I just converted a RHEL system. Instead of going through the steps here to reconfigure the new image to use BusLogic, I changed the SCSI controller type for the image to be LSI Logic ("Edit Settings..." for the image) and the image booted fine.

Stephen Stibler

Anonymous said...


thanks a lot for this guide. It has helped me to convert 2 RHLinux 8.0's.
One of them used grub, and I didn't have to use grub-install.
The other used lilo. I had to change the contents of the /etc/lilo.conf so that it pointed to /dev/sda instead of /dev/cciss/c0d0. Then I ran lilo and the system was up and running.

Another thing, if you get swap errors, then check the /etc/fstab and change it to /dev/sda3 (most likely place where your swap is, you can check with fdisk -l /dev/sda)

Hope this feedback helps.

Jeroen Demets.

togsen said...

hi all ! i'hv new to p2v, and have a question.
I need to save the firms intranet which has been running since 2000 on a Dell ML350 G1!!!! With debian core 2.2.17 and now the system is behaving weirdly.
First what is and how do I get the VmWare Converter CD??? Sorry if this is a totally newbie question.
Have any of you hear of Acronis full circle software?

Manlio Frizzi said...

Hello Togsen,
boot ISO CD is to be purchased with Enterprise license of VmWare Converter. You can try doing a net dd to a virtual disk from you debian box, booting in rescue mode.
After the dd procedure has finished go ahead with the normal procedure described in the post.
Pls if you have other questions write me directly on email virtualaleph(at)fastwebnet.it .
I'll answer you as soon as possible.

Anonymous said...

Hi my friend,
I have tried with a fedora 6 rescue cd on esx to boot a freshly converted debain box. The rescue cd says that no linux partitions have been found. Any ideas would be greatly appreciated.

Manlio Frizzi said...

Try out with an older Fedora core rescue CD (I've got very good results with FC2).
Have you got Software RAID on your linux box (this could be a problem...)
Let me know.

Sam Hooker said...

Hash: SHA1

Hi Manlio,

Thanks for posting a great resource. A few things to add from my experience:

1) We don't have the cold-bootable VMware Converter CD, so my (brilliant) business partner suggested booting the target physical host using a Knoppix CD, AND the target (empty) VM using a (virtual) Knoppix CD; we then use 'dd if=/dev/sdX' to read the physical HD, pipe it over SSH to the VM, where our SSH connection runs 'dd of=/dev/sda' and writes to the Virtual Disk; i.e.:

root@knoppix-physical> dd if=/dev/sda bs=128k | ssh root@knoppix-vm "dd of=/dev/sda bs=128k"

2) We had to use another set of storage modules for CentOS 4.x, as the BusLogic modules provided by VMware didn't work well; here's what did (from /etc/modprobe.conf):

alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsi
alias scsi_hostadapter2 mptfc
alias scsi_hostadapter3 mptspi
alias scsi_hostadapter4 mptsas
alias scsi_hostadapter5 mptscsih
alias scsi_hostadapter6 ata_piix

(Note that we've confirmed that this module is available as early as the 2.6.9-42.0.3.EL kernel as distributed by the CentOS project, but NOT with the 2.6.9-22 kernel.)

This setup is working beautifully for us with CentOS 4.x machines.

Again, thanks for kicking off the discussion!
Version: GnuPG v1.2.4 (Darwin)


wim desmedt said...

I successfully virtualised our Proliant ML370G3 running RHEL v4u5.
I used Acronis to image the system into a virtual machine (conveniently allowing me to resize my disks in the process), then booted from the RHEL rescue cd.

For the rescue cd to recognise the Buslogic controller, I had to boot 'linux dd rescue' and mount a driver floppy: http://www.vmware.com/support/esx25/doc/esx25-rhel4u5-dd-rpm.html

I tried the LSI Logic controller as well, which is recognised by the rescue cd without additional drivers, here I had to use following aliases in modules.conf:

alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih

Then, at first it wouldn't boot, but reconfiguring grub fixed it:

grub-install --recheck /dev/sda
grub-install /dev/sda

And yes - kudzu came up and reconfigured my hardware!
Just had to fix the swap partition, install vmware tools and it was perfect.
thanks for the guide Manlio!

Anonymous said...

Worked great. After we realized that we needed to modify the 2.x.x-xxsmp version of the img file. Converted an old Dell Poweredge 4400. Everything worked exactly as you said...

Thanks for the guide...

Anonymous said...

With the FC2 rescue disk, I can't chroot to the /mnt/sysimage.
Sez "FATAL: kernel too old" on FC6 system.
Tried with a FC6 rescue but it can't see the /root partition.

Couldn't find a setting in VMWare Workstation 6 to change the the SCSI controller type either.

Manlio Frizzi said...

Why you need the /root partition? you need to access /boot partition... changing SCSI in VM setting won't help in any way...

ohuf said...


Thanks for this great posting and the incredible comments!

I recently had to p2v one of our Linux boxes running SuSE Linux Enterprise Server 8 (SLES8).

After 'dd'-ing the partitions using ssh like Sam Hooker mentioned above and specifying the scsi_hostadapter (I used the BusLogic VMware adapter) the system started booting but it didn't mount its root partition. The error message was:

kmod: failed to exec /sbin/modprobe -s -k block-major-8, errno = 2
VFS: Cannot open root device "803" or 08:03
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 08:03

The issue in this case was an Adaptec I2O RAID controller which had been used in the physical machine. The adaptec's modules were still in the config.

To cut a long story short: I had to modify /etc/sysconfig/kernel in addition to your tips above. The original line:

INITRD_MODULES="cdrom scsi_mod ide-cd dpt_i2o reiserfs"

...had to be modified in order to eliminate the no longer needed adaptec module and to include the BusLogic module (deleting the dpt_i2o only was not enough). The new kernel line reads:

INITRD_MODULES="cdrom scsi_mod ide-cd BusLogic reiserfs"

I use the BusLogic adapter, remember? :-)

After running mkinitrd the virtual beast booted like a charm.

... hope this helps :-)


joshuadf said...

The Fedora Core 2 rescue CD is a good one for older systems. I did not have it around but it was easy to find: you can get it from any of the Fedora mirrors plus the path /core/2/i386/iso/FC2-i386-rescuecd.iso. It's only about 75M.

Scott said...

An alternative solution that works with ESX and SuSE 9.3 is to run the SuSE installer and use 'repair' mode on the virtual machine. That will replace the drivers, fix initrd and the boot loader.


Anonymous said...

I am trying to convert Fedora Core 4, I used the VMware converter CD and sent the image to target virtual host. Then I booted the virtual machine using the Fedora Core 2 rescue disk. But when I tried to edit the /etc/modules.conf, it is not to be found. Also i found a file /etc/modprobe.conf instead of modules.conf, how do I proceed from here?


Ciessegi said...

Ho trovato questi due link che possono aiutarvi:

Nel mio caso, centos 4.5, solo impostando ( alias scsi_hostadapter mptscsih
) sono riuscito a farlo funzionare.

Spero possano esservi di aiuto.

Anonymous said...

I did everything as you suggested in article, but it still won't boot and getting the kernel panic error, I'm not an expert linux guy so any help would help :-)

Anonymous said...

The error im getting is not syncing: VFS: unable to mount root fs on unknwn-block(0,0)

Ken said...

Thanks for the nice How-To! I was able to follow this advice to virtualize my RHEL x86_64 5.2 server, but I did it using systemimager instead of VMConverter - which is the free open source solution. I also didn't need the BusLogic modifications, I only needed to modify the modprobe.conf and rebuild my ramdisk, reboot and it was done.

Many thanks for the help!

Manlio Frizzi said...

No problem Ken, if you want, pls send me a postcard from you hometown :)

Rafael said...

Hi. I'm testing this procedure with an HP box with SMART Array controller. I followed your instructions and it seems to be fine, but when I run "fdisk" command I receive the next message:

"scsi0: Warning: Partition Table appears to have Geometry 255/32 which is not compatible with current BusLogic Host Adapter Geometry 255/63"

do you know how to fix this? Or, is it a false alarm?


Dave said...

hi, trying this with centos 4.4
really struggling.

spent 17hours non stop on this now


i have a kernel with the lsi and buslogic modules and the grub conf is ok, but i cant rerun grub as it doesnt exist i only have a a command called grubby, im so close i can feel it, any ideas. the grub menu on boot does not reflect the one in /boot (having done chroot)

Im sure its just a case or re grubbing the disk, but cant as i only have grubby ?

Manlio Frizzi said...

Hello Dave,
I'm not a Centos guy but it's based on red hat so... if you complete all the tasks as explained all will works... maybe around there are a Centos guy that can help you better than me ;)

Anonymous said...

Just wanted to thank you for a great guide. This worked perfectly for FC4.

For those trying with FC4 it is /etc/modprobe.conf and I also had to run the mkinitrd command against the smp version.

Thanks again!

Dave said...

Hi Manlio,
It turned out that when using centos 4.4 i had to use
a centos 4 series rescue disk as the FC2 one had a version of lilo that wasnt compatible.
The machine is now happy as a vm.
Thanks for the guide, you really saved me some work

Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Anonymous said...

It was very interesting for me to read that blog. Thanks for it. I like such topics and anything that is connected to them. I would like to read more soon.

CCNA said...

After 6th Figure I receive below error:
An error occured trying to mount some or all of your system. Some of it may be mounted under /mnt/sysimage.
Press to get a shell. the system will reboot automatically when your exit from the shell.

After that when I go to mentioned location. the directory is empty.

Tanguy said...

Hi I tried to virtualise an old 7.
3 Redhat.

I've done you was written :
Boot with a Fedora Core 2 rescue CD.
- As soon as I had the prompt I did : chroot /mnt/sysimage.
- Modify the modules.conf file changing the scsi host adpater by BusLogic and network by pcnet32.
- the mkinitrd seemed to be good : I had the same lines on screen (the only difference is I had two kernels , i made the older first and the newer just before rebooting.
I also changed ide to scsi in my Vmx file :
scsi0:0.present = "TRUE"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
scsi0:0.fileName = "ailtlinux.vmdk"
scsi0:0.deviceType = "disk"

If someone has an idea .. Thank you for the article, even if I did not find the solution it made me understand some points. And I still have hope !

Tanguy said...

Hi I tried to virtualise an old 7.
3 Redhat.

I've done you was written :
Boot with a Fedora Core 2 rescue CD.
- As soon as I had the prompt I did : chroot /mnt/sysimage.
- Modify the modules.conf file changing the scsi host adpater by BusLogic and network by pcnet32.
- the mkinitrd seemed to be good : I had the same lines on screen (the only difference is I had two kernels , i made the older first and the newer just before rebooting.
I also changed ide to scsi in my Vmx file :
scsi0:0.present = "TRUE"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
scsi0:0.fileName = "ailtlinux.vmdk"
scsi0:0.deviceType = "disk"

If someone has an idea .. Thank you for the article, even if I did not find the solution it made me understand some points. And I still have hope !