diff --git a/xCAT-server/lib/xcat/plugins/windows.pm b/xCAT-server/lib/xcat/plugins/windows.pm index b020c70cb..2b7691a6e 100644 --- a/xCAT-server/lib/xcat/plugins/windows.pm +++ b/xCAT-server/lib/xcat/plugins/windows.pm @@ -58,6 +58,7 @@ sub mkinstall my $ostab = xCAT::Table->new('nodetype'); my %doneimgs; my $bptab = xCAT::Table->new('bootparams',-create=>1); + my $hmtab = xCAT::Table->new('nodehm'); foreach $node (@nodes) { my $osinst; @@ -173,11 +174,37 @@ sub mkinstall ); } my $shandle; + my $sspeed; + my $sport; + if ($hmtab) { + my $sent = $hmtab->getNodeAttribs($node,"serialport","serialspeed"); + if ($sent and defined($sent->{serialport}) and $sent->{serialspeed}) { + $sport = $sent->{serialport}; + $sspeed = $sent->{serialspeed}; + } + } + + open($shandle,">","$installroot/autoinst/$node.cmd"); - print $shandle "i:\\$os\\$arch\\setup /unattend:i:\\autoinst\\$node /noreboot\r"; + if ($sspeed) { + $sport++; + print $shandle "i:\\$os\\$arch\\setup /unattend:i:\\autoinst\\$node /emsport:COM$sport /emsbaudrate:$sspeed /noreboot\r\n"; + } else { + print $shandle "i:\\$os\\$arch\\setup /unattend:i:\\autoinst\\$node /noreboot\r\n"; + } + #print $shandle "i:\\postscripts\ + print $shandle "IF %PROCESSOR_ARCHITECTURE%==AMD64 GOTO x64\r\n"; + print $shandle "IF %PROCESSOR_ARCHITECTURE%==x64 GOTO x64\r\n"; + print $shandle "IF %PROCESSOR_ARCHITECTURE%==x86 GOTO x86\r\n"; + print $shandle ":x86\r\n"; + print $shandle "i:\\postscripts\\upflagx86 %XCATD% 3002 next\r\n"; + print $shandle "GOTO END\r\n"; + print $shandle ":x64\r\n"; + print $shandle "i:\\postscripts\\upflagx64 %XCATD% 3002 next\r\n"; + print $shandle ":END\r\n"; close($shandle); foreach (getips($node)) { - link "$installroot/autoinst/$node.cmd","$installroot/autoinst/$_.cmd" + link "$installroot/autoinst/$node.cmd","$installroot/autoinst/$_.cmd"; unlink "/tftpboot/Boot/BCD.$_"; if ($arch =~ /64/) { link "/tftpboot/Boot/BCD.64","/tftpboot/Boot/BCD.$_"; diff --git a/xCAT-server/share/xcat/netboot/windows/startnet.cmd b/xCAT-server/share/xcat/netboot/windows/startnet.cmd index 2ab42e270..0915fd0f6 100644 --- a/xCAT-server/share/xcat/netboot/windows/startnet.cmd +++ b/xCAT-server/share/xcat/netboot/windows/startnet.cmd @@ -8,3 +8,4 @@ net use i: \\%XCATD%\install for /f "delims=: tokens=2" %%c in ('ipconfig ^|find "IPv4 Address. . ."') do set NODEIP=%%c for /f %%c in ('echo %NODEIP%') do set NODEIP=%%c i:\autoinst\%NODEIP% +wpeutil reboot