Converting Sun Virtualbox vmi file To Vmware vmdk file


This article show you how to convert Sun Virtualbox vmi file to Vmware vmdk file. Recently I have started using Ubuntu as my desktop in my company. And installed Sun Virtualbox for test VMs. But most of the people have vmplayer installed. So they donot know how to use this vmi images on a windows box. So here is a solution for converting those vdi image files to VMware .vmdk images.

When we install Sun Virtualbox we have so many command lines tools installed along with it. One good tool is VBoxManage, Please remember commands in Linux are case sensitive. So if you try to type vboxmange it will not work. You have to type exactly as VBoxManage.

Step1 : Convert from vdi to raw.
#VBoxManage internalcommands converttoraw /data/Vm-images/ubuntu-vm.vdi /data/Vm-images/ubuntu.raw

Step2 : Now install qemu, which is used to convert .raw files to .vmdk
#apt-get install qemu

Step3 : Convert .raw files to .vdmk using qemu-img command
#qemu-img convert -O vmdk /data/Vm-images/ubuntu.raw /data/Vm-images/ubuntu.vmdknow try to access this .vmdk file using your VMware workstation or VMware player.

So what about viseversa?here there are two methods are there
1. By default your Sun Virtualbox will support .vmdk vmware images.
2. If its not supported use the following way.

Step1 : Use again qemu-img to convert .vmdk disk to .rawqemu-img convert ubuntu.vmdk /tmp/ubuntu.raw

Step2 : VBoxManage convertdd /tmp/ubuntu.raw ubuntu.vdiplease share your thoughts.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    2 comments:

    Shivaprasad Katta said...

    Nice article.
    One suggestion : To my understanding both i.e the VirtualBox and VMware Server/Player supports ovf(Open Virtulization Format/Opem Virtualmachine Format) format. So you can export vm from the vitrualbox in ovf format and just import at the other end.

    Shivaprasad

    Surendra Kumar Anne said...

    thanks for the finding and sharing it.. let me have a look in to it..

    Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here