Skip to content

Commit

Permalink
Add Windows Server, Version 1909
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanScherer committed Dec 14, 2019
1 parent 1e08ecc commit 62c50a3
Show file tree
Hide file tree
Showing 12 changed files with 578 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following Windows versions are known to work (built with VMware Fusion Pro
* Windows Server Core
* Windows Server 2016 without and with Docker -> Vagrant Cloud box [StefanScherer/windows_2016_docker](https://app.vagrantup.com/StefanScherer/boxes/windows_2016_docker)
* Windows Server 2019 without and with Docker -> Vagrant Cloud box [StefanScherer/windows_2019_docker](https://app.vagrantup.com/StefanScherer/boxes/windows_2019_docker)
* Windows Server 1709, 1803, 1809, and 1903 all without and with Docker
* Windows Server 1709, 1803, 1809, 1903, and 1909 all without and with Docker
* Windows Server InsiderPreview Semi-Annual without and with Docker

You may find other packer template files, but older versions of Windows doesn't
Expand Down Expand Up @@ -198,4 +198,4 @@ vagrant up --provider hyperv

### Contributing

Pull requests welcomed, but normally should go to Joe's repo.
Pull request are welcome!
227 changes: 227 additions & 0 deletions answer_files/server_1909/Autounattend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<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 xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Type>Primary</Type>
<Order>1</Order>
<Size>350</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>boot</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>Windows 1909</Label>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/INDEX</Key>
<Value>2</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<!-- enter product key -->
<Key></Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Vagrant</FullName>
<Organization>Vagrant</Organization>
</UserData>
</component>
</settings>
<settings pass="specialize">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<OEMInformation>
<HelpCustomized>false</HelpCustomized>
</OEMInformation>
<ComputerName>vagrant-1909</ComputerName>
<TimeZone>Pacific Standard Time</TimeZone>
<RegisteredOwner/>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<IEHardenAdmin>false</IEHardenAdmin>
<IEHardenUser>false</IEHardenUser>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
</settings>
<settings pass="oobeSystem">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<AutoLogon>
<Password>
<Value>vagrant</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>vagrant</Username>
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
<Description>Set Execution Policy 64 Bit</Description>
<Order>1</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
<Description>Set Execution Policy 32 Bit</Description>
<Order>2</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-winrm.ps1</CommandLine>
<Description>Disable WinRM</Description>
<Order>3</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
<Order>4</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
<Order>5</Order>
<Description>Enable QuickEdit mode</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
<Order>6</Order>
<Description>Show Run command in Start Menu</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
<Order>7</Order>
<Description>Show Administrative Tools in Start Menu</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
<Order>8</Order>
<Description>Zero Hibernation File</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
<Order>9</Order>
<Description>Disable Hibernation Mode</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE</CommandLine>
<Order>10</Order>
<Description>Disable password expiration for vagrant user</Description>
</SynchronousCommand>
<!-- WITHOUT WINDOWS UPDATES -->
<!--
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
<Description>Enable WinRM</Description>
<Order>99</Order>
</SynchronousCommand>
-->
<!-- END WITHOUT WINDOWS UPDATES -->
<!-- WITH WINDOWS UPDATES -->
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c a:\microsoft-updates.bat</CommandLine>
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-screensaver.ps1</CommandLine>
<Description>Disable Screensaver</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1</CommandLine>
<Description>Install Windows Updates</Description>
<Order>100</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<!-- END WITH WINDOWS UPDATES -->
</FirstLogonCommands>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>vagrant</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>vagrant</Value>
<PlainText>true</PlainText>
</Password>
<Group>administrators</Group>
<DisplayName>Vagrant</DisplayName>
<Name>vagrant</Name>
<Description>Vagrant User</Description>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOwner/>
</component>
</settings>
<settings pass="offlineServicing">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/wim/install.wim#Windows Server 2016 SERVERSTANDARD"/>
</unattend>
2 changes: 1 addition & 1 deletion build_windows_server_1903_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
packer build \
--only=vmware-iso \
--var vhv_enable=true \
--var iso_url=~/packer_cache/msdn/en_windows_server_version_1903_x64_dvd_58ddff4b.iso \
--var iso_url=~/packer_cache/msdn/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso \
--var autounattend=./tmp/1903/Autounattend.xml \
windows_server_1903_docker.json
8 changes: 8 additions & 0 deletions build_windows_server_1909_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# MSDN 1909 ISO
packer build \
--only=vmware-iso \
--var vhv_enable=true \
--var iso_url=~/packer_cache/msdn/en_windows_server_version_1909_x64_dvd_894c6446.iso \
windows_server_1909_docker.json
# --var autounattend=./tmp/1909/Autounattend.xml \
2 changes: 1 addition & 1 deletion windows_server_1809.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"keep_input_artifact": false,
"output": "windows_server_1809_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
"vagrantfile_template": "vagrantfile-windows_2019_core.template"
}
],
"provisioners": [
Expand Down
2 changes: 1 addition & 1 deletion windows_server_1809_docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"keep_input_artifact": false,
"output": "windows_server_1809_docker_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
"vagrantfile_template": "vagrantfile-windows_2019_core.template"
}
],
"provisioners": [
Expand Down
8 changes: 4 additions & 4 deletions windows_server_1903.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"keep_input_artifact": false,
"output": "windows_server_1903_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
"vagrantfile_template": "vagrantfile-windows_2019_core.template"
}
],
"provisioners": [
Expand Down Expand Up @@ -138,10 +138,10 @@
"disk_size": "61440",
"disk_type_id": "1",
"headless": "false",
"iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be",
"iso_checksum": "F00082EF6BA6FD7A5E99EF9C01958ABD9D6702D7AAD34262E109989E5D9D0027",
"iso_checksum_type": "sha256",
"iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_x64_dvd_58ddff4b.iso",
"manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201903",
"iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso",
"manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=windows%20server%201903&pgroup=",
"restart_timeout": "5m",
"vhv_enable": "false",
"winrm_timeout": "2h"
Expand Down
8 changes: 4 additions & 4 deletions windows_server_1903_docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"keep_input_artifact": false,
"output": "windows_server_1903_docker_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
"vagrantfile_template": "vagrantfile-windows_2019_core.template"
}
],
"provisioners": [
Expand Down Expand Up @@ -166,10 +166,10 @@
"docker_provider": "ee",
"docker_version": "19.03.5",
"headless": "false",
"iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be",
"iso_checksum": "F00082EF6BA6FD7A5E99EF9C01958ABD9D6702D7AAD34262E109989E5D9D0027",
"iso_checksum_type": "sha256",
"iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_x64_dvd_58ddff4b.iso",
"manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201903",
"iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso",
"manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=windows%20server%201903&pgroup=",
"restart_timeout": "5m",
"vhv_enable": "true",
"winrm_timeout": "2h"
Expand Down
Loading

0 comments on commit 62c50a3

Please sign in to comment.