@hashicorp
The Packer Plugin for VMware with to create virtual machine images for use with VMware products.
- Official
Updated 4 months ago
- GitHub(opens in new tab)
VMware
The Packer Plugin for VMware with which to create virtual machine images for use with VMware products.
Installation
To install this plugin add this code into your Packer configuration and run packer init
Alternatively, you can use packer plugins install
to manage installation of this plugin.
Components
The plugin includes two builders which are able to create images, depending on your desired strategy
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.
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.