From 636b6b8cd1d3196f09aa83c54e735068a1d9010a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 2 Aug 2018 13:38:16 -0400 Subject: [PATCH] Fix esxiready and do single reboot install --- xCAT-server/lib/xcat/plugins/esx.pm | 5 +++-- .../share/xcat/install/esxi/hypervisor.tmpl | 20 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index d1cafcc33..0c15bcfe7 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -181,8 +181,9 @@ sub preprocess_request { } elsif ($request->{command}->[0] eq 'mknetboot' or $request->{command}->[0] eq 'mkinstall') { return [$request]; - } - xCAT::Common::usage_noderange($request, $callback); + } elsif ($request->{command}->[0] ne 'esxiready') { + xCAT::Common::usage_noderange($request, $callback); + } if ($request->{_xcatpreprocessed} and $request->{_xcatpreprocessed}->[0] == 1) { return [$request]; } diff --git a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl index 467c92ded..238ed2b51 100644 --- a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl +++ b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl @@ -48,20 +48,18 @@ done echo -e "\nnextdestiny\n" | /bin/openssl s_client -quiet -connect $xcatd:3001 2>&1 | tee /tmp/foo.log %firstboot --interpreter=busybox -# enable SSH on next boot.... chkconfig SSH on -chkconfig ESXShell on -esxcli system settings advanced set --int-value 0 --option /VMFS3/EnableBlockDelete +/etc/init.d/SSH start +#chkconfig ESXShell on +#/etc/init.d/ESXShell start esxcli system settings advanced set --int-value 1 --option /UserVars/SuppressShellWarning esxcli network ip set -e y esxcli network firewall ruleset set -r DHCPv6 -e y esxcli network firewall ruleset set -r sshServer -e y esxcli network ip interface ipv6 set -i vmk0 -d y -cat > /etc/init.d/xcatesxiready << EOF -echo -e "\nesxiready\n" | /bin/openssl s_client -quiet -connect $xcatd:3001 2>&1 | tee /tmp/foo.log -chkconfig --del xcatesxiready -rm -rf /etc/init.d/xcatesxiready -EOF -chmod +x xcatesxiready -chkconfig --add xcatesxiready -reboot +#The following (replacing $xcatd with your address) enables esxi install to trigger a vcenter join automatically. +#uncomment the three lines and change $xcatd to your address for this functionality. +#and chtab priority=3.1 policy.commands=esxiready policy.rule=allow +#esxcli network firewall set -e 0 +#echo -e "\nesxiready\n" | /bin/openssl s_client -quiet -connect $xcatd:3001 2>&1 | tee /tmp/foo.log +#esxcli network firewall set -e 1