Export OVA with OVFTool

In this article I outline how to deploy a OVA file through the OVF tool.

After you have downloaded the OVF tool from VMware, install the software on the (jump) Server.

To List the VM characteristics

Via the cmd line, navigate to the program directory of the OVF Tool:

C:\Users\admin>cd  C:\Program Files\VMware\VMware OVF Tool

List the vCenter’s fqdn and put in your credentials:

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local
Enter login information for source vi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********

Unless you have specified the correct folder name it will give you an error and present you with the available options to choose from

Error: Found wrong kind of object (Folder). Possible completions are:
  Offices/
  Amsterdam/

Just keep going untill you are on the right location

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local/Offices
Enter login information for source vvi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********
Error: Found wrong kind of object (Datacenter). Possible completions are:
  vm/
  host/

After selecting vm/ as the preferred option, you will get a compete list of available folders of the supplied location.

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local/Offices/vm
Enter login information for source vi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********
Error: Found wrong kind of object (Folder). Possible completions are:
Folder 1/
Folder 2/
Folder 3/
Etc...

Add the folder at the end of the cmd line:

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local/Offices/vm/"Folder 1"
Enter login information for source vi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********

Continue to do this until you reach the location of the VM. You will then get a list of the VM’s configuration properties.

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local/Offices/vm/"Folder 1"/VM1
Enter login information for source vi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********
OVF version:   1.0
VirtualApp:    false
Name:          VM1

Annotation:  VOC server

Download Size:  Unknown

Deployment Sizes:
  Flat disks:   64.00 GB
  Sparse disks: Unknown

Networks:
  Name:        VLAN100
  Description: The VLAN100 network

Virtual Machines:
  Name:               VM1
  Operating System:   centos8_64guest
  Virtual Hardware:
    Families:         vmx-15
    Number of CPUs:   1
    Cores per socket: 1
    Memory:           2.00 GB

    Disks:
      Index:          0
      Instance ID:    10
      Capacity:       32.00 GB
      Disk Types:     SCSI-VirtualSCSI

      Index:          1
      Instance ID:    11
      Capacity:       32.00 GB
      Disk Types:     SCSI-VirtualSCSI

    NICs:
      Adapter Type:   VmxNet3
      Connection:     VLAN100

References:
  File:  /vm-322322/ParaVirtualSCSIController0:0
  File:  /vm-322322/ParaVirtualSCSIController0:1
  File:  /vm-322322/nvram

Export OVA file

To export the VM to a OVA file, use the following cmd:

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe vi://vcenter01.domain.local/Offices/vm/"Folder 1"/VM1 D:\Temp\VM1.ova

Followed by the admin credentials

Enter login information for source vi://vcenter01.domain.local/
Username: administrator@vsphere.local
Password: ***********

The export is starting:

Opening VI source: vi://administrator%40vsphere.local@vcenter01.domain.local:443/Offices/vm/Folder%1/VM1
Opening OVA target: D:\Temp\VM1.ova
Writing OVA package: D:\Temp\VM1.ova
Transfer Completed
Completed successfully

The OVA is exported successfully.