Comment 22 for bug 1793715

Revision history for this message
Maher AlAsfar (malasfar) wrote :

Hi @Pengpeng Sun (pengpengs)

This is where i am with Ubuntu 16.04

Behaviour for deploying Ubuntu 16.04 VMs using Static IP from Automation tool After installing cloud-init

Template Tasks Taken
====================
Deploy Ubuntu 16.04 from ISO

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install cloud-init

sudo dpkg-reconfigure cloud-init -> Selecting only OVF and NONE as data sources. since the automation tool maps an iso image to pass the user data to cloud-init

Following KB https://kb.vmware.com/s/article/59687
But using After=dbus.socket instead of After=dbus.service

Using Open-VM-Tools 10304 (10.2.0) Using ESXi 6.7 Update 2 and later (VM version 15) for the VM Hardware

Tasks Invoked by vCenter when provisioning from Automation tool
===============================================================
Clone Virtual Machine from Template

Reconfigure Virutal Machine

Customize Virutal Machine Guest OS

Power on Virtual Machine During the boot time the network state is disconnected

Customization does start and successful, listed in the VM Events

VM reboots and the network shows as connected

IP provied from Static IP Range

Hostname is Updated

Cloud config fail to executes in the right order ( Before Network Settings are Applied ) most of the time but magically sometimes it does execute fine after the network is up

When it doesn't work, looking at the cloud-init logs that Cloud-init start way too early when the network isn't setup / started yet when it executes.

Looking for a way to make cloud-init executes after VMware Customization .. i thought the KB i mentioned above would do that but it only help getting the customization to complete successfully because if you don't add the After=dbus.socket to the open-vm-tools.service , everything else fails which is way worse since the network will be never connected and the customization will error out in the VM Events where the logs shows the same exact error mentioned in the KB above.

Ofcourse this has a completely different dynamics when your testing with Ubuntu 18.04 which i will get into once i figure Ubuntu 16.04 out.