VMware Cloud Community
afragop
Contributor
Contributor

Ubuntu 18.04 deployment fails - guest customization issues

Dear community

Good evening.

I have created a BP which uses an image component profile based on Ubuntu 18.04 template; any deployment that I have tried so far fails.

Following a lot of troubleshooting it looks like that the correct IP settings aren't configured towards the guest customization process of the OS, so underlying vRO workflows don't execute, thus deployment fails.

Any ideas here? Has anyone managed to create a BP based on Ubuntu 18.04?

I suspect that the issue is related with the netplan...

All my ESXi hosts are on 6.5U2, vCenter server is 6.5.0f, using vRA 7.5

Thanks in advance for any help.

Tasos

Reply
0 Kudos
6 Replies
qc4vmware
Virtuoso
Virtuoso

I'm pretty sure you are hitting a VMware customization issue.  We had to work around this at one point from what I remember.  First thing I'd make sure you have the most recent version of the VMware open tools installed in the image.  If you already do or try and it doesn't work you may end up needing to work around.  I'm not sure what your workflows are doing but you should still be able to run commands within the guest os.  It sounds like you are running commands via ssh or some other method dependent on the networking being up.  I think in our workaround we actually updated the network configuration and restarted the networking.  You should be able to easily do this with an event subscription. 

So, try a manual deployment/customization, straight from vCenter and see if that works.  If not you can try my suggestions above and you may need to open a support case with VMware.  If you can manually deploy one using the same customization spec you've specified within vRA then that would be odd to me.

Paul

Reply
0 Kudos
qc4vmware
Virtuoso
Virtuoso

I found what we did to work around the issue... try putting this into your template build process or just manually remove the information before you convert it to a template

# if this is ubuntu or other system using systemd remove hardware info from interfaces file

# vmware customization exits out if it can't find an interface that matches the current hwaddress

# which will be different after a clone

if [ -e /etc/network/interfaces ]

then

   sed -i -e '/hwaddress/d' /etc/network/interfaces

fi

Reply
0 Kudos
darrenoid
Enthusiast
Enthusiast

This article might be related:

VMware Knowledge Base

Reply
0 Kudos
afragop
Contributor
Contributor

Thanks

I tried this KB but still guest customization fails.

T.

Reply
0 Kudos
afragop
Contributor
Contributor

Thanks for the workaround.

I tested but it doesn't resolve the error - still guest customization fails.

T.

Reply
0 Kudos
darrenoid
Enthusiast
Enthusiast

I used this article for my Ubuntu 18.04 template and it customizes correctly:

https://jimangel.io/post/create-a-vm-template-ubuntu-18.04/

The issue I faced was that all cloned machines would come up with the same IP address. This was related to Ubuntu using the /etc/machine-id for DHCP leases instead of mac addresses. To get around this I truncated the /etc/machine-id value before shutting down and converting to a template. After the article above was updated to include:

# set dhcp to use mac - this is a little bit of a hack but I need this to be placed under the active nic settings

# also look in /etc/netplan for other config files

sed -i 's/optional: true/dhcp-identifier: mac/g' /etc/netplan/50-cloud-init.yaml

Which is a better solution IMO.

I am also using vcenter 6.7 U2. I think Ubuntu 18.04 is only officially supported for guest customization after 6.5 U2.

Have you tried manually cloning from the template in vcenter and then checking the guest customization logs and inspecting the networking config after the clone?

Reply
0 Kudos