Categories

Tuesday 12 August 2014

How to install VMware tools and convert kvm disk images to vmware .vmdk disks

Hi,

We had a requirement to move the kvm systems to vmware and for that at first we need to convert existing kvm machine disk images which is either in qemu/raw type to .vmdk images.

First we need to install vmware-tools on the machine where we are going to convert the disk images. Below are the steps to install the vmware tools.

Import the vmware gpg keys using the command
--------------------------------------------
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Add vmware tools repository using the below command
---------------------------------------------
   echo -e "[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com\
   /tools/esx/4.1latest/rhel6/\$basearch\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/vmware-tools.repo



Update yum and install it using the command
------------------------------------------ 
yum update
yum install vmware-open-vm-tools
yum install vmware-open-vm-dkms

It will install the necessary tools on the machine.

Now use the below command to convert the kvm disk image to vmware one

qemu-img convert machine.img -O vmdk machine.vmdk

It will take some time to convert based on the size of the disk.

Once it is finished. You can scp the converted disk file to the new vmware. Then create a new vmware machine using existing disk image as the convreted file.

That's it

Cheers
Syamkumar.M

No comments:

Post a Comment

Ad