This is a basic Packer configuration which can be used to build Ubuntu 18.04 VM template remotely on Vmware vSphere.
- Packer
- Packer Builder for VMware vSphere
- Ubuntu Server ISO
- vSphere vCenter accessible from your workstation
- DHCP server for VM template building
cp vars.json.example vars.json
- edit
vars.json
according to your environment - run
packer build -var-file=vars.json ubuntu.json
- Current version of open-vm-tools does not support
netplan
in VM customization. The following workaround is done in provisioning script:- ‘disable_vmware_customization: false’ is added to
/etc/cloud/cloud.cfg
- ‘disable_vmware_customization: false’ is added to
tmp
dir issue fix:- line
D /tmp 1777 root root -
is commented out from/usr/lib/tmpfiles.d/tmp.conf
- line