Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Correcting vnc support and other issues with ESXi template #525

Merged
merged 2 commits into from

2 participants

@jasonberanek

Commit fixes problems discussed in jedi4ever/veewee#523 where the ks.cfg put the machine in maintenance mode but never brought it out of that mode, and where the vnc configuration was operating incorrectly. The first issue was preventing VMs from being added to the VMware Fusion ESXi VM, the second prevented VNC access to servers running within the ESXi instance.

@jasonberanek

Ok, don't commit this yet. Apparently even though it seemed to be working, the VNC firewall rules aren't refreshing properly on restart. The firewall ESXi firewall configuration yak has not yet been shaved.

@jasonberanek

Ok, last commit actually fixed the issue. the profile.local instructions from VMware do not work as expected, and I was seeing false positive results as I had been connecting over ssh to ESXi, which triggered the profile.local script, before issuing builds that required VNC.

@jedi4ever jedi4ever merged commit c619441 into jedi4ever:master
@jasonberanek jasonberanek deleted the jasonberanek:esxi-templates branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  templates/VMware-ESXi-5.1-x86_64/ks.cfg
@@ -48,7 +48,7 @@ done
/sbin/auto-backup.sh
# enter maintenance mode
-esxcli system maintenanceMode set -e true
+#esxcli system maintenanceMode set -e true
# copy %first boot script logs to persisted datastore
cp /var/log/hostd.log "/vmfs/volumes/datastore1/firstboot-hostd.log"
View
10 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
@@ -14,7 +14,7 @@ echo "
<service id='0033'>
<id>vnc</id>
<rule id='0000'>
- <direction>outbound</direction>
+ <direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
@@ -32,8 +32,10 @@ echo "
cp /store/firewall/service.xml /etc/vmware/firewall/service.xml
esxcli network firewall refresh
-# Add steps to profile.local to repeat these steps on reboot
+sed -i "s/exit 0//" /etc/rc.local.d/local.sh
+
+# Add steps to /etc/rc.local/local.sh to repeat these steps on reboot
echo "
cp /store/firewall/service.xml /etc/vmware/firewall/service.xml
-esxcli network firewall refresh" >> /etc/profile.local
-
+esxcli network firewall refresh
+exit 0" >> /etc/rc.local.d/local.sh
Something went wrong with that request. Please try again.