Can VMware images be read/converted to VirtualBox images?

This is for discussing general topics about how to use VirtualBox.
Post Reply
abcuser
Volunteer
Posts: 599
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows XP

Can VMware images be read/converted to VirtualBox images?

Post 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
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

The next version will support VMDK files from VMware.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post 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?
al
Posts: 3
Joined: 17. May 2007, 12:09
Location: England

Can VMware images be read/converted to VirtualBox images?

Post 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
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post 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?
al
Posts: 3
Joined: 17. May 2007, 12:09
Location: England

Post 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
xgoof
Posts: 1
Joined: 18. May 2007, 23:10
Location: Denmark
Contact:

When to expect?

Post 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... :)
stonecrest
Posts: 1
Joined: 20. May 2007, 19:51

Post 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.
Post Reply