Monday, September 7, 2015

Convert VMX,VMDK to OVF, OVA Format

Problem Statement :

I recently got a dump of a virtual machine, it was exported from VMWare hence it had the respective .vmdk's, .vmx's.. I work on a mac and use VirtualBox to host VM's. The problem begun when I tried to import the virtual machine to my laptop. You cannot import it using VirtualBox. The other option was to install VMWare player on my laptop for that VM specifically which didn't make much sense. Moreover, You would not get VMWare player free for mac, you would need to either buy VMWare Fusion or download a 30 day trial, which again does not solve my purpose.

So in essence I wanted to covert the available VMWare proprietary files in a format which can be imported on my regular VirtualBox

Fix :

There is a tool available from VMWare called OVFTool which can be used to convert the existing VMWare files in any appropriate format.

You can download this tool from here : https://www.vmware.com/support/developer/ovf/

Steps :
  • Install the OVFTool dmg.
  • Locate the package / binary. For me it was 
/Applications/VMware\ OVF\ Tool/.
  • To make it easier I did mv this folder without spaces,named the folder to "VMWareOVF" 
$sudo mv VMware\ OVF\ Tool/ VMWareOVF
  • Added this in the path variable so that "ovftool" can be run in the shell without giving the path to the command
export PATH=$PATH:/Applications/VMWareOVF/
  • Crosscheck if the path has been updated using the command "env | grep ^PATH"
PATH=/sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/Applications/VMWareOVF/ 
  • "cd" into the folder where the VMWare files are kept. Suppose the vmx file name is "subject.vmx"
  • Create a folder by the name "OVF" where you will keep the converted "ovf" file
  • Give the below command 
$ ovftool subject.vmx OVF/convertedsubject.ovf
  • Once you give this command you would see an output screen showing the progress of the conversion
  • Once you have the converted file, you just need to import the appliance

Hope this helps you. Thanks for the read.

No comments:

Post a Comment

The Azure Synapse Resource Provider Error

  If you are get the error " The Azure Synapse resource provider (Microsoft.Synapse) needs to be registered with the selected subscript...