Importing/Exporting OVA in vSphere using VMware OVF Command line Tool


VMware OVF tool is a command line utility that supports import and export of OVF packages to and from vSphere infrastructure.

Download Tool – http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/ovf
Documentation – http://www.vmware.com/support/developer/ovf/

Exporting Virtual Machine to OVA file

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe "vi://username:password@vCenterIP:443/DataCenter_Name/vm/Demo-W7-VM" "C:\VM-Backup\Demo-W7-VM.ova"

Importing OVA VM to vSphere

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe "--datastore=datastore1" "--network=VM-Network" "C:\VM-Backup\Demo-W7-VM.ova" "vi://username:password@vCenterIP/DataCenter_Name/host/Cluster_Name/hostIP"
About these ads

6 thoughts on “Importing/Exporting OVA in vSphere using VMware OVF Command line Tool

  1. Hi Diyven could you say what methods can be used to limit the domains LDAP will search when setting up View5. I have see a connection server try to bind with my child domains domain controller while only the parent was specified in the respective pools

  2. “vi://username:password@vCenterIP/DataCenter_Name/host/Cluster_Name/hostIP”
    should read for clarity
    “vi://username:password@vCenterIP or DataCenter_Name or host or Cluster_Name or hostIP”

    Generally I use just the hostIP. Also the commands take spaces with no special characters needed.

  3. For information if you dont know the part “/Your_DataCenter_Name/vm/path” “vi://username:password@vCenterIP:443/Your_DataCenter_Name/vm/path” you can use the ovftool just with source and he will check the path for you.
    for example :
    ovftool “vi://username:password@vCenterIP:443″
    Error: Found wrong kind of object (Folder). Possible completions are:
    Your_DataCenter_Name/
    ovftool “vi://username:password@vCenterIP:443/Your_DataCenter_Name/
    Error: Found wrong kind of object (Datacenter). Possible completions are:
    vm/
    host/

  4. On using the above command for Importing OVA VM to vSphere, OVFTool asks me to eneter a datastore. On entering Datastore, it gives me an error :
    Error: Locator does not refer to an object

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s