You just cloned your Ubuntu 22.04 VM in VMWare vCenter. You right-click on the properties and you see this

What? Not connected?! No connect at power on?! What the heck just happened?!
A couple of things can actually go wrong when cloning a template. When you clone a template, one of these things is VMWare running a customization script on the cloned VM to perform various tasks.
Let’s see what we can find. On the freshly created vm, go to
cat /var/log/vmware-imc/toolsDeployPkg.log
At the end of the file, we can find this message:
[2022-08-27T23:29:26.375Z] [ error] Deploy error: 'Deployment failed.The forked off process returned error code.'.
[2022-08-27T23:29:26.375Z] [ error] Package deploy failed in DeployPkg_DeployPackageFromFile
[2022-08-27T23:29:26.375Z] [ debug] ## Closing log
Scroll up and you will probably see
INFO: Customizing NIC NIC1
DEBUG: Command: '/sbin/ifconfig -a'
DEBUG: Result:
DEBUG: Exit Code: -1
ERROR: Fatal error occurred during customization !! Customization halted.
ERROR: Error : Error finding the specified NIC for MAC address = 00:50:56:g1:08:bb at /var/run/.vmware-imgcust-dhDuktR/scripts/DebianCustomization.pm line 157.
huh, it couldn’t run ifconfig -a?
Let’s try it.
root@Ubuntu22:/var/log/vmware-imc# /sbin/ifconfig -a
Command 'ifconfig' not found.
Of course the customization script can go on and fails. That is why we don’t have any network connectivity.
Without showing you EVERYTHING that was missing on this Ubuntu 22.04 template, to use the cloning method on VMWare vCenter, you need to install a few tools first on your template.
THE SOLUTION!
net-tools will install ifconfig and ifupdown will install the network scripts needed for the customization to continue.
apt install net-tools ifupdown
You also need to make a link for dhcp
ln -s /etc/dhcp /etc/dhcp3
At one point, the script failed because /etc/dhcp3 was missing.
Finally shutdown that VM and clone it and profit 🙂