I am a HUGE fan of HashiCorp Packer and I have been using it for a number of years across many different projects including the VMware Event Broker Appliance (VEBA) solution. While it can certainly feel daunting at first, the same can be said for just about anything new, I typically point folks over to Ryan Johnson's fantastic Packer Examples for VMware vSphere project as a starting point, where you can find working Packer examples across a number of popular OS distributions for both Windows and Linux.
Most recently, I was helping out a few colleagues who was interested in automating the build of an Ubuntu Desktop image that could then be exported to an OVF/OVA. Of course, my recommendation was for them take a look at Ryan's project and they should be able to augment the existing Ubuntu Server 22.04 example. Interestingly enough, while I always recommend Ryan's Packer example repo, I have not personally used it myself and this is primarily due to the existing customization I have in my Packer builds which includes the use of custom OVF properties, which you can read more about HERE, HERE AND HERE.
Since I was recommending the project, I figure I should probably give it a try at least once and the Ubuntu Desktop addition should be a trivial thing to add ... right?
Ryan's project is extremely comprehensive and while things should just work if you use the default builds, but if you wish to make tweaks, I can certainly understand that you could feel overwhelmed, which is exactly how I felt when trying to figure out how to augment the existing Ubuntu Server 22.04 build.
While I do have experience in using Packer, it did take me a few attempts as I ran into some setup issues on my macOS system and just ended up deploying an Ubuntu 22.04 VM to then use as my build host. The required change to go from an Ubuntu Server to Ubuntu Desktop was minimal, you do need to understand the project layout and ultimately how the repo has been setup, which includes the use of Ansible Packer Provisioner, which was not something I had used before.
I wanted to put together this blog post, not only as a reference for myself but also for anyone who wants to start using Packer and Ryan's awesome repo but need a bit more guidance if you intend to perform further customization.