Can VMware images be read/converted to VirtualBox images?

This is for discussing general topics about how to use VirtualBox.

Can VMware images be read/converted to VirtualBox images?

Postby abcuser » 16. May 2007, 18:02

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
abcuser
Volunteer
 
Posts: 558
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP

Postby achimha » 17. May 2007, 08:42

The next version will support VMDK files from VMware.
achimha
Volunteer
 
Posts: 217
Joined: 10. May 2007, 09:24

Postby kilou » 17. May 2007, 11:37

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

Can VMware images be read/converted to VirtualBox images?

Postby al » 17. May 2007, 12:22

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   Expand viewCollapse view
vmware-vdiskmanager -r multipart.vmdk -t 0 flattened.vmdk

* Install qemu
* Use qemu to convert the vmdk to a 'raw' file:
Code: Select all   Expand viewCollapse view
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   Expand viewCollapse view
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
al
 
Posts: 3
Joined: 17. May 2007, 12:09
Location: England

Postby kilou » 18. May 2007, 08:41

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

Postby al » 18. May 2007, 09:32

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

When to expect?

Postby xgoof » 18. May 2007, 23:19

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

Postby stonecrest » 20. May 2007, 19:54

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


Return to Using VirtualBox

Who is online

Users browsing this forum: Baidu [Spider] and 20 guests