-
Enable ssh via the ESXi console
-
Enable the "Guest IP Hack" which will enable packer to infer the IP address of the guest.
esxcli system settings advanced set -o /Net/GuestIPHack -i 1
-
Enable VNC access for packer
Modify the firewall rules to add
chmod 644 /etc/vmware/firewall/service.xml
chmod +t /etc/vmware/firewall/service.xml
Add this to /etc/vmware/firewall/service.xml
<service id="1000">
<id>packer-vnc</id>
<rule id="0000">
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>5900</begin>
<end>5964</end>
</port>
</rule>
<enabled>true</enabled>
<required>true</required>
</service>
And restart the firewall service
chmod 444 /etc/vmware/firewall/service.xml
esxcli network firewall refresh
To create the OVA image there is a Makefile for the steps.
- cp vars-sample.json vars.json
- Edit vars.json for your ESXi installation
make build
To import the new OVA back, run this command:
govc import.ova -name testkube VMware-ubuntu-kubernetes.ova
The login/password for the VMware-ubuntu-kubernetes OVA image is kube/kube. Please change this password after logging in.