mirror of
https://github.com/dockur/windows.git
synced 2026-01-22 10:53:06 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ec6945b54 | ||
|
|
e58f21c33d | ||
|
|
5ab42e9409 | ||
|
|
b465f78646 | ||
|
|
64ddb6d774 | ||
|
|
454cd8db68 |
@@ -1,7 +1,7 @@
|
|||||||
ARG VERSION_ARG="latest"
|
ARG VERSION_ARG="latest"
|
||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu:6.20 / /
|
COPY --from=qemux/qemu:6.22 / /
|
||||||
|
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|||||||
341
assets/win2019-hv.xml
Normal file
341
assets/win2019-hv.xml
Normal file
@@ -0,0 +1,341 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>0409:00000409</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">
|
||||||
|
<DiskConfiguration>
|
||||||
|
<Disk wcm:action="add">
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<WillWipeDisk>true</WillWipeDisk>
|
||||||
|
<CreatePartitions>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Type>EFI</Type>
|
||||||
|
<Size>128</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Microsoft reserved partition (MSR) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Type>MSR</Type>
|
||||||
|
<Size>128</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Extend>true</Extend>
|
||||||
|
</CreatePartition>
|
||||||
|
</CreatePartitions>
|
||||||
|
<ModifyPartitions>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<PartitionID>1</PartitionID>
|
||||||
|
<Label>System</Label>
|
||||||
|
<Format>FAT32</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- MSR partition does not need to be modified -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<PartitionID>3</PartitionID>
|
||||||
|
<Label>Windows</Label>
|
||||||
|
<Letter>C</Letter>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
</ModifyPartitions>
|
||||||
|
</Disk>
|
||||||
|
</DiskConfiguration>
|
||||||
|
<ImageInstall>
|
||||||
|
<OSImage>
|
||||||
|
<InstallFrom>
|
||||||
|
<MetaData wcm:action="add">
|
||||||
|
<Key>/IMAGE/NAME</Key>
|
||||||
|
<Value>Hyper-V Server 2019 SERVERHYPERCORE</Value>
|
||||||
|
</MetaData>
|
||||||
|
</InstallFrom>
|
||||||
|
<InstallTo>
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<PartitionID>3</PartitionID>
|
||||||
|
</InstallTo>
|
||||||
|
<WillShowUI>OnError</WillShowUI>
|
||||||
|
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||||
|
</OSImage>
|
||||||
|
</ImageInstall>
|
||||||
|
<DynamicUpdate>
|
||||||
|
<Enable>true</Enable>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</DynamicUpdate>
|
||||||
|
<UpgradeData>
|
||||||
|
<Upgrade>false</Upgrade>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</UpgradeData>
|
||||||
|
<UserData>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
<FullName>Docker</FullName>
|
||||||
|
<Organization>Windows for Docker</Organization>
|
||||||
|
</UserData>
|
||||||
|
<EnableFirewall>false</EnableFirewall>
|
||||||
|
<Diagnostics>
|
||||||
|
<OptIn>false</OptIn>
|
||||||
|
</Diagnostics>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="offlineServicing">
|
||||||
|
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<EnableLUA>false</EnableLUA>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-PnPSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
<OEMInformation>
|
||||||
|
<Manufacturer>Dockur</Manufacturer>
|
||||||
|
<Model>Windows for Docker</Model>
|
||||||
|
<SupportHours>24/7</SupportHours>
|
||||||
|
<SupportPhone />
|
||||||
|
<SupportProvider>Dockur</SupportProvider>
|
||||||
|
<SupportURL>https://github.com/dockur/windows/issues</SupportURL>
|
||||||
|
</OEMInformation>
|
||||||
|
<OEMName>Windows for Docker</OEMName>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>https://google.com</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>https://google.com</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableSR>1</DisableSR>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UILanguageFallback>en-US</UILanguageFallback>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
|
<Description>Set Network Location to Home</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<fDenyTSConnections>false</fDenyTSConnections>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAuthentication>0</UserAuthentication>
|
||||||
|
</component>
|
||||||
|
<component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<FirewallGroups>
|
||||||
|
<FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
|
||||||
|
<Active>true</Active>
|
||||||
|
<Profile>all</Profile>
|
||||||
|
<Group>@FirewallAPI.dll,-28752</Group>
|
||||||
|
</FirewallGroup>
|
||||||
|
</FirewallGroups>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-SecureStartup-FilterDriver" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<PreventDeviceEncryption>true</PreventDeviceEncryption>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-EnhancedStorage-Adm" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<TCGSecurityActivationDisabled>1</TCGSecurityActivationDisabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>Docker</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>password</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>Docker</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>65432</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<Display>
|
||||||
|
<ColorDepth>32</ColorDepth>
|
||||||
|
<HorizontalResolution>1920</HorizontalResolution>
|
||||||
|
<VerticalResolution>1080</VerticalResolution>
|
||||||
|
</Display>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||||
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Home</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\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Allow guest access to network shares</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>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device" /v "DevicePasswordLessBuildVersion" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Enable option for passwordless sign-in</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<CommandLine>cmd /C wmic useraccount where name="Docker" set PasswordExpires=false</CommandLine>
|
||||||
|
<Description>Password Never Expires</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>5</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -H OFF</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>6</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -X -monitor-timeout-ac 0</CommandLine>
|
||||||
|
<Description>Disable monitor blanking</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>7</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>8</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>9</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>10</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>11</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -X -standby-timeout-ac 0</CommandLine>
|
||||||
|
<Description>Disable Sleep</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>12</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "fAllowUnlistedRemotePrograms" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Enable RemoteAPP to launch unlisted programs</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>13</Order>
|
||||||
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Remove Search from the Taskbar</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>14</Order>
|
||||||
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTaskViewButton" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Remove Task View from the Taskbar</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>15</Order>
|
||||||
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarDa" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Remove Widgets from the Taskbar</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>16</Order>
|
||||||
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Remove Chat from the Taskbar</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoUpdate" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Turn off Windows Update auto download</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>18</Order>
|
||||||
|
<CommandLine>netsh advfirewall firewall set rule group="@FirewallAPI.dll,-32752" new enable=Yes</CommandLine>
|
||||||
|
<Description>Enable Network Discovery</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>19</Order>
|
||||||
|
<CommandLine>netsh advfirewall firewall set rule group="@FirewallAPI.dll,-28502" new enable=Yes</CommandLine>
|
||||||
|
<Description>Enable File Sharing</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>20</Order>
|
||||||
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
</unattend>
|
||||||
@@ -13,5 +13,7 @@ services:
|
|||||||
- 8006:8006
|
- 8006:8006
|
||||||
- 3389:3389/tcp
|
- 3389:3389/tcp
|
||||||
- 3389:3389/udp
|
- 3389:3389/udp
|
||||||
|
volumes:
|
||||||
|
- ./windows:/storage
|
||||||
restart: always
|
restart: always
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
|
|||||||
@@ -32,10 +32,6 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: VERSION
|
- name: VERSION
|
||||||
value: "11"
|
value: "11"
|
||||||
- name: RAM_SIZE
|
|
||||||
value: "4G"
|
|
||||||
- name: CPU_CORES
|
|
||||||
value: "2"
|
|
||||||
- name: DISK_SIZE
|
- name: DISK_SIZE
|
||||||
value: "64G"
|
value: "64G"
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
122
readme.md
122
readme.md
@@ -44,6 +44,8 @@ services:
|
|||||||
- 8006:8006
|
- 8006:8006
|
||||||
- 3389:3389/tcp
|
- 3389:3389/tcp
|
||||||
- 3389:3389/udp
|
- 3389:3389/udp
|
||||||
|
volumes:
|
||||||
|
- ./windows:/storage
|
||||||
restart: always
|
restart: always
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
```
|
```
|
||||||
@@ -51,7 +53,7 @@ services:
|
|||||||
Via Docker CLI:
|
Via Docker CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
|
docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/windows:/storage --stop-timeout 120 dockurr/windows
|
||||||
```
|
```
|
||||||
|
|
||||||
Via Kubernetes:
|
Via Kubernetes:
|
||||||
@@ -127,10 +129,10 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /var/win:/storage
|
- ./windows:/storage
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace the example path `/var/win` with the desired storage folder.
|
Replace the example path `./windows` with the desired storage folder or named volume.
|
||||||
|
|
||||||
### How do I change the size of the disk?
|
### How do I change the size of the disk?
|
||||||
|
|
||||||
@@ -152,56 +154,14 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /home/user/example:/data
|
- ./example:/data
|
||||||
```
|
```
|
||||||
|
|
||||||
The example folder `/home/user/example` will be available as ` \\host.lan\Data`.
|
The example folder `./example` will be available as ` \\host.lan\Data`.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> You can map this path to a drive letter in Windows, for easier access.
|
> You can map this path to a drive letter in Windows, for easier access.
|
||||||
|
|
||||||
### How do I install a custom image?
|
|
||||||
|
|
||||||
In order to download an unsupported ISO image, specify its URL in the `VERSION` environment variable:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
environment:
|
|
||||||
VERSION: "https://example.com/win.iso"
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, you can also skip the download and use a local file instead, by binding it in your compose file in this way:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
volumes:
|
|
||||||
- /home/user/example.iso:/custom.iso
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace the example path `/home/user/example.iso` with the filename of your desired ISO file. The value of `VERSION` will be ignored in this case.
|
|
||||||
|
|
||||||
### How do I run a script after installation?
|
|
||||||
|
|
||||||
To run your own script after installation, you can create a file called `install.bat` and place it in a folder together with any additional files it needs (software to be installed for example).
|
|
||||||
|
|
||||||
Then bind that folder in your compose file like this:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
volumes:
|
|
||||||
- /home/user/example:/oem
|
|
||||||
```
|
|
||||||
|
|
||||||
The example folder `/home/user/example` will be copied to `C:\OEM` and the containing `install.bat` will be executed during the last step of the automatic installation.
|
|
||||||
|
|
||||||
### How do I perform a manual installation?
|
|
||||||
|
|
||||||
It's best to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment.
|
|
||||||
|
|
||||||
However, if you insist on performing the installation manually, add the following environment variable to your compose file:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
environment:
|
|
||||||
MANUAL: "Y"
|
|
||||||
```
|
|
||||||
|
|
||||||
### How do I change the amount of CPU or RAM?
|
### How do I change the amount of CPU or RAM?
|
||||||
|
|
||||||
By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.
|
By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.
|
||||||
@@ -218,7 +178,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
By default, a user called `Docker` (with an empty password) is created during installation.
|
By default, a user called `Docker` (with an empty password) is created during installation.
|
||||||
|
|
||||||
If you want to use different credentials, you can configure them (only BEFORE installation) in your compose file:
|
If you want to use different credentials, you can configure them in your compose file (only before installation):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -241,7 +201,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I select the keyboard layout?
|
### How do I select the keyboard layout?
|
||||||
|
|
||||||
If you want to use a keyboard layout or locale that is not the default for your selected language, before installation you can add `KEYBOARD` and `REGION` variables like this:
|
If you want to use a keyboard layout or locale that is not the default for your selected language, you can add `KEYBOARD` and `REGION` variables like this (before installation):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -249,6 +209,66 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
KEYBOARD: "en-US"
|
KEYBOARD: "en-US"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How do I set the product key?
|
||||||
|
|
||||||
|
By default, an evaluation version of Windows will be installed, but if you have a product key you can add a `KEY` variable like this (before installation):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
KEY: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
|
||||||
|
```
|
||||||
|
|
||||||
|
### How do I select the edition?
|
||||||
|
|
||||||
|
Windows Server offers a minimalistic Core edition without a GUI. To select those non-standard editions, you can add a `EDITION` variable like this (before installation):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
EDITION: "core"
|
||||||
|
```
|
||||||
|
|
||||||
|
### How do I install a custom image?
|
||||||
|
|
||||||
|
In order to download an unsupported ISO image, specify its URL in the `VERSION` environment variable:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
VERSION: "https://example.com/win.iso"
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can also skip the download and use a local file instead, by binding it in your compose file in this way:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- ./example.iso:/custom.iso
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace the example path `./example.iso` with the filename of your desired ISO file. The value of `VERSION` will be ignored in this case.
|
||||||
|
|
||||||
|
### How do I run a script after installation?
|
||||||
|
|
||||||
|
To run your own script after installation, you can create a file called `install.bat` and place it in a folder together with any additional files it needs (software to be installed for example).
|
||||||
|
|
||||||
|
Then bind that folder in your compose file like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- ./example:/oem
|
||||||
|
```
|
||||||
|
|
||||||
|
The example folder `./example` will be copied to `C:\OEM` and the containing `install.bat` will be executed during the last step of the automatic installation.
|
||||||
|
|
||||||
|
### How do I perform a manual installation?
|
||||||
|
|
||||||
|
It's recommended to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment.
|
||||||
|
|
||||||
|
However, if you insist on performing the installation manually on your own risk, add the following environment variable to your compose file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
MANUAL: "Y"
|
||||||
|
```
|
||||||
|
|
||||||
### How do I connect using RDP?
|
### How do I connect using RDP?
|
||||||
|
|
||||||
The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.
|
The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.
|
||||||
@@ -318,8 +338,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
DISK2_SIZE: "32G"
|
DISK2_SIZE: "32G"
|
||||||
DISK3_SIZE: "64G"
|
DISK3_SIZE: "64G"
|
||||||
volumes:
|
volumes:
|
||||||
- /home/example:/storage2
|
- ./example2:/storage2
|
||||||
- /mnt/data/example:/storage3
|
- ./example3:/storage3
|
||||||
```
|
```
|
||||||
|
|
||||||
### How do I pass-through a disk?
|
### How do I pass-through a disk?
|
||||||
|
|||||||
111
src/define.sh
111
src/define.sh
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
: "${KEY:=""}"
|
||||||
: "${WIDTH:=""}"
|
: "${WIDTH:=""}"
|
||||||
: "${HEIGHT:=""}"
|
: "${HEIGHT:=""}"
|
||||||
: "${VERIFY:=""}"
|
: "${VERIFY:=""}"
|
||||||
@@ -101,6 +102,9 @@ parseVersion() {
|
|||||||
"16" | "2016" | "win16" | "win2016" | "windows2016" | "windows 2016" )
|
"16" | "2016" | "win16" | "win2016" | "windows2016" | "windows 2016" )
|
||||||
VERSION="win2016-eval"
|
VERSION="win2016-eval"
|
||||||
;;
|
;;
|
||||||
|
"hv" | "hyperv" | "hyper v" | "hyper-v" | "19hv" | "2019hv" | "win2019hv")
|
||||||
|
VERSION="win2019-hv"
|
||||||
|
;;
|
||||||
"2012" | "2012r2" | "win2012" | "win2012r2" | "windows2012" | "windows 2012" )
|
"2012" | "2012r2" | "win2012" | "win2012r2" | "windows2012" | "windows 2012" )
|
||||||
VERSION="win2012r2-eval"
|
VERSION="win2012r2-eval"
|
||||||
;;
|
;;
|
||||||
@@ -417,6 +421,7 @@ printVersion() {
|
|||||||
"win95"* ) desc="Windows 95" ;;
|
"win95"* ) desc="Windows 95" ;;
|
||||||
"win2k"* ) desc="Windows 2000" ;;
|
"win2k"* ) desc="Windows 2000" ;;
|
||||||
"winvista"* ) desc="Windows Vista" ;;
|
"winvista"* ) desc="Windows Vista" ;;
|
||||||
|
"win2019-hv"* ) desc="Hyper-V Server" ;;
|
||||||
"win2003"* ) desc="Windows Server 2003" ;;
|
"win2003"* ) desc="Windows Server 2003" ;;
|
||||||
"win2008"* ) desc="Windows Server 2008" ;;
|
"win2008"* ) desc="Windows Server 2008" ;;
|
||||||
"win2012"* ) desc="Windows Server 2012" ;;
|
"win2012"* ) desc="Windows Server 2012" ;;
|
||||||
@@ -461,6 +466,9 @@ printEdition() {
|
|||||||
*"-education" )
|
*"-education" )
|
||||||
edition="Education"
|
edition="Education"
|
||||||
;;
|
;;
|
||||||
|
*"-hv" )
|
||||||
|
edition="2019"
|
||||||
|
;;
|
||||||
*"-iot" | *"-iot-eval" )
|
*"-iot" | *"-iot-eval" )
|
||||||
edition="LTSC"
|
edition="LTSC"
|
||||||
;;
|
;;
|
||||||
@@ -482,11 +490,12 @@ printEdition() {
|
|||||||
"winvista"* )
|
"winvista"* )
|
||||||
edition="Business"
|
edition="Business"
|
||||||
;;
|
;;
|
||||||
"win2025"* | "win2022"* | "win2019"* | "win2016"* )
|
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
|
||||||
edition="Standard"
|
case "${EDITION^^}" in
|
||||||
;;
|
*"DATACENTER"* ) edition="Datacenter" ;;
|
||||||
"win2012"* | "win2008"* | "win2003"* )
|
"CORE" | "STANDARDCORE" ) edition="Core" ;;
|
||||||
edition="Standard"
|
* ) edition="Standard" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -549,6 +558,9 @@ fromFile() {
|
|||||||
"tiny10"* | "tiny_10"* )
|
"tiny10"* | "tiny_10"* )
|
||||||
id="tiny10"
|
id="tiny10"
|
||||||
;;
|
;;
|
||||||
|
*"_serverhypercore_"* )
|
||||||
|
id="win2019${add}-hv"
|
||||||
|
;;
|
||||||
*"server2025"* | *"server_2025"* )
|
*"server2025"* | *"server_2025"* )
|
||||||
id="win2025${add}"
|
id="win2025${add}"
|
||||||
;;
|
;;
|
||||||
@@ -604,6 +616,7 @@ fromName() {
|
|||||||
*"server 2012"* ) id="win2012r2${add}" ;;
|
*"server 2012"* ) id="win2012r2${add}" ;;
|
||||||
*"server 2008"* ) id="win2008r2${add}" ;;
|
*"server 2008"* ) id="win2008r2${add}" ;;
|
||||||
*"server 2003"* ) id="win2003r2${add}" ;;
|
*"server 2003"* ) id="win2003r2${add}" ;;
|
||||||
|
*"hyper-v server"* ) id="win2019${add}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$id"
|
echo "$id"
|
||||||
@@ -647,6 +660,7 @@ getVersion() {
|
|||||||
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
|
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
|
||||||
case "${name,,}" in
|
case "${name,,}" in
|
||||||
*" evaluation"* ) id="$id-eval" ;;
|
*" evaluation"* ) id="$id-eval" ;;
|
||||||
|
*"hyper-v server"* ) id="$id-hv" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -748,6 +762,11 @@ getMido() {
|
|||||||
sum="6dae072e7f78f4ccab74a45341de0d6e2d45c39be25f1f5920a2ab4f51d7bcbb"
|
sum="6dae072e7f78f4ccab74a45341de0d6e2d45c39be25f1f5920a2ab4f51d7bcbb"
|
||||||
url="https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
|
url="https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
|
||||||
;;
|
;;
|
||||||
|
"win2019-hv" )
|
||||||
|
size=3072712704
|
||||||
|
sum="48e9b944518e5bbc80876a9a7ff99716f386f404f4be48dca47e16a66ae7872c"
|
||||||
|
url="https://software-download.microsoft.com/download/pr/17763.557.190612-0019.rs5_release_svc_refresh_SERVERHYPERCORE_OEM_x64FRE_en-us.ISO"
|
||||||
|
;;
|
||||||
"win2016-eval" )
|
"win2016-eval" )
|
||||||
size=6972221440
|
size=6972221440
|
||||||
sum="1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f"
|
sum="1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f"
|
||||||
@@ -1175,9 +1194,7 @@ prepareInstall() {
|
|||||||
|
|
||||||
local dir="$2"
|
local dir="$2"
|
||||||
local desc="$3"
|
local desc="$3"
|
||||||
local arch="$4"
|
local driver="$4"
|
||||||
local key="$5"
|
|
||||||
local driver="$6"
|
|
||||||
local drivers="/tmp/drivers"
|
local drivers="/tmp/drivers"
|
||||||
|
|
||||||
rm -rf "$drivers"
|
rm -rf "$drivers"
|
||||||
@@ -1196,7 +1213,8 @@ prepareInstall() {
|
|||||||
error "Failed to extract drivers!" && return 1
|
error "Failed to extract drivers!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local target
|
local arch target
|
||||||
|
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
||||||
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
|
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
|
||||||
|
|
||||||
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
|
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
|
||||||
@@ -1282,6 +1300,25 @@ prepareInstall() {
|
|||||||
[ -n "$PASSWORD" ] && password="$PASSWORD"
|
[ -n "$PASSWORD" ] && password="$PASSWORD"
|
||||||
[ -n "$USERNAME" ] && username=$(echo "$USERNAME" | sed 's/[^[:alnum:]@!._-]//g')
|
[ -n "$USERNAME" ] && username=$(echo "$USERNAME" | sed 's/[^[:alnum:]@!._-]//g')
|
||||||
|
|
||||||
|
# These are not pirated keys, they come from the official MS documentation.
|
||||||
|
if [[ "${driver,,}" == "xp" ]]; then
|
||||||
|
if [[ "${arch,,}" == "x86" ]]; then
|
||||||
|
# Windows XP Professional x86 generic key (no activation, trial-only)
|
||||||
|
[ -z "$KEY" ] && KEY="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
||||||
|
else
|
||||||
|
# Windows XP Professional x64 generic key (no activation, trial-only)
|
||||||
|
[ -z "$KEY" ] && KEY="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "${arch,,}" == "x86" ]]; then
|
||||||
|
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
|
||||||
|
[ -z "$KEY" ] && KEY="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
|
||||||
|
else
|
||||||
|
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
|
||||||
|
[ -z "$KEY" ] && KEY="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
|
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
|
||||||
|
|
||||||
{ echo "[Data]"
|
{ echo "[Data]"
|
||||||
@@ -1319,7 +1356,7 @@ prepareInstall() {
|
|||||||
echo " FullName=\"$username\""
|
echo " FullName=\"$username\""
|
||||||
echo " ComputerName=\"*\""
|
echo " ComputerName=\"*\""
|
||||||
echo " OrgName=\"Windows for Docker\""
|
echo " OrgName=\"Windows for Docker\""
|
||||||
echo " ProductKey=$key"
|
echo " ProductKey=$KEY"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[Identification]"
|
echo "[Identification]"
|
||||||
echo " JoinWorkgroup = WORKGROUP"
|
echo " JoinWorkgroup = WORKGROUP"
|
||||||
@@ -1465,56 +1502,6 @@ prepareInstall() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare2k3() {
|
|
||||||
|
|
||||||
local iso="$1"
|
|
||||||
local dir="$2"
|
|
||||||
local desc="$3"
|
|
||||||
local driver="2k3"
|
|
||||||
local arch key
|
|
||||||
|
|
||||||
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
|
||||||
|
|
||||||
if [[ "${arch,,}" == "x86" ]]; then
|
|
||||||
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
|
|
||||||
# This is not a pirated key, it comes from the official MS documentation.
|
|
||||||
key="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
|
|
||||||
else
|
|
||||||
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
|
|
||||||
# This is not a pirated key, it comes from the official MS documentation.
|
|
||||||
key="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
|
|
||||||
fi
|
|
||||||
|
|
||||||
prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
prepareXP() {
|
|
||||||
|
|
||||||
local iso="$1"
|
|
||||||
local dir="$2"
|
|
||||||
local desc="$3"
|
|
||||||
local driver="xp"
|
|
||||||
local arch key
|
|
||||||
|
|
||||||
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
|
||||||
|
|
||||||
if [[ "${arch,,}" == "x86" ]]; then
|
|
||||||
# Windows XP Professional x86 generic key (no activation, trial-only)
|
|
||||||
# This is not a pirated key, it comes from the official MS documentation.
|
|
||||||
key="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
|
||||||
else
|
|
||||||
# Windows XP Professional x64 generic key (no activation, trial-only)
|
|
||||||
# This is not a pirated key, it comes from the official MS documentation.
|
|
||||||
key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
|
||||||
fi
|
|
||||||
|
|
||||||
prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
prepareLegacy() {
|
prepareLegacy() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
@@ -1601,11 +1588,11 @@ setMachine() {
|
|||||||
"win2k"* )
|
"win2k"* )
|
||||||
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
||||||
"winxp"* )
|
"winxp"* )
|
||||||
if ! prepareXP "$iso" "$dir" "$desc"; then
|
if ! prepareInstall "$iso" "$dir" "$desc" "xp"; then
|
||||||
error "Failed to prepare $desc ISO!" && return 1
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
fi ;;
|
fi ;;
|
||||||
"win2003"* )
|
"win2003"* )
|
||||||
if ! prepare2k3 "$iso" "$dir" "$desc"; then
|
if ! prepareInstall "$iso" "$dir" "$desc" "2k3"; then
|
||||||
error "Failed to prepare $desc ISO!" && return 1
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
fi ;;
|
fi ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -681,6 +681,11 @@ updateXML() {
|
|||||||
sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset"
|
sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$KEY" ]; then
|
||||||
|
sed -i '/<ProductKey>/,/<\/ProductKey>/d' "$asset"
|
||||||
|
sed -i "s/<\/UserData>/ <ProductKey>\n <Key>${KEY}<\/Key>\n <WillShowUI>OnError<\/WillShowUI>\n <\/ProductKey>\n <\/UserData>/g" "$asset"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,9 @@ download_windows_eval() {
|
|||||||
"win2022-eval" )
|
"win2022-eval" )
|
||||||
enterprise_type="server"
|
enterprise_type="server"
|
||||||
windows_version="windows-server-2022" ;;
|
windows_version="windows-server-2022" ;;
|
||||||
|
"win2019-hv" )
|
||||||
|
enterprise_type="server"
|
||||||
|
windows_version="hyper-v-server-2019" ;;
|
||||||
"win2019-eval" )
|
"win2019-eval" )
|
||||||
enterprise_type="server"
|
enterprise_type="server"
|
||||||
windows_version="windows-server-2019" ;;
|
windows_version="windows-server-2019" ;;
|
||||||
@@ -335,7 +338,7 @@ getWindows() {
|
|||||||
"win11${PLATFORM,,}-enterprise"* | "win10${PLATFORM,,}-enterprise"* )
|
"win11${PLATFORM,,}-enterprise"* | "win10${PLATFORM,,}-enterprise"* )
|
||||||
download_windows_eval "$version" "$lang" "$edition" && return 0
|
download_windows_eval "$version" "$lang" "$edition" && return 0
|
||||||
;;
|
;;
|
||||||
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2016-eval" | "win2012r2-eval" )
|
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2019-hv" | "win2016-eval" | "win2012r2-eval" )
|
||||||
download_windows_eval "$version" "$lang" "$edition" && return 0
|
download_windows_eval "$version" "$lang" "$edition" && return 0
|
||||||
;;
|
;;
|
||||||
"win7${PLATFORM,,}"* | "win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
"win7${PLATFORM,,}"* | "win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
||||||
|
|||||||
Reference in New Issue
Block a user