Skip to content

Commit

Permalink
Merge pull request #270 from gusztavvargadr/feature/add-windows-serve…
Browse files Browse the repository at this point in the history
…r-2022-core-268

Add Windows Server 2022 Core boxes #268
  • Loading branch information
gusztavvargadr authored Sep 10, 2021
2 parents ab571ab + 8e12b51 commit dc12759
Show file tree
Hide file tree
Showing 16 changed files with 425 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ var ws2019s = PackerTemplates_CreateWindows(
"windows-server-standard",
$"1809.0.{version}"
);
var ws2022s = PackerTemplates_CreateWindows(
"ws2022s",
"windows-server-2022-standard-desktop",
$"2102.0.{version}"
);
var ws2016sc = PackerTemplates_CreateWindows(
"ws2016sc",
"windows-server-standard-core",
Expand All @@ -27,6 +32,11 @@ var ws2019sc = PackerTemplates_CreateWindows(
"windows-server-standard-core",
$"1809.0.{version}"
);
var ws2022sc = PackerTemplates_CreateWindows(
"ws2022sc",
"windows-server-2022-standard-core",
$"2102.0.{version}"
);
var wsips = PackerTemplates_CreateWindows(
"wsips",
"windows-server-standard-insider",
Expand Down
9 changes: 9 additions & 0 deletions src/core/azp/windows-server/ws2022s/hyperv-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trigger: none
pr: none

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022s
provider: hyperv
configuration: core
25 changes: 25 additions & 0 deletions src/core/azp/windows-server/ws2022s/hyperv-vagrant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger: none
pr: none

resources:
pipelines:
- pipeline: parent
source: ws2022s-hyperv-core
trigger:
branches:
include:
- master

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022s
provider: hyperv
configuration: vagrant
parent: ws2022s

- template: ../../cd-stages.yml
parameters:
image: ws2022s
provider: hyperv
configuration: vagrant
9 changes: 9 additions & 0 deletions src/core/azp/windows-server/ws2022s/virtualbox-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trigger: none
pr: none

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022s
provider: virtualbox
configuration: core
25 changes: 25 additions & 0 deletions src/core/azp/windows-server/ws2022s/virtualbox-vagrant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger: none
pr: none

resources:
pipelines:
- pipeline: parent
source: ws2022s-virtualbox-core
trigger:
branches:
include:
- master

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022s
provider: virtualbox
configuration: vagrant
parent: ws2022s

- template: ../../cd-stages.yml
parameters:
image: ws2022s
provider: virtualbox
configuration: vagrant
9 changes: 9 additions & 0 deletions src/core/azp/windows-server/ws2022sc/hyperv-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trigger: none
pr: none

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022sc
provider: hyperv
configuration: core
25 changes: 25 additions & 0 deletions src/core/azp/windows-server/ws2022sc/hyperv-vagrant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger: none
pr: none

resources:
pipelines:
- pipeline: parent
source: ws2022sc-hyperv-core
trigger:
branches:
include:
- master

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022sc
provider: hyperv
configuration: vagrant
parent: ws2022sc

- template: ../../cd-stages.yml
parameters:
image: ws2022sc
provider: hyperv
configuration: vagrant
9 changes: 9 additions & 0 deletions src/core/azp/windows-server/ws2022sc/virtualbox-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trigger: none
pr: none

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022sc
provider: virtualbox
configuration: core
25 changes: 25 additions & 0 deletions src/core/azp/windows-server/ws2022sc/virtualbox-vagrant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger: none
pr: none

resources:
pipelines:
- pipeline: parent
source: ws2022sc-virtualbox-core
trigger:
branches:
include:
- master

stages:
- template: ../../ci-stages.yml
parameters:
image: ws2022sc
provider: virtualbox
configuration: vagrant
parent: ws2022sc

- template: ../../cd-stages.yml
parameters:
image: ws2022sc
provider: virtualbox
configuration: vagrant
127 changes: 127 additions & 0 deletions src/ws2022s/packer/builders/iso/floppy/Autounattend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<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>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</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>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>500</Size>
<Type>EFI</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Size>128</Size>
<Type>MSR</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>3</Order>
<Extend>true</Extend>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME </Key>
<Value>Windows Server 2022 SERVERSTANDARD</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>Never</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Administrator</FullName>
<Organization>gusztavvargadr</Organization>
</UserData>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" 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">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<settings pass="specialize">
<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">
<OEMInformation>
<HelpCustomized>false</HelpCustomized>
</OEMInformation>
<ComputerName/>
<TimeZone>UTC</TimeZone>
<RegisteredOwner/>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" 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">
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
</component>
<component name="Microsoft-Windows-IE-ESC" 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">
<IEHardenAdmin>false</IEHardenAdmin>
<IEHardenUser>false</IEHardenUser>
</component>
<component name="Microsoft-Windows-OutOfBoxExperience" 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">
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</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">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>Packer42-</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<RegisteredOwner/>
<AutoLogon>
<Password>
<Value>Packer42-</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>Administrator</Username>
<LogonCount>1</LogonCount>
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; E:\Autounattend.ps1"</CommandLine>
<Description>Autounattend.ps1</Description>
<Order>1</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>
7 changes: 7 additions & 0 deletions src/ws2022s/packer/builders/iso/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variables": {
"iso_url_local": "{{user `download_directory`}}/20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso",
"iso_url_remote": "https://software-download.microsoft.com/download/sg/20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso",
"iso_checksum": "sha256:4f1457c4fe14ce48c9b2324924f33ca4f0470475e6da851b39ccbf98f44e7852"
}
}
5 changes: 5 additions & 0 deletions src/ws2022s/packer/builders/virtualbox-iso/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variables": {
"virtualbox_guest_os_type": "Windows2019_64"
}
}
6 changes: 6 additions & 0 deletions src/ws2022s/packer/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variables": {
"name": "ws2022s",
"description": "Windows Server 2022 Standard Desktop"
}
}
Loading

0 comments on commit dc12759

Please sign in to comment.