autounattend.xml runs setup.ps1 Powershell script after the first autologon.autounattend.xml runs vmtools.cmd batch script during the "specialize" pass.Windows setup reads autounattend.xml from floppy drive.When VM is powered on it boots from the first ISO which is Windows installation disk.Power on VM and wait for it to get an IP address.Create floppy disk and put files from setup dir on it.Mount ISO images specified in json file.Connect to vSphere and create virtual machine.$ packer build -var-file =vars.json windows-server-2016.json Build process overviewĪfter you clone my Github repo and tweak the config files in accrordance with your environment all you need to do is run this command: To install vpshere-iso plugin download its binary from the releases page and put it in the same directory where you put packer binary. You can read about other installation options on the official guide. Just download the appropriate package, unzip Packer binary and place it somewhere on your $PATH. There are no packages of Packer for Ubuntu, but it can be installed as a precompiled binary very easily. I use Ubuntu, but the installation process is fairly similar on all supported OSes. Setting up Packerįirst you need to install Packer on your workstation. Looks pretty much like a dirty hack to me, not to mention that I don't have enough privileges to make such modifications to ESXi hosts in my environment.įortunately there is a third-party builder by JetBrains called vsphere-iso which does pretty much the same as vmware-iso but using vCenter API instead of SSH (they also have a vsphere-clone builder as a vmware-vmx alternative). But to use vmware-iso builder remotely on VMware vSphere hypervisor you need to modify your ESXi host to allow SSH access, because vmware-iso uses SSH instead of API to talk to VMware hypervisor. Vmware-iso however starts from ISO file and creates brand new VM. The latter uses existing VMs to create images, so it doesn't fit in my concept of building everything from scratch. There are two builders for VMware available out of the box: vmware-iso and vmware-vmx. Packer uses builder plugins to actually build images. Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. In this post I will cover the first stage, i.e. Deploy the desired number of VMs using template from the previous stepĪll the scripts and configurations I use in this series of articles are available at my GitHub repository.The whole process can be devided in three stages: AWS) as a virtualization platform, so I decided to make a write up about my experience with VMware vSphere. Most articles I've come across cover the use of cloud providers (e.g. In this series of posts I'd like to show how to automate the process of setting up virtual infrastructure consisting of several Windows Server 2016 machines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |