WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Quick Tip - OVFTool 4.3 now supports vCPU & memory customization during deployment

Quick Tip - OVFTool 4.3 now supports vCPU & memory customization during deployment

05.29.2018 by William Lam // 3 Comments

In addition to adding vSphere 6.7 support and a few security enhancements (more details in the release notes), the latest OVFTool 4.3 release has also been enhanced to support customizing either vCPU and/or Memory from the default configurations when deploying an OVF/OVA.

Historically, it was only possible to modify these values if you were deploying to a vCloud Director endpoint using either --numberOfCpus or --memorySize. When deploying to a vSphere endpoint, these settings were not applicable and users would need to perform an additional operation calling into the vSphere API using whatever automation tool of choice to reconfigure the VM after deployment. It was not the end of the world but also not ideal if you simply wanted to make a minor modification to the default OVF/OVA you were deploying. I definitely ran into this a few times where having this functionality would have been very useful and I know number of customers have also shared simliar feedback in the past.

I had asked whether it was possible to support this use case and it looks like we already had an internal feature request added to the OVFTool backlog and with some additional customer feedback, we were also able to get this enhancement added to the latest release.

The existing --numberOfCpus and --memorySize accepts a VM Identifier (usually the name) followed by the value, for example

--numberOfCpus:Foo=4

The VM Identifier is to help with vApp deployments where you may have an OVF/OVA which is composed of multiple VMs of which you would like to customize each VM with different values. To ensure we do not break backwards compatibility, this pattern has also been extended when deploying to a vSphere endpoint. Having said that, most customers that I have talked to who use OVFTool generally deploy an OVF/OVA that is comprised of a single VM. In this case, rather than specifying the name of the VM again which is derived from --name property, you can simply use the wildcard asterisk (*) to simply apply it to all VMs within the OVF/OVA.

Here is an example of deploying a PhotonOS OVA which is configured with a default of 1 vCPU and 2GB memory and as part of our deployment using OVFTool, we will increase both vCPU to 2 and memory to 4GB:

ovftool --acceptAllEulas --name=Foo --numberOfCpus:'*'=2 --memorySize:'*'=4096 photon-custom-hw11-2.0-304b817.ova 'vi://*protected email*@192.168.30.200/VSAN-Datacenter/host/VSAN-Cluster'

More from my site

  • Quick Tip - How to deploy vCenter Server Appliance (VCSA) to legacy CPU without VMX Unrestricted Guest feature?
  • Quick Tip - Easily move or copy VMs between two Free ESXi hosts?
  • Quick Tip - Encoding special characters for OVFTool on the command-line
  • Quick Tip - How to deploy OVF/OVA to multiple networks using OVFTool?
  • OVFTool 4.4.1 - Upload OVF/OVA from URL using upcoming "pull" mechanism

Categories // Automation, OVFTool Tags // memorySize, numberOfCpus, ovftool

Comments

  1. *protectedEndre Ligeti says

    05/30/2018 at 3:40 pm

    Great improvement, thanks for the hint. However, it would be more than great if --diskSize would be applicable as well, because it seems to be ignored in 4.3.0. Is it intentional or shall we expect to be introduced in a future version of ovftool?

    Reply
  2. *protectedEndre Ligeti says

    06/01/2018 at 5:10 am

    One more comment. I assume, running ovftool directly on the ESXi host is not supported, however 4.3.0 works on ESXi 6.7, and 4.2.0 is also usable on 6.5U2. Unfortunately, 4.3.0 fails to load on 6.5U2 with the following message:

    "error while loading shared libraries: libicudata.so.58: failed to map text segment from shared object: Error 28"

    I'm a bit afraid I need to keep using ovftool 4.2.0 and my legacy method to set vCPU and vMemory values, when deploying multiple VMs requiring different CPU and memory allocations from the same template. ESXi 6.7 is not a valid option yet.

    Reply
  3. *protectedRama Sharma says

    10/08/2019 at 11:45 pm

    is there a way to set the disk size of Photon VM with ovftool cli where target is VC ?

    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