Page 1 of 1

Can VMware images be read/converted to VirtualBox images?

Posted: 16. May 2007, 18:02
by abcuser
Hi,
I have some VMware Workstation images that I would like to convert to VirtualBox images. Is this possible and if it is how?

If this is not possible what is recommended way to get this problem solved? Is there any VMware -> physical machine -> VirtualBox ritual?
Thanks,
Abcuser

Posted: 17. May 2007, 08:42
by achimha
The next version will support VMDK files from VMware.

Posted: 17. May 2007, 11:37
by kilou
Instead of using it, will it be possible to convert a vmdk image into VirtualBox format or convert a VirtualBox image into a vmdk file usable with VMWare Player?

Can VMware images be read/converted to VirtualBox images?

Posted: 17. May 2007, 12:22
by al
In case it's of any use, I successfully converted a VMWare image to use VirtualBox by following the instructions on these two pages:

http://ian.blenke.com/vmware/vmdk/xen/h ... n_hvm.html
http://thedarkmaster.wordpress.com/2007 ... on-how-to/

To summarise:

* Run the original vmware image and uninstall vmware-tools (it can be done afterwards, but it's probably easier to do it beforehand)
* Install VMWare Workstation or VMWare Server (the latter is freely available).
* Use vmware-vdiskmanager to convert a split disk into a single file:

Code: Select all

vmware-vdiskmanager -r multipart.vmdk -t 0 flattened.vmdk
* Install qemu
* Use qemu to convert the vmdk to a 'raw' file:

Code: Select all

qemu-img convert flattened.vmdk -O raw rawfile.bin
* Download vditool from http://www.virtualbox.org/download/testcase/vditool
* Make it executable (with chmod)
* Convert to a VDI:

Code: Select all

LD_LIBRARY_PATH=/opt/VirtualBox* ./vditool DD vboximg.vdi rawfile.bin
* Create the xml machine specification

If you're using windows (I did this for Windows 2000), mount the CD and boot into setup. Do a normal install (rather than a repair), let it find the installation and then select repair. You'll probably need to apply security updates after booting (my VM doesn't have access to the network, so I didn't bother).

Hope that helps,

Al

Posted: 18. May 2007, 08:41
by kilou
Thanks for the info Al. However I've heard that with this method it is not possible to create a dynamic VirtualBox image ie a VM image that grows in size when you add data. It seems it is only possible to create a fix size image. Is this true?

Posted: 18. May 2007, 09:32
by al
To be honest, I'm not sure. I haven't really looked at VirtualBox for very long (I only installed it a couple of days ago). There is an additional command:

./vditool SHRINK vboximg.vdi

That makes the file smaller, so I'd guess that what this is doing is reducing the file to one that grows as necessary. However, my virtual machine's disk is almost full, so it didn't make much difference in my case.

Hope that helps,

Al

When to expect?

Posted: 18. May 2007, 23:19
by xgoof
achimha wrote:The next version will support VMDK files from VMware.
When do you expect the next version to be ready?

That change, would make me drop the use of vmwareserver for testing all those great appliances... :)

Posted: 20. May 2007, 19:54
by stonecrest
Awesome, glad to hear this will be supported in the next version!

And btw, that process outline by "al" will only work for vmware images created from versions 4 and earlier. The qemu-img command cannot convert from versions 5 or 6, which stinks.