Issues using DHCP for Ubuntu 16.04

I’m having an issue where my Ubuntu VMs are not getting IP addresses from DHCP.
It seems that once the contextualisation package is installed it wipes out the eth0 configration, and it is not setup once the template is instantiated.

CentOS and Windows templates get IP addresses from DHCP with no issues.

My VNET is configured with only a MAC range, which I think is how the documentation says it should be for DHCP.

I’ve been a little confused by what the vnet IP configuration needs to be, but I think the vSphere import defaults should be correct (setting only a MAC address range)

I’d greatly apprechate any help!

Versions of the related components and OS (frontend, hypervisors, VMs):
OpenNebula 5.6.0
ESXi 6.5 + vSphere 6.7
Ubuntu Server 16.04.4

Steps to reproduce:

  • Clean install of Ubuntu
  • install open-vm-tools, cloud-utils, cloud-initramfs-growroot
  • (reboots with IP)
  • install one-context-5.6.0-1.deb
  • (now reboots without IP, or instanciates new VM without IP)
  • /etc/network/interfaces no longer references eth0

In this case, I usually remove appropriate files from VM’s /etc/one-context.d/
I think it would nice to have option like “DHCP” in NIC VM’s configuration.