In addition, the scripts/vmware.sh provisioner script tries to install VMware Tools expecting that the iso file was uploaded, but with the esx5 target this is not the case. I modified the script but due to the vim-cmd failing, ultimately packer fails the build.
Finally when running the script/minimize.sh script the vmware-tools-cli disk shrink / command gets an error and returns exit-code 72 because shrinking is disabled for linked clones, parents of linked clones, pre-allocated disks, snapshots, or due to other factors. I worked around this by doing an echo after the vmware-tools-cli command, so that the script would exit cleanly.
When trying to build an image on ESXi using the vmware-iso builder it fails at the end because Packer was no able to install vmware-tools. Packer tries to use a
vim-cmd
when"remote_type": "esx5"
is set. I believe this is https://github.com/mitchellh/packer/issues/1795. I opened https://github.com/mitchellh/packer/issues/4022.In addition, the
scripts/vmware.sh
provisioner script tries to install VMware Tools expecting that the iso file was uploaded, but with the esx5 target this is not the case. I modified the script but due to the vim-cmd failing, ultimately packer fails the build.Finally when running the
script/minimize.sh
script thevmware-tools-cli disk shrink /
command gets an error and returns exit-code 72 because shrinking is disabled for linked clones, parents of linked clones, pre-allocated disks, snapshots, or due to other factors. I worked around this by doing anecho
after thevmware-tools-cli
command, so that the script would exit cleanly.