Skip to content

Instantly share code, notes, and snippets.

@p0rkjello
Last active October 8, 2020 14:58
Show Gist options
  • Save p0rkjello/6c114a0156aa12bf6c58bd49425a81af to your computer and use it in GitHub Desktop.
Save p0rkjello/6c114a0156aa12bf6c58bd49425a81af to your computer and use it in GitHub Desktop.
esxi vnc settings for packer

packer esxi vmc

configure esxi hypervisor for use with packer

enable GuestIPHack

esxcli system settings advanced set -o /Net/GuestIPHack -i 1

firewall configuration for vnc

scp the xml file into /etc/vmware/firewall

reload firewall settings from disk

esxcli network firewall unload
esxcli network firewall load

enable the inbound vnc traffic on ports 5900-6000

esxcli network firewall ruleset set  -e true -r packer_vnc

verify / list rules

esxcli network firewall ruleset list
<!-- /etc/vmware/firewall/packer_vnc.xml -->
<!-- remote packer vnc configuration -->
<ConfigRoot>
<service>
<id>packer_vnc</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>5900</begin>
<end>6000</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
</ConfigRoot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment