This project uses Packer to create a Windows VM in VMware vSphere and configures it so Ansible can be used to further customize and install software on the operating system.
This speeds up the process of creating highly customized Master / Golden Images for VDI puposes.
- Install Ubuntu server
- Install Packer and Ansible
- Install
sudo apt-get install -y genisoimagewhich is needed for the Packer vSphere Plugin to create VMs - Clone repo to
/srv/
- change directory
cdto/srv/vdi-master-automation/packer - use
auto.pkrvars.hcl.sampleto createauto.pkrvars.hclwith all needed variables- Windows and VMware Tools ISOs are needed on the datastore
- change directory
cdto/srv/vdi-master-automation/packerand runpacker init .to install Packer plugins from main.pkr.hcl
packer validate -var-file='auto.pkrvars.hcl' .to validate main.pkr.hcl in combination with the needed variablespacker build -var-file='auto.pkrvars.hcl' .to start the VM build process