If you have been using VMware long enough, templates are nothing new. When creating VM’s with tools like Terraform or Ansible there are a few few extra steps required in order to get it function correctly during the creation and customization process of a Linux VM. This post will work for both Terraform and Ansible for the creation of a template for VMware.
Enough of that, lets get into it.
First make sure your VM is up to date
dnf update -y
Install Perl
dnf install perl -y
Install open-vm-tools
dnf install open-vm-tools -y
Reboot
reboot
Clean up the VM by removing the temporary network configuration
rm /etc/sysconfig/network-scripts/ifcfg-ens192
Shutdown VM
shutdown now
That’s all there is to it. Hopefully this helps you out.