Template of WS2019 via Packer/Autounattend.xml to vSphere 7, then deployment via Terraform. French explanations are under the English ones.
Set of scripts used to:
Simply clone the repository, then edit:
📌 The winserv2019.json script, where you have to replace the credentials and other informations to fix your infrastructure ;
📌 The Autounattend.xml file, where you have to change the language, and maybe the partitionning system if you want to ;
📌 The vmtools.bat, if you want to perform a Sysprep (or if you want to attach other scripts) ;
Then, just use the commands packer build winserv2019.json and then terraform apply -var 'nombre=X' to create the template/deploy the VMs.
I know this script set isn't perfect, but there is very few guides/docs that work with this builder, so I hope it helps you out anyway!
Ensemble de scripts utilisés pour:
Clonez simplement le repo', puis modifiez:
📌 Le script winserv2019.json, où vous devez remplacer les credentials et autres informations à adapter pour votre infrastructure;
📌 Le fichier Autounattend.xml, où vous devez changer la langue, et peut-être le système de partitionnement si vous le souhaitez;
📌 Le vmtools.bat, si vous souhaitez effectuer un Sysprep (ou si vous souhaitez attacher d'autres scripts);
Ensuite, utilisez simplement les commandes packer build winserv2019.json puis terraform apply -var 'number=X' pour créer le modèle / déployer les VM.
Je sais que cet ensemble de scripts n'est pas parfait, mais il n'y avait pas beaucoup de guides/documentations qui fonctionnent avec ce builder, alors j'espère que cela vous aidera quand même!
Pour plus d'informations, voici l'article de mon blog qui est en lien: https://notamax.be/deployer-un-ws-server-2019-sur-vsphere-7-via-packer-terraform/