VMware Builder
The VMware Packer builder is able to create VMware virtual machines for use with any VMware product.
Packer actually comes with multiple builders able to create VMware machines, depending on the strategy you want to use to build the image. Packer supports the following VMware builders:
vmware-iso - Starts from an ISO file, creates a brand new VMware VM, installs an OS, provisions software within the OS, then exports that machine to create an image. This is best for people who want to start from scratch.
vmware-vmx - This builder imports an existing VMware machine (from a VMX file), runs provisioners on top of that VM, and exports that machine to create an image. This is best if you have an existing VMware VM you want to use as the source. As an additional benefit, you can feed the artifact of this builder back into Packer to iterate on a machine.
How to use this plugin
From Packer v1.7.0, copy and paste this code into your Packer configuration to install this plugin.
Then, run packer init
.
VMware Workstation Player on Linux
To use VMware Workstation Player with Packer on Linux, you will also need
the qemu-img
command, which is available in the qemu
package in
Red Hat Enterprise Linux, Debian, and derivative distributions.
Additionally you will need to have the vmrun
command, which is part of the
VMware Virtual Infrastructure eXtension (VIX) SDK.
Finally, you must edit the file /usr/lib/vmware-vix/vixwrapper-config.txt
and change the version specified in the fourth column to be the version in
the third column of the vmplayer -v
command.
See this StackOverflow thread for more details.