convert vmware image to virtualbox

Discussions related to using VirtualBox on Windows hosts.

convert vmware image to virtualbox

Postby LordRT » 22. May 2012, 13:40

Hello, I have a vmware image file, with the .vmdk and .vmx, and would like to convert and run this image on a virtualbox setup. How do I proceed?
LordRT
 
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Postby mpack » 22. May 2012, 14:55

Conversion of the media may not be necessary - VirtualBox supports VMDK. You will have to build a new VM around the VMDK (the vmx file is not usable). Make sure the new VM recipe is as close as possible to the old one.

You will also need to uninstall the VMware guest tools. Ideally this is done in the VMware VM before the migration.

The guest OS can also make a difference, but you haven't mentioned what the guest is.
mpack
Site Moderator
 
Posts: 13211
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Postby LordRT » 22. May 2012, 15:13

The physical machine and VM both have Windows 7, in fact the VM is just an image of the physical machine, which needs to be transferred on another Windows machine to run on VirtualBox there, and I used VMware converter to create the vm image to be used.
LordRT
 
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Postby mpack » 22. May 2012, 15:55

I would have used Disk2VHD instead of VMware converter. Then I would have used CloneVDI to convert the VHD to VDI, because although VirtualBox supports VHD, I think VDI is a better format. CloneVDI can also do VMDK to VDI conversion if you wanted.

Hmm. You do realize I suppose that the Win7 guest will need to be reactivated, and that continuing to use the host after that will be problematic?
mpack
Site Moderator
 
Posts: 13211
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Postby LordRT » 23. May 2012, 07:21

Yes for the guest I have the key to reactivate afterwards, and the host is a better machine than the one being copied from (copied machine is a dual core with 2GB ram and 150GB HDisk, while the machine being moved to is a core i7 with 8GB and 2TB HD) :)
LordRT
 
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Postby LordRT » 23. May 2012, 08:03

thanks for the help and the tools, i managed to get it to work on virtualbox 8)
LordRT
 
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Postby abdullaharslan » 26. Dec 2013, 12:21

Hi
I am new to both platforms.
I have created a vmware OS and using it for some weeks. I have heard that virtual box is better and now I want to convert my disk images.

vmware disk is not a single file, there are multiple vmdk files. I guess i need to merge them first. Then i can use the merged vmdk in virtualbox.

Help please.. How can I merge multiple vmdk files and use the final vmdk in virtual box?
I found a freeware utility named vmdkutil to merge vmdk files. It seemed to merge but the final vmdk did not work..
abdullaharslan
 
Posts: 2
Joined: 26. Dec 2013, 11:57

Re: convert vmware image to virtualbox

Postby mpack » 26. Dec 2013, 12:57

You don't give enough information. VMDK has a number of variants, some of which split the file into fragments, and all these variants are supported by VirtualBox. If however it is not one drive image but a base plus a bunch of snapshots then these will not be usable.

It would probably be simpler to export the VM, and import it into VirtualBox.
mpack
Site Moderator
 
Posts: 13211
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Postby abdullaharslan » 26. Dec 2013, 14:12

In the vmware settings page it says: "disk space is not preallocated for this hard disk. hard disk contents are stored in multiple files"
Additionaly, i have attached the screen shot.

How can I export the vmware image?
Attachments
ubuntu.png
ubuntu.png (86.22 KiB) Viewed 12312 times
abdullaharslan
 
Posts: 2
Joined: 26. Dec 2013, 11:57

Re: convert vmware image to virtualbox

Postby mpack » 26. Dec 2013, 17:50

That looks like the "split2g" variant of VMDK. That's where you have a fixed allocation (preallocated) disk which is split into 2GB extents primarily so that the image can be transported on FAT formatted drives. Typically this variant consists of a small descriptor .vmdk file - if you examine this you'll find that it's just a text file which lists the 2gb extent files, in order. Then you'll have N 2GB extents, plus an optional final extent smaller than 2GB, holding the residue of the image. In your case I see a couple of odd sized files, so I think perhaps this drive has been increased in capacity a couple of times (quite common, since preallocated a.k.a. fixed drives are invariably created too small).

VirtualBox supports this VMDK variant: just copy the entire set of files as a block, when mounting the image you select the control file (the small one which doesn't have the -snnn suffix).

The files which do not have a .vmdk extension are superfluous - not usable in VirtualBox. You'll have to create the VM from scratch, select "choose existing" when you come to the drive step. It's best to have the drive image inside the VM folder so that you don't have bits of VM scattered in odd places.

Personally I think a single file is more elegant, and a preallocated disk is just a waste of host space. I would convert it to a dynamic VDI before I used this image in VirtualBox. That's what you'll get if you clone this VMDK using CloneVDI. If you prefer a command line app then you can also use "VBoxManage clonehd ..." - the command syntax is given in the user manual.
mpack
Site Moderator
 
Posts: 13211
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 34 guests