convert vmware image to virtualbox

Discussions related to using VirtualBox on Windows hosts.
Post Reply
LordRT
Posts: 4
Joined: 22. May 2012, 13:38

convert vmware image to virtualbox

Post by LordRT »

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?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Post by mpack »

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.
LordRT
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Post by LordRT »

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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Post by mpack »

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?
LordRT
Posts: 4
Joined: 22. May 2012, 13:38

Re: convert vmware image to virtualbox

Post by LordRT »

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

Post by LordRT »

thanks for the help and the tools, i managed to get it to work on virtualbox 8)
abdullaharslan
Posts: 2
Joined: 26. Dec 2013, 11:57

Re: convert vmware image to virtualbox

Post by abdullaharslan »

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..
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Post by mpack »

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.
abdullaharslan
Posts: 2
Joined: 26. Dec 2013, 11:57

Re: convert vmware image to virtualbox

Post by abdullaharslan »

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 167355 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Post by mpack »

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.
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Re: convert vmware image to virtualbox

Post by virtualboxnewbie »

Dear all,

currently I have a few vms under VMWare Player 7.1.2 build 2780323. I want to migrate the VMs from vmware player to virtualbox.
The VM under VMWare Player has a lot of split vmdk files.

while I understand there's a lot of split files there's one small 1k vmdk files that are readable in text file and it contains all the extent information

Code: Select all

# Disk DescriptorFile
version=1
encoding="windows-1252"
CID=b531f953
parentCID=ffffffff
isNativeSnapshot="no"
createType="twoGbMaxExtentSparse"

# Extent description
RW 8304640 SPARSE "ol71-112-db2-1-s001.vmdk"
RW 4278272 SPARSE "ol71-112-db2-1-s002.vmdk"

# The Disk Data Base 
#DDB

ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "783"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "022ccbf82e266ffb183b24e6b531f953"
ddb.uuid = "60 00 C2 9c 2f 91 38 f8-e9 9e 84 19 52 e8 b8 cc"
ddb.virtualHWVersion = "11"



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).

can u show me how to do this?

thanks a lot!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: convert vmware image to virtualbox

Post by mpack »

Just create a VM in VirtualBox, reproducing as much as possible the settings from the old VMWare VM (note that disk controller info is listed in the text descriptor). When you get to the disk creation step in the VM wizard, select "Use existing" and choose your 1k VDMK descriptor when asked.

VirtualBox will attach your virtual hdd to a default controller, but I see from your VMDK file that this was intended for the LsiLogic SCSI controller, you should fix that in the VM recipe before starting the VM.

Tip: when you get to the disk creation step, move the *.vmdk files into the VirtualBox VM folder. This keeps all the files in one folder, which avoids a number of future disaster scenarios.
Post Reply