From a20a8e2760727cfcd63caae806a7ed265284c0d8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 4 Jan 2013 21:03:47 +0000 Subject: [PATCH] Various changes regarding Hyper-V 2012 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14747 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 2 +- xCAT-server/lib/xcat/plugins/windows.pm | 6 +- .../windows/hypervisor.hyperv2012.x86_64.tmpl | 120 ++++++++++++++++ .../hypervisor.hyperv2012.x86_64.tmpl.uefi | 130 ++++++++++++++++++ 4 files changed, 254 insertions(+), 4 deletions(-) create mode 100644 xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl create mode 100644 xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl.uefi diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index d8aaaa7f3..3e2bdc3db 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -91,7 +91,7 @@ sub check_uefi_support { } } } - if ($ntent->{os} =~ /win/) { #UEFI support is a tad different, need to punt.. + if ($ntent->{os} =~ /^win/ or $ntent->{os} =~ /^hyperv/) { #UEFI support is a tad different, need to punt.. return 2; } return 1; diff --git a/xCAT-server/lib/xcat/plugins/windows.pm b/xCAT-server/lib/xcat/plugins/windows.pm index 463a3b4a8..4526cd9dd 100644 --- a/xCAT-server/lib/xcat/plugins/windows.pm +++ b/xCAT-server/lib/xcat/plugins/windows.pm @@ -27,7 +27,7 @@ sub handled_commands { return { copycd => "windows", - mkinstall => "nodetype:os=(win.*|imagex)", + mkinstall => "nodetype:os=(hyperv.*|win.*|imagex)", mkwinshell => "windows", mkimage => "nodetype:os=imagex", }; @@ -506,7 +506,7 @@ sub copycd #this plugin needs $mntpath... return; } - if ($distname and $distname !~ /^win.*/) + if ($distname and $distname !~ /^win.*/ and $distname !~ /^hyperv.*/) { #If they say to call it something other than win, give up? return; @@ -536,7 +536,7 @@ sub copycd my $eiline = <$eicfg>; $eiline = <$eicfg>; if ($eiline =~ /Hyper/) { - $distname = "winhv2012"; + $distname = "hyperv2012"; } } unless ($distname) { diff --git a/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl b/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl new file mode 100644 index 000000000..6295881fa --- /dev/null +++ b/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl @@ -0,0 +1,120 @@ + + + + + + + en-US + + en-US + en-US + en-US + 0409:00000409 + + + + OnError + + 0 + true + + + 1 + Primary + true + + + + + + false + + + + + 0 + 1 + + + + /IMAGE/NAME + Hyper-V Server 2012 SERVERHYPERCORE + + + + + + true + xCAT USER + xCAT + + + + + + + + I:\drivers\#TABLE:nodetype:$NODE:os#\#TABLE:nodetype:$NODE:arch#\Drivers + + + + + + + + 32 + 1024 + 768 + + + true + 1 + false + false + + + + + + #TABLE:passwd:key=system,username=Administrator:password# + true</PlainText> + </AdministratorPassword> + </UserAccounts> + </component> + </settings> + <settings pass="auditUser"> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <Display> + <ColorDepth>32</ColorDepth> + <HorizontalResolution>1024</HorizontalResolution> + <VerticalResolution>768</VerticalResolution> + </Display> + </component> + </settings> + <settings pass="specialize"> + <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <fDenyTSConnections>false</fDenyTSConnections> + </component> + <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <UserAuthentication>0</UserAuthentication> + </component> + <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <FirewallGroups> + <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> + <Active>true</Active> + <Group>Remote Desktop</Group> + <Profile>all</Profile> + </FirewallGroup> + </FirewallGroups> + </component> + <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + </component> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ComputerName>#TABLE:nodelist:$NODE:node#</ComputerName> + <TimeZone>#WINTIMEZONE#</TimeZone> + </component> + </settings> + <settings pass="auditSystem"> + </settings> + <cpi:offlineImage cpi:source="wim:i:/win2k8r2/x86_64/sources/install.wim#Hyper-V Server 2012 SERVERHYPERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> +</unattend> diff --git a/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl.uefi b/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl.uefi new file mode 100644 index 000000000..0dc14787a --- /dev/null +++ b/xCAT-server/share/xcat/install/windows/hypervisor.hyperv2012.x86_64.tmpl.uefi @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="utf-8"?> +<unattend xmlns="urn:schemas-microsoft-com:unattend"> + <servicing></servicing> + <settings pass="windowsPE"> + <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <SetupUILanguage> + <UILanguage>en-US</UILanguage> + </SetupUILanguage> + <UserLocale>en-US</UserLocale> + <UILanguage>en-US</UILanguage> + <SystemLocale>en-US</SystemLocale> + <InputLocale>0409:00000409</InputLocale> + </component> + <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <DiskConfiguration> + <WillShowUI>OnError</WillShowUI> + <Disk> + <DiskID>0</DiskID> + <WillWipeDisk>true</WillWipeDisk> + <CreatePartitions> + <CreatePartition> + <Order>1</Order> + <Type>EFI</Type> + <Size>50</Size> + </CreatePartition> + <CreatePartition> + <Order>2</Order> + <Type>MSR</Type> + <Size>128</Size> + </CreatePartition> + <CreatePartition> + <Order>3</Order> + <Type>Primary</Type> + <Extend>true</Extend> + </CreatePartition> + </CreatePartitions> + </Disk> + </DiskConfiguration> + <DynamicUpdate> + <Enable>false</Enable> + </DynamicUpdate> + <ImageInstall> + <OSImage> + <InstallTo> + <DiskID>0</DiskID> + <PartitionID>3</PartitionID> + </InstallTo> + <InstallFrom> + <MetaData wcm:action="add"> + <Key>/IMAGE/NAME</Key> + <Value>Hyper-V Server 2012 SERVERHYPERCORE</Value> + </MetaData> + </InstallFrom> + </OSImage> + </ImageInstall> + <UserData> + <AcceptEula>true</AcceptEula> + <FullName>xCAT USER</FullName> + <Organization>xCAT</Organization> + </UserData> + </component> + </settings> + <settings pass="offlineServicing"> + <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <DriverPaths> + <PathAndCredentials wcm:action="add" wcm:keyValue="1"> + <Path>I:\drivers\#TABLE:nodetype:$NODE:os#\#TABLE:nodetype:$NODE:arch#\Drivers</Path> + </PathAndCredentials> + </DriverPaths> + </component> + </settings> + <settings pass="oobeSystem"> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <Display> + <ColorDepth>32</ColorDepth> + <HorizontalResolution>1024</HorizontalResolution> + <VerticalResolution>768</VerticalResolution> + </Display> + <OOBE> + <HideEULAPage>true</HideEULAPage> + <ProtectYourPC>1</ProtectYourPC> + <SkipMachineOOBE>false</SkipMachineOOBE> + <SkipUserOOBE>false</SkipUserOOBE> + </OOBE> + <FirstLogonCommands> + </FirstLogonCommands> + <UserAccounts> + <AdministratorPassword> + <Value>#TABLE:passwd:key=system,username=Administrator:password#</Value> + <PlainText>true</PlainText> + </AdministratorPassword> + </UserAccounts> + </component> + </settings> + <settings pass="auditUser"> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <Display> + <ColorDepth>32</ColorDepth> + <HorizontalResolution>1024</HorizontalResolution> + <VerticalResolution>768</VerticalResolution> + </Display> + </component> + </settings> + <settings pass="specialize"> + <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <fDenyTSConnections>false</fDenyTSConnections> + </component> + <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <UserAuthentication>0</UserAuthentication> + </component> + <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <FirewallGroups> + <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> + <Active>true</Active> + <Group>Remote Desktop</Group> + <Profile>all</Profile> + </FirewallGroup> + </FirewallGroups> + </component> + <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + </component> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ComputerName>#TABLE:nodelist:$NODE:node#</ComputerName> + <TimeZone>#WINTIMEZONE#</TimeZone> + </component> + </settings> + <settings pass="auditSystem"> + </settings> + <cpi:offlineImage cpi:source="wim:i:/win2k8r2/x86_64/sources/install.wim#Hyper-V Server 2012 SERVERHYPERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> +</unattend>