From c66cc5cf651fa6d26a727896da98ad28d938f9a2 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 29 Jan 2024 08:35:27 +0100 Subject: [PATCH] feat: Add Windows Server 2012 support (#128) --- assets/win2012r2-eval.xml | 327 ++++++++++++++++++++++++++++++++++++++ readme.md | 7 +- src/install.sh | 8 +- 3 files changed, 337 insertions(+), 5 deletions(-) create mode 100644 assets/win2012r2-eval.xml diff --git a/assets/win2012r2-eval.xml b/assets/win2012r2-eval.xml new file mode 100644 index 0000000..2f87332 --- /dev/null +++ b/assets/win2012r2-eval.xml @@ -0,0 +1,327 @@ + + + + + + en-US + + 0409:00000409 + en-US + en-US + en-US + en-US + + + + + 0 + true + + + + 1 + EFI + 128 + + + + 2 + MSR + 128 + + + + 3 + Primary + true + + + + + + 1 + 1 + + FAT32 + + + + 2 + 2 + + + + 3 + 3 + + C + NTFS + + + + + + + + + /image/index + 2 + + + + 0 + 3 + + OnError + false + + + + true + Never + + + false + Never + + + true + Docker + Windows for Docker + + + false + + false + + + + + + D:\viostor\2k16\amd64 + + + D:\NetKVM\2k16\amd64 + + + D:\Balloon\2k16\amd64 + + + D:\pvpanic\2k16\amd64 + + + D:\qemupciserial\2k16\amd64 + + + D:\qxldod\2k16\amd64 + + + D:\vioinput\2k16\amd64 + + + D:\viorng\2k16\amd64 + + + D:\vioscsi\2k16\amd64 + + + D:\vioserial\2k16\amd64 + + + D:\viogpudo\2k16\amd64 + + + D:\sriov\2k16\amd64 + + + D:\viofs\2k16\amd64 + + + + + + + false + + + + + true + + + 1 + + + + + true + + + * + + Dockur + Windows for Docker + + Windows for Docker + + + 1 + + + true + true + https://google.com + about:blank + + + true + true + https://google.com + about:blank + + + 0 + + + 1 + + + 0409:00000409 + en-US + en-US + en-US + en-US + + + true + + + true + + + false + + + 0 + + + + + true + Remote Desktop + all + + + + + + + true + + + 1 + + + + + + Docker + Administrators + + + true</PlainText> + </Password> + </LocalAccount> + </LocalAccounts> + <AdministratorPassword> + <Value>password</Value> + <PlainText>true</PlainText> + </AdministratorPassword> + </UserAccounts> + <AutoLogon> + <Username>Docker</Username> + <Enabled>true</Enabled> + <LogonCount>1</LogonCount> + <Password> + <Value /> + <PlainText>true</PlainText> + </Password> + </AutoLogon> + <OOBE> + <HideEULAPage>true</HideEULAPage> + <HideLocalAccountScreen>true</HideLocalAccountScreen> + <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> + <HideOnlineAccountScreens>true</HideOnlineAccountScreens> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <NetworkLocation>Other</NetworkLocation> + <ProtectYourPC>3</ProtectYourPC> + <SkipUserOOBE>true</SkipUserOOBE> + <SkipMachineOOBE>true</SkipMachineOOBE> + </OOBE> + <RegisteredOrganization>Dockur</RegisteredOrganization> + <RegisteredOwner>Windows for Docker</RegisteredOwner> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <Order>1</Order> + <CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine> + <Description>Set AutoLogonCount to 0</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>2</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LimitBlankPasswordUse /t REG_DWORD /d 0 /f</CommandLine> + <Description>Allow RDP login with blank password</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>3</Order> + <CommandLine>cmd /C wmic useraccount where name="Docker" set PasswordExpires=false</CommandLine> + <Description>Password Never Expires</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>4</Order> + <CommandLine>cmd /C POWERCFG -H OFF</CommandLine> + <Description>Disable Hibernation</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>5</Order> + <CommandLine>cmd /C POWERCFG -X -monitor-timeout-ac 0</CommandLine> + <Description>Disable monitor blanking</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>6</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f</CommandLine> + <Description>Disable Network Discovery popup</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>7</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard" /v "HideWizard" /t REG_DWORD /d 1 /f</CommandLine> + <Description>Disable Network Discovery popup</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>8</Order> + <CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine> + <Description>Disable first-run experience in Edge</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>9</Order> + <CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine> + <Description>Show file extensions in Explorer</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>10</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine> + <Description>Zero Hibernation File</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>11</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine> + <Description>Disable Hibernation Mode</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>12</Order> + <CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine> + <Description>Install VirtIO drivers</Description> + </SynchronousCommand> + </FirstLogonCommands> + </component> + </settings> +</unattend> diff --git a/readme.md b/readme.md index ea5b388..f0f5e06 100644 --- a/readme.md +++ b/readme.md @@ -80,9 +80,10 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti | `win81` | Windows 8.1 Pro | Microsoft | Fast | 4.2 GB | | `win7` | Windows 7 SP1 | Bob Pony | Medium | 3.0 GB | |||||| - | `win22` | Windows Server 2022 | Microsoft | Fast | 4.7 GB | - | `win19` | Windows Server 2019 | Microsoft | Fast | 5.3 GB | - | `win16` | Windows Server 2016 | Microsoft | Fast | 6.5 GB | + | `2022` | Windows Server 2022 | Microsoft | Fast | 4.7 GB | + | `2019` | Windows Server 2019 | Microsoft | Fast | 5.3 GB | + | `2016` | Windows Server 2016 | Microsoft | Fast | 6.5 GB | + | `2012` | Windows Server 2012 | Microsoft | Fast | 4.3 GB | |||||| | `core11` | Tiny 11 Core | Archive.org | Slow | 2.1 GB | | `tiny11` | Tiny 11 | Archive.org | Slow | 3.8 GB | diff --git a/src/install.sh b/src/install.sh index 4fb9402..d9d8a0a 100644 --- a/src/install.sh +++ b/src/install.sh @@ -39,6 +39,10 @@ fi [[ "${VERSION,,}" == "win16" ]] && VERSION="win2016-eval" [[ "${VERSION,,}" == "win2016" ]] && VERSION="win2016-eval" +[[ "${VERSION,,}" == "2012" ]] && VERSION="win2012r2-eval" +[[ "${VERSION,,}" == "w12r2" ]] && VERSION="win2012r2-eval" +[[ "${VERSION,,}" == "win2012" ]] && VERSION="win2012r2-eval" + [[ "${VERSION,,}" == "ltsc10" ]] && VERSION="win10x64-enterprise-ltsc-eval" [[ "${VERSION,,}" == "10ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval" [[ "${VERSION,,}" == "win10-ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval" @@ -161,8 +165,8 @@ getVersion() { [[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval" [[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval" [[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval" - [[ "${name,,}" == *"server 2012"* ]] && detected="win2012-eval" - [[ "${name,,}" == *"server 2008"* ]] && detected="win2008-eval" + [[ "${name,,}" == *"server 2012"* ]] && detected="win2012r2-eval" + [[ "${name,,}" == *"server 2008"* ]] && detected="win2008r2" if [[ "${name,,}" == *"windows 10"* ]]; then if [[ "${name,,}" == *"ltsc"* ]]; then