WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Quick Tip - Import OVF/OVA as VM Template using OVFTool 4.3 Update 1

Quick Tip - Import OVF/OVA as VM Template using OVFTool 4.3 Update 1

01.29.2019 by William Lam // 5 Comments

OVFTool is an extremely versatile command-line utility for importing and exporting Virtual Machines to and from the OVF/OVA format and it supports a number of VMware platforms including VMware Cloud on AWS (VMC), vSphere (vCenter Server and ESXi), Fusion, Workstation, Player and even vCloud Director (vCD).

An infrequent asks that I have seen from customers is the ability to deploy an OVF/OVA as a VM Template rather than just a Virtual Machine in a vSphere-based environment. OVFTool has had the ability to deploy to vAppTemplate for vCD-based environments, so it would make sense to also support vCenter Server VM Templates as well. Today, the workflow is a two-step process, deploy the OVF/OVA and then use the vSphere API to convert the VM to a VM Template.

With the latest OVFTool 4.3 Update 1 which was a minor release last year, we now have a new parameter called importAsTemplate which will allow customers to easily import an OVF/OVA directly into as a VM Template. Below is a quick sample using this new option and I am deploying to a VMC-based environment (see this article for requirements when using OVFTool with VMC)

ovftool.exe `
--acceptAllEulas `
--allowAllExtraConfig `
--name=PhotonOS-Template `
--datastore=WorkloadDatastore `
--net:None=sddc-cgw-network-1 `
--vmFolder=Templates `
--importAsTemplate `
C:\Users\william\Desktop\photon-hw13_uefi-3.0-49fd219.ova `
'vi://*protected email*@vcenter.sddc-a-b-c-d.vmwarevmc.com/SDDC-Datacenter/host/Cluster-1/Resources/Compute-ResourcePool/'

Once the upload has completed, we can take a look at our vSphere UI and see that our imported OVA been automatically been converted to a VM Template!

More from my site

  • Default hashing algorithm changed in OVFTool 4.2 preventing OVF/OVA import using vSphere C# Client
  • Heads Up: OVF/OVA always deployed as Thick on VSAN when using vSphere Web Client
  • Caveat when deploying Photon Controller Installer (v0.8) OVA to vCenter Server
  • How to deploy and run the VSAN 6.1 Witness Virtual Appliance on VMware Fusion & Workstation?
  • How to deploy vSphere 6.0 (VCSA & ESXi) on vCloud Director and vCloud Air?

Categories // Automation, OVFTool, VMware Cloud on AWS, vSphere Tags // ova, ovf, ovftool, VM Template

Comments

  1. *protectedEthan Lowry says

    01/29/2019 at 10:46 am

    I'm running into an issue now that vSphere exports the nvram file when you export a VM and the OVFTool does not pull this into the OVA when you use it. This causes the VM to fail to power on when imported into vSphere. The workaround I found was to remove the nvram entry in the VMX file. Any idea how I can get the OVFTool to include the NVRAM file when creating the OVA?

    Reply
    • William Lam says

      01/29/2019 at 2:24 pm

      What version of vSphere (VC/ESXi) and OVFTool are you using? For importing the OVA, are you using the vSphere UI or OVFTool?

      Reply
      • *protectedEthan Lowry says

        01/31/2019 at 2:03 pm

        After a bit more testing it seems this is unrelated to the OVATool but is an issue with how vSphere is exporting the templates. The NVRAM file should be there if I'm utilizing UEFI, but I'm not, but the file is still being called out in the VMX file and preventing power on's. I've opened a case with VMware and they are a bit stumped and are escalating. I'll reply once I get more details. A quick google search seemed to find a few other threads on VMware Forums of others with similar issues.

        Reply
  2. *protectedAndreas Cederlund says

    01/30/2019 at 12:03 am

    I have noticed that OVFTool does not work when the tennant or provider is using SAML authentication, at least for vCloud Director.

    Reply
  3. *protecteddmorse2112 says

    01/31/2019 at 9:17 am

    For some reason, the OVFTool Documentation link only shows 4.3 and earlier (no 4.3 U1) in the "Select a release:" dropdown. Here is a link to download OVFTool 4.3 U1: https://my.vmware.com/group/vmware/details?downloadGroup=OVFTOOL430U1&productId=742

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...