Getting wrong IP address from Ubuntu 20.04 VM (autoinstall)

working hard to build Ubuntu 20.04 VM template (vmware-iso) using autoinstall.
The autoinstall indeed works nice (installation proceeds and Ubuntu is being installed). The problem is with DHCP and IP address obtained by Packer.

During the install process Ubuntu does sth like this:

  • obtain IP address through DHCP (lets say
  • pushes the IP to VMware via its tools API so Packer reads it (==> vsphere-iso: IP address:
  • releases the IP address (DHCPRELEASE) - still during installation process
  • obtain new IP address through DHCP (which is different from the first one lets say
  • finnish installation and reboots (without DHCPRELEASE)
  • boots new system and got second IP from DHCP (because lease still exists) so it has, but Packer “thinks” it has
  • Packer wait forever for SSH on and times out (because it’s on

Anyone has same problem?
I saw Debian does the same (got 2 IP addresses during install) but it doesn’t push it to VMware tools API so Packer doesn’t know it before it reboots and starts open-vm-tools.

Any idea how to fix that?