// For ESX host, we need to enable host firewall to allow VNC access
HostMO hostMo = new HostMO(serviceContext, morHost);
HostFirewallSystemMO firewallMo = hostMo.getHostFirewallSystemMO();
if(firewallMo != null) {
firewallMo.enableRuleset("vncServer");
firewallMo.refreshFirewall();
}
return morHost;
}