Page 1 of 1

convert vmware vm to virtualbox vm

Posted: 29. Mar 2011, 04:06
by helikaon
Hello,
as subject says, i need to convert vmware workstation vm to virtualbox vm.
host: linux centos 5.5 64bit
guest: linux centos 64bit
vm tool: vmware workstation 6.5

I found several guides using qemu and vboxmanage to convert files, but its only regarding the *vmdk vmware files, but i dont have any *.vmdk file:

pwd
/vm01/vmware-rhel5
ls -al
total 11764556
drwxr-xr-x 3 root root 4096 Mar 27 19:42 .
drwxr-xr-x 4 root root 4096 Oct 18 2009 ..
-rw------- 1 root root 2147483648 Jan 27 2008 564deff6-cf77-297b-e406-982a2561c98a.vmem
drwx------ 2 root root 4096 Sep 28 2007 lost+found
-rw------- 1 root root 385 Mar 27 19:31 Red Hat Enterprise Linux 5
-rw------- 1 root root 9877585920 Mar 27 19:34 Red Hat Enterprise Linux 5-flat
-rw------- 1 root root 8684 Mar 27 19:34 Red Hat Enterprise Linux 5.nvram
-rw------- 1 root root 0 Oct 27 2007 Red Hat Enterprise Linux 5.vmsd
-rwxr-xr-x 1 root root 1747 Mar 27 19:30 Red Hat Enterprise Linux 5.vmx
-rw------- 1 root root 281 Oct 27 2007 Red Hat Enterprise Linux 5.vmxf

? which of these files should be converted and how?

thank you for any hint/tip :-)

Re: convert vmware vm to virtualbox vm

Posted: 29. Mar 2011, 11:50
by vbox4me2
I dont know where your files are but VBox can use vmdk files natively, no need to convert.

Re: convert vmware vm to virtualbox vm

Posted: 29. Mar 2011, 12:44
by Bsoft
Read the location of the vmdk files from the .vmx (e.g. cat *vmx)

Re: convert vmware vm to virtualbox vm

Posted: 30. Mar 2011, 02:07
by maro
Let me take a "wild guess": I'd imagine that "Red Hat Enterprise Linux 5-flat" is your VMDK file. My hunch is that something went wrong at the initial VM creation and you ended up with a VMDK file without the '.vmdk' extension in it's name.

But as this is just a guess based on the file size (and it's name) I agree with the other comments: carefully read the *.vmx file (or look up the VM settings in the VMware GUI) and "convert" those settings manually into a VM definition in Virtualbox. That means create a new VM from scratch instead of trying to export/import anything (apart from the disk). I've done the export/import process only once and was way more hassle then looking up things like:
  • How much RAM?
  • Any other (virtual) hard disks?
  • Just the one CD-ROM?
  • Any more than a single NIC (configured with NAT)?
As a consequence I could imagine that you just need to copy the (virtual) disk (e.g. "Red Hat Enterprise Linux 5-flat" which could be renamed to "Red Hat Enterprise Linux 5-flat.vmdk") and point to this disk during the VM creation process.

Re: convert vmware vm to virtualbox vm

Posted: 31. Mar 2011, 13:58
by helikaon
Hello guys,
thank You all for your help, you pointed me in right direction. As i was afraid, i had to study more about vmware, than wanted, but solved it anyway - my way :)

As OP says, the "*flat*" file was/is the vmdk file, but with missing extention, this happend probably because of incorrect shutdown (dont ask me, been just fixing it).

Situation:
After upgrade from CentOS 5.1 to 5.5, adding new network interfaces etc the vmware workstation stopped working because it wasnt able to pass the recompilation of 'vmnet*' device. I found out it wanted gcc3x version, but on box is gcc4, i installed gcc-compat with 3x version, linked it, didnt help, kept failing with something like 'but your kernel is compiled with gcc4x even though i see gcc3' ... i got really pissed with this software.

Solution:
- Luckily thay had backup of the VM with *.vmdk extension => restore from backup to different location.
- deinstall of vmware (good riddance), install of VB 4.x
- setting up new VM in VB, where i ketp the original *vmdk file ...here i had a few troubles:

VM kept failing to start with 'kernel panic' because couldnt recognise any filesystem. This was caused by the SCSI HDD controller used previously in wmware workstation.
The VB by default is created with ATA and/or SATA controllers - and the SCSI controller isnt present by default - i had to just add it manually in the settings of VM in VB and state that the HDD of VM use this SCSI controller.
- done, rest was easy - resetting network and VGA driver in the VM and voila .... done :D

Conclusion:
I'm glad the RHEL 6 already arrived with KVM in one bundle.

Thanks guys for help and hope this will help someone else in return ..
cheers

P.S.
Please if mod can mark it as [SOLVED], thank you, i cant find where to tag it like that ...