How can I get an IPv4 address for an Ubuntu 1904 VM on ESXI 6.7, deployed from the Ubuntu OVA?

I'm deploying the OVA using govc, and I've provided the below spec file. Of note are the IPProtocol, IPAllocationPolicy and WaitForIP fields.

  "DiskProvisioning": "flat",
  "IPAllocationPolicy": "fixedAllocationPolicy",
  "IPProtocol": "IPv4",
  "WaitForIP": true,
  "PropertyMapping": [
      "Key": "instance-id",
      "Value": "id-ovf"

When the VM comes up, it has an IPv6 local-link address (fe80::20c:29ff:fe78:c846), rather than an IPv4 address.

I've tried deploying it with the following cloud-init cloud config, to no avail. There are no discernible errors in the cloud-init logs. Other elements of the cloud config work fine (such as the writing of helloworld.json).


    list: |
    expire: false

  - content: |
          "say": "helloworld"
    path: /etc/helloworld.json

  version: 2
  renderer: networkd
     dhcp4: no
     addresses: []
       addresses: [,]

I'm trying to stand this VM up as part of an automated process, and want to SSH into it after it booting. I know more about coding than I do about networking, so any help would be most gratefully received.


I've not done this myself but it looks to me that for ESXi (which unlike vCenter has no db to store the properties) you need to add the following to your spec file

  "InjectOvfEnv": true,
  "PowerOn": true,

I found an example of this in Step 6 of https://www.virtuallyghetto.com/2016/04/slick-way-of-deploying-ovfova-directly-to-esxi-vcenter-server-using-govc-cli.html

  • Thanks! I'm doing that already actually (it was one of the values I truncated). I'm not sure why the IPProtocol isn't being respected, but other values are. – EngineerBetter_DJ Sep 30 '19 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.