Converting VMWare .vmdk To VirtualBox .vdi Using Qemu+ and VBoxManage: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 40: Line 40:
'''variant''' Allows to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message.  
'''variant''' Allows to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message.  


The second form forces VBoxManage to read the content for the disk image from standard input(useful for using that command in a pipe).  
The second form forces VBoxManage to read the content for the disk image from standard input(useful for using that command in a pipe).
 
Note: For compatibility with earlier versions of VirtualBox, the “convertdd” command is also supported and mapped internally to the “convertfromraw” command.


Run VirtualBox, use the (File Menu) Virtual Media Manager and 'Add' the newly cloned drive. This makes Virtual Box 'aware' of the drive. Then go though the normal creation steps and choose this as the drive to use for the virtual machine.
Run VirtualBox, use the (File Menu) Virtual Media Manager and 'Add' the newly cloned drive. This makes Virtual Box 'aware' of the drive. Then go though the normal creation steps and choose this as the drive to use for the virtual machine.

Revision as of 20:58, 16 November 2010

If you want to switch to VirtualBox and have a Vmware Virtual Machine you want to use? You can convert a Vmware .vmdk file into a VirtualBox .vdi file that you can use on VirtualBox.

First, download qemu, open a Console and execute:

  sudo apt-get install qemu 

Next, open a console and go to your .vmdk virtual disc image folder and type this:

  qemu-img convert "harddrive-name".vmdk -O raw-file.bin 

Change "harddrive-name" with the name of your .vmdk file and raw-file with the name of the new converted file you want to create. This takes a few minutes, After the conversion is completed. A raw hard disk image has been created.

To convert a raw disk image to a VirtualBox Disk Image (.vdi) file use this command.

  VBoxManage convertfromraw 

The syntax is as follows:

  VBoxManage convertfromraw <filelocation/filename.bin> <outputfile>

Example:

  sudo VBoxManage convertfromraw /home/tony/.VirtualBox/HardDisks/HardDisk1.bin /home/tony/.VirtualBox 

[--format VDI|VMDK|VHD]

[--variant Standard,Fixed,Split2G,Stream,ESX]

  VBoxManage convertfromraw stdin <outputfile> <bytes>

[--format VDI|VMDK|VHD]

[--variant Standard,Fixed,Split2G,Stream,ESX]


What the parameters mean:

format Selects the disk image format to create. Default is .vdi.

variant Allows to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message.

The second form forces VBoxManage to read the content for the disk image from standard input(useful for using that command in a pipe).

Note: For compatibility with earlier versions of VirtualBox, the “convertdd” command is also supported and mapped internally to the “convertfromraw” command.


Run VirtualBox, use the (File Menu) Virtual Media Manager and 'Add' the newly cloned drive. This makes Virtual Box 'aware' of the drive. Then go though the normal creation steps and choose this as the drive to use for the virtual machine.

You should be able to boot up the newly created virtual machine.

Enjoy your migration to Virtual Box!


Refrences:

http://thedarkmaster.wordpress.com/2007/03/12/vmware-virtual-machine-to-virtual-box-conversion-how-to/

https://wiki.ubuntu.com/UbuntuMagazine/HowTo/Switching_From_VMWare_To_VirtualBox:_.vmdk_To_.vdi_Using_Qemu_+_VdiTool

Oracle VM VirtualBox User Manual.pdf