From 02ee2e25d94949c07a77abee1fcde8df7797f7d9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 4 May 2012 21:04:54 +0000 Subject: [PATCH] Have ks= in esxi install honor noderes.nfsserver git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12537 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index a28cfae61..86518d812 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -4351,7 +4351,7 @@ sub mkcommonboot { my $restab = xCAT::Table->new('noderes',-create=>0); my $resents; if ($restab) { - $resents = $restab->getNodesAttribs(\@nodes,['tftpdir']); + $resents = $restab->getNodesAttribs(\@nodes,['tftpdir','nfsserver']); } my %tablecolumnsneededforaddkcmdline; @@ -4380,6 +4380,13 @@ sub mkcommonboot { my $profile = $ent->{'profile'}; my $osver = $ent->{'os'}; my $tftpdir; + my $ksserver; + if ($resents and $resents->{$node}->[0]->{nfsserver}) { + $ksserver=$resents->{$node}->[0]->{nfsserver}; + } else { + $ksserver='!myipfn!'; + } + if ($resents and $resents->{$node}->[0]->{tftpdir}) { $tftpdir = $resents->{$node}->[0]->{tftpdir}; } else { @@ -4506,7 +4513,7 @@ sub mkcommonboot { $append = "-c $tp/boot.cfg.$bootmode"; } if ($bootmode eq "install") { - $append .= " ks=http://!myipfn!/install/autoinst/$node"; + $append .= " ks=http://$ksserver/install/autoinst/$node"; esxi_kickstart_from_template(node=>$node,os=>$osver,arch=>$arch,profile=>$profile); } if ($bootmode ne "install" and $serialconfig->{$node}) { #don't do it for install, installer croaks currently