VMware Cloud Community
Ravi1987
Contributor
Contributor

p2v procedure for linux machine

hi is their any Vmware convertor to migrate physical linux machine into virtual linux machine. if yes then please tell me the convertor name and procedure of conversion . please tell how safe it will be as like windows machine conversion.

Ravi
Tags (2)
0 Kudos
5 Replies
SuryaVMware
Expert
Expert

Lot more safe than Windows. Smiley Happy

What Linux distro are we talking about here?

I have converted 4 VM's lastnight all of them are RHEL5 64bit. all of them are working fine.

-Surya

Troy_Clavell
Immortal
Immortal

you may want to take a look at VMware Converter 4

http://communities.vmware.com/docs/DOC-8712

if you feel this or any other answer was useful, please consider marking it as "correct" or "helpful"

0 Kudos
RDPetruska
Leadership
Leadership

You can try the VMware Converter 4 beta - it supports Linux machines now.

0 Kudos
Ravi1987
Contributor
Contributor

please tell me the convertor name and procedure to convert the physical rhel 4 into virtual

Ravi
0 Kudos
SuryaVMware
Expert
Expert

In my case all my server are boot from SAN RHEL5 servers. So my job was easy.

I have the LUNs presented to ESX server where I want my VMs.

Created the VM's with VMDK of the size i want, and Also added the respective LUNs as RDMs to the VM. Booted in to rescue mode with RHEL5 CD/DVD.

Rescue mode detects the RHEL installation on raw LUNs and mount it in /mnt/sysimage

chroot /mnt/sysimage

edit /etc/modprobe.conf

remove all the enteries and make a new one as following

alias scsi_hostadapter mptbase

go to /boot and remove the backup the initrd images from there to /tmp and remove.

run mkinitrd /boot/initrd-<same as it was earlier> <kernel version #>

the kernel version # can be found in /lib/modules. get this beforehand for the mkinitrd command.

once you have the initrd img, run exit to getout of the chroot.

Run dd if=/dev/sdb of=/dev/sda bs=8192

in my case sda is a VMDK and sdb is a RAW disk with ext3 filesystem. If you have more LUNs you might want to be more careful here.

once you have completed with the dd commands you can shutdown the VM and remove the RAW LUNs start the VM with the VMDKs alone an it will boot the VM with RHEL5 installation of tools will add your virtual nics to /etc/modules.conf

once the NICs are added you need to configure them for the respective n/w with the appopriate IP.

I know this procedure is as simple as a Windows P2V but works.

if you can explain me your situation like the original Physical Box is a Boot from SAN or local harddrive boot. Also if you need to rezise the VMDKs for the VMs. Are LVMs involved with the Linux? stuff like that.

I can give a more step-by-step notes for the migration.

-Surya

0 Kudos