mirror of
https://github.com/dockur/windows.git
synced 2026-01-13 14:35:27 +00:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77a8e4d26e | ||
|
|
9fd266a09d | ||
|
|
d570eca629 | ||
|
|
7b31f538ba | ||
|
|
6bf854fc12 | ||
|
|
6f604dca8e | ||
|
|
663a6b5da0 | ||
|
|
839900f495 | ||
|
|
e2be4f6d0c | ||
|
|
5d734616aa | ||
|
|
972240061e | ||
|
|
0c8943f541 | ||
|
|
b7ad0d3d88 | ||
|
|
522d646fa3 | ||
|
|
e5e71f67fa | ||
|
|
a3a2b3fb09 | ||
|
|
f454fa7b34 | ||
|
|
461be96ecd | ||
|
|
c31c530f2b | ||
|
|
a995ecc174 | ||
|
|
d3358f7345 | ||
|
|
c9abc7551a | ||
|
|
156eaaa2da | ||
|
|
9ffc4647aa | ||
|
|
5501437caa | ||
|
|
777af02ed4 | ||
|
|
8ec6945b54 | ||
|
|
e58f21c33d | ||
|
|
5ab42e9409 | ||
|
|
b465f78646 | ||
|
|
64ddb6d774 | ||
|
|
454cd8db68 | ||
|
|
5fac3fa33e | ||
|
|
186b2e21ce | ||
|
|
b8105e9072 | ||
|
|
9cad3f0994 | ||
|
|
f7a086a8d4 | ||
|
|
57ab7eb84f | ||
|
|
8be35e16d7 | ||
|
|
3cf95f2a0e | ||
|
|
22d318a9b4 | ||
|
|
974d087466 | ||
|
|
d5b891f4fb | ||
|
|
2296e3dbfa | ||
|
|
e16af78828 | ||
|
|
5ae6ecbe85 | ||
|
|
c9482fe3f0 | ||
|
|
63a9d10a27 | ||
|
|
009c2c7deb | ||
|
|
06434c02f4 | ||
|
|
32b92cc03a | ||
|
|
d799079040 | ||
|
|
b57d34e11e | ||
|
|
61d7e0d3be | ||
|
|
e6d7495bac | ||
|
|
faa7c58366 | ||
|
|
c0f5cca574 | ||
|
|
d86731dc24 | ||
|
|
bca8cb6817 | ||
|
|
d9c7983bb5 | ||
|
|
28f6e9c76b | ||
|
|
1081855571 | ||
|
|
57193b0f59 | ||
|
|
6825b6a45a | ||
|
|
c82725ec61 |
6
.devcontainer.json
Normal file
6
.devcontainer.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "windows",
|
||||
"service": "windows",
|
||||
"forwardPorts": [8006],
|
||||
"dockerComposeFile": "compose.yml"
|
||||
}
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,7 +1,7 @@
|
||||
ARG VERSION_ARG="latest"
|
||||
FROM scratch AS build-amd64
|
||||
|
||||
COPY --from=qemux/qemu-docker:6.11 / /
|
||||
COPY --from=qemux/qemu:7.04 / /
|
||||
|
||||
ARG DEBCONF_NOWARNINGS="yes"
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
@@ -10,17 +10,11 @@ ARG DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||
RUN set -eu && \
|
||||
apt-get update && \
|
||||
apt-get --no-install-recommends -y install \
|
||||
bc \
|
||||
jq \
|
||||
curl \
|
||||
7zip \
|
||||
wsdd \
|
||||
samba \
|
||||
xz-utils \
|
||||
wimtools \
|
||||
dos2unix \
|
||||
cabextract \
|
||||
genisoimage \
|
||||
libxml2-utils \
|
||||
libarchive-tools && \
|
||||
apt-get clean && \
|
||||
@@ -29,7 +23,7 @@ RUN set -eu && \
|
||||
COPY --chmod=755 ./src /run/
|
||||
COPY --chmod=755 ./assets /run/assets
|
||||
|
||||
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
|
||||
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.45-0/virtio-win-1.9.45.tar.xz /drivers.txz
|
||||
|
||||
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
|
||||
FROM build-${TARGETARCH}
|
||||
@@ -38,7 +32,7 @@ ARG VERSION_ARG="0.00"
|
||||
RUN echo "$VERSION_ARG" > /run/version
|
||||
|
||||
VOLUME /storage
|
||||
EXPOSE 8006 3389
|
||||
EXPOSE 3389 8006
|
||||
|
||||
ENV VERSION="11"
|
||||
ENV RAM_SIZE="4G"
|
||||
|
||||
@@ -415,6 +415,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -418,6 +418,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -424,6 +424,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -421,6 +421,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -418,6 +418,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -264,6 +264,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>26</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -443,13 +448,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>24</Order>
|
||||
|
||||
@@ -267,6 +267,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>26</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -446,13 +451,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>24</Order>
|
||||
@@ -463,4 +468,3 @@
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
||||
|
||||
|
||||
@@ -267,6 +267,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>26</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -446,13 +451,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>24</Order>
|
||||
|
||||
@@ -267,6 +267,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>26</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -446,13 +451,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>24</Order>
|
||||
|
||||
@@ -267,6 +267,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>26</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -446,13 +451,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>24</Order>
|
||||
|
||||
@@ -290,6 +290,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>19</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</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>
|
||||
|
||||
@@ -293,6 +293,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>19</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</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>
|
||||
|
||||
@@ -308,6 +308,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>16</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</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>
|
||||
|
||||
@@ -311,6 +311,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>16</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</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>
|
||||
|
||||
@@ -328,6 +328,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -331,6 +331,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -332,6 +332,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
351
assets/win2019-hv.xml
Normal file
351
assets/win2019-hv.xml
Normal file
@@ -0,0 +1,351 @@
|
||||
<?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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Path>dism.exe /online /Disable-Feature /FeatureName:Microsoft-Hyper-V /NoRestart</Path>
|
||||
<Description>Disable Hyper-V role</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 echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
@@ -335,6 +335,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -332,6 +332,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -335,6 +335,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>20</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</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>
|
||||
|
||||
@@ -159,6 +159,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -337,13 +342,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
|
||||
@@ -162,6 +162,11 @@
|
||||
<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>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
@@ -340,13 +345,13 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>21</Order>
|
||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
||||
<Description>Install VirtIO display driver</Description>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||
<Description>Remove empty Windows.old folder</Description>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</Order>
|
||||
|
||||
288
assets/win7x64-enterprise-eval.xml
Normal file
288
assets/win7x64-enterprise-eval.xml
Normal file
@@ -0,0 +1,288 @@
|
||||
<?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>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<DiskConfiguration>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<Disk wcm:action="add">
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Size>100</Size>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Type>Primary</Type>
|
||||
<Extend>true</Extend>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Format>NTFS</Format>
|
||||
<Label>System Reserved</Label>
|
||||
<Order>1</Order>
|
||||
<Active>true</Active>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Active>true</Active>
|
||||
<Format>NTFS</Format>
|
||||
<Label>Windows</Label>
|
||||
<Letter>C</Letter>
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Value>Windows 7 Enterprise</Value>
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
<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>
|
||||
</OEMInformation>
|
||||
</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>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</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-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>
|
||||
<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>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\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
||||
<Description>Disable Network Discovery popup</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>9</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>10</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>11</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>12</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>13</Order>
|
||||
<CommandLine>cmd /C POWERCFG -X -standby-timeout-ac 0</CommandLine>
|
||||
<Description>Disable Sleep</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>14</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>15</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>16</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>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>18</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>
|
||||
|
||||
@@ -293,6 +293,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>16</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</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>
|
||||
|
||||
@@ -296,6 +296,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>16</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</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>
|
||||
|
||||
@@ -303,6 +303,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>16</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>17</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -252,6 +252,11 @@
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>22</Order>
|
||||
<CommandLine>cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts</CommandLine>
|
||||
<Description>Add entry in hosts file</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>23</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>
|
||||
|
||||
@@ -13,4 +13,7 @@ services:
|
||||
- 8006:8006
|
||||
- 3389:3389/tcp
|
||||
- 3389:3389/udp
|
||||
volumes:
|
||||
- ./windows:/storage
|
||||
restart: always
|
||||
stop_grace_period: 2m
|
||||
|
||||
127
kubernetes.yml
127
kubernetes.yml
@@ -10,68 +10,91 @@ spec:
|
||||
requests:
|
||||
storage: 64Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: windows
|
||||
labels:
|
||||
name: windows
|
||||
spec:
|
||||
containers:
|
||||
- name: windows
|
||||
image: dockurr/windows
|
||||
env:
|
||||
- name: VERSION
|
||||
value: "11"
|
||||
- name: RAM_SIZE
|
||||
value: "4G"
|
||||
- name: CPU_CORES
|
||||
value: "2"
|
||||
- name: DISK_SIZE
|
||||
value: "64G"
|
||||
ports:
|
||||
- containerPort: 8006
|
||||
- containerPort: 3389
|
||||
- containerPort: 3389
|
||||
protocol: UDP
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /storage
|
||||
name: storage
|
||||
- mountPath: /dev/kvm
|
||||
name: dev-kvm
|
||||
- mountPath: /dev/net/tun
|
||||
name: dev-tun
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes:
|
||||
- name: storage
|
||||
persistentVolumeClaim:
|
||||
claimName: windows-pvc
|
||||
- hostPath:
|
||||
path: /dev/kvm
|
||||
name: dev-kvm
|
||||
- hostPath:
|
||||
path: /dev/net/tun
|
||||
type: CharDevice
|
||||
name: dev-tun
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: windows
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: windows
|
||||
spec:
|
||||
containers:
|
||||
- name: windows
|
||||
image: dockurr/windows
|
||||
env:
|
||||
- name: VERSION
|
||||
value: "11"
|
||||
- name: DISK_SIZE
|
||||
value: "64G"
|
||||
ports:
|
||||
- containerPort: 8006
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 3389
|
||||
name: rdp
|
||||
protocol: TCP
|
||||
- containerPort: 3389
|
||||
name: udp
|
||||
protocol: UDP
|
||||
- containerPort: 5900
|
||||
name: vnc
|
||||
protocol: TCP
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /storage
|
||||
name: storage
|
||||
- mountPath: /dev/kvm
|
||||
name: dev-kvm
|
||||
- mountPath: /dev/net/tun
|
||||
name: dev-tun
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes:
|
||||
- name: storage
|
||||
persistentVolumeClaim:
|
||||
claimName: windows-pvc
|
||||
- hostPath:
|
||||
path: /dev/kvm
|
||||
name: dev-kvm
|
||||
- hostPath:
|
||||
path: /dev/net/tun
|
||||
type: CharDevice
|
||||
name: dev-tun
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: windows
|
||||
spec:
|
||||
internalTrafficPolicy: Cluster
|
||||
ports:
|
||||
- name: tcp-8006
|
||||
port: 8006
|
||||
- name: tcp-3389
|
||||
port: 3389
|
||||
- name: udp-3389
|
||||
port: 3389
|
||||
protocol: UDP
|
||||
- name: http
|
||||
port: 8006
|
||||
protocol: TCP
|
||||
targetPort: 8006
|
||||
- name: rdp
|
||||
port: 3389
|
||||
protocol: TCP
|
||||
targetPort: 3389
|
||||
- name: udp
|
||||
port: 3389
|
||||
protocol: UDP
|
||||
targetPort: 3389
|
||||
- name: vnc
|
||||
port: 5900
|
||||
protocol: TCP
|
||||
targetPort: 5900
|
||||
selector:
|
||||
name: windows
|
||||
type: NodePort
|
||||
app: windows
|
||||
type: ClusterIP
|
||||
|
||||
188
readme.md
188
readme.md
@@ -26,7 +26,7 @@ Windows inside a Docker container.
|
||||
|
||||
## Usage 🐳
|
||||
|
||||
Via Docker Compose:
|
||||
##### Via Docker Compose:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@@ -44,30 +44,27 @@ services:
|
||||
- 8006:8006
|
||||
- 3389:3389/tcp
|
||||
- 3389:3389/udp
|
||||
volumes:
|
||||
- ./windows:/storage
|
||||
restart: always
|
||||
stop_grace_period: 2m
|
||||
```
|
||||
|
||||
Via Docker CLI:
|
||||
##### Via Docker CLI:
|
||||
|
||||
```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:
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/master/kubernetes.yml
|
||||
```
|
||||
|
||||
## Compatibility ⚙️
|
||||
##### Via Github Codespaces:
|
||||
|
||||
| **Product** | **Platform** | |
|
||||
|---|---|---|
|
||||
| Docker Engine | Linux| ✅ |
|
||||
| Docker Desktop | Linux | ❌ |
|
||||
| Docker Desktop | macOS | ❌ |
|
||||
| Docker Desktop | Windows 11 | ✅ |
|
||||
| Docker Desktop | Windows 10 | ❌ |
|
||||
[`Click here to launch this container in the cloud!`](https://github.com/codespaces/new?skip_quickstart=true&machine=basicLinux32gb&repo=743140652&ref=master&devcontainer_path=.devcontainer.json)
|
||||
|
||||
## FAQ 💬
|
||||
|
||||
@@ -75,7 +72,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
Very simple! These are the steps:
|
||||
|
||||
- Start the container and connect to [port 8006](http://localhost:8006) using your web browser.
|
||||
- Start the container and connect to [port 8006](http://127.0.0.1:8006/) using your web browser.
|
||||
|
||||
- Sit back and relax while the magic happens, the whole installation will be performed fully automatic.
|
||||
|
||||
@@ -97,8 +94,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
| **Value** | **Version** | **Size** |
|
||||
|---|---|---|
|
||||
| `11` | Windows 11 Pro | 5.4 GB |
|
||||
| `11l` | Windows 11 LTSC | 4.2 GB |
|
||||
| `11e` | Windows 11 Enterprise | 5.8 GB |
|
||||
| `11l` | Windows 11 LTSC | 4.7 GB |
|
||||
| `11e` | Windows 11 Enterprise | 4.0 GB |
|
||||
||||
|
||||
| `10` | Windows 10 Pro | 5.7 GB |
|
||||
| `10l` | Windows 10 LTSC | 4.6 GB |
|
||||
@@ -109,7 +106,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
| `ve` | Windows Vista Enterprise | 3.0 GB |
|
||||
| `xp` | Windows XP Professional | 0.6 GB |
|
||||
||||
|
||||
| `2025` | Windows Server 2025 | 5.0 GB |
|
||||
| `2025` | Windows Server 2025 | 5.6 GB |
|
||||
| `2022` | Windows Server 2022 | 4.7 GB |
|
||||
| `2019` | Windows Server 2019 | 5.3 GB |
|
||||
| `2016` | Windows Server 2016 | 6.5 GB |
|
||||
@@ -126,10 +123,10 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
```yaml
|
||||
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?
|
||||
|
||||
@@ -145,58 +142,20 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### How do I share files with the host?
|
||||
|
||||
Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`. Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file:
|
||||
Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`.
|
||||
|
||||
Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file:
|
||||
|
||||
```yaml
|
||||
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]
|
||||
> 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 that is not selectable from the list above, specify the URL of that ISO in the `VERSION` environment variable, for example:
|
||||
|
||||
```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` during installation and the containing `install.bat` will be executed during the last step.
|
||||
|
||||
### 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?
|
||||
|
||||
By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.
|
||||
@@ -211,9 +170,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### How do I configure the username and password?
|
||||
|
||||
By default, a user called `Docker` is created during the installation, with an empty password.
|
||||
By default, a user called `Docker` (with an empty password) is created during installation.
|
||||
|
||||
If you want to use different credentials, you can change them in your compose file:
|
||||
If you want to use different credentials, you can configure them in your compose file (only before installation):
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -223,7 +182,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### How do I select the Windows language?
|
||||
|
||||
By default, the English version of Windows will be downloaded. But you can add the `LANGUAGE` environment variable to your compose file, in order to specify an alternative language:
|
||||
By default, the English version of Windows will be downloaded.
|
||||
|
||||
But before installation you can add the `LANGUAGE` environment variable to your compose file, in order to specify an alternative language:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -234,7 +195,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### 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, you can add the `KEYBOARD` and `REGION` variables with a culture code, 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
|
||||
environment:
|
||||
@@ -242,9 +203,65 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
KEYBOARD: "en-US"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Changing these values will have no effect after the installation has been performed already. Use the control panel inside Windows in that case.
|
||||
>
|
||||
### 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?
|
||||
|
||||
@@ -295,7 +312,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
After configuring the container for [macvlan](#how-do-i-assign-an-individual-ip-address-to-the-container), it is possible for Windows to become part of your home network by requesting an IP from your router, just like a real PC.
|
||||
|
||||
To enable this mode, add the following lines to your compose file:
|
||||
To enable this mode, in which the container and Windows will have separate IP addresses, add the following lines to your compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -306,9 +323,6 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
- 'c *:* rwm'
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> In this mode, the container and Windows will each have their own separate IPs.
|
||||
|
||||
### How do I add multiple disks?
|
||||
|
||||
To create additional disks, modify your compose file like this:
|
||||
@@ -318,8 +332,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
DISK2_SIZE: "32G"
|
||||
DISK3_SIZE: "64G"
|
||||
volumes:
|
||||
- /home/example:/storage2
|
||||
- /mnt/data/example:/storage3
|
||||
- ./example2:/storage2
|
||||
- ./example3:/storage3
|
||||
```
|
||||
|
||||
### How do I pass-through a disk?
|
||||
@@ -345,14 +359,20 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
- /dev/bus/usb
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If the device is a USB disk drive, please wait until after the installation is completed before connecting it. Otherwise the installation may fail, as the order of the disks can get rearranged.
|
||||
If the device is a USB disk drive, please wait until after the installation is fully completed before connecting it. Otherwise the installation may fail, as the order of the disks can get rearranged.
|
||||
|
||||
### How do I verify if my system supports KVM?
|
||||
|
||||
Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.
|
||||
|
||||
You can run the following commands in Linux to check your system:
|
||||
First check if your software is compatible using this chart:
|
||||
|
||||
| **Product** | **Linux** | **Win11** | **Win10** | **macOS** |
|
||||
|---|---|---|---|---|
|
||||
| Docker CLI | ✅ | ✅ | ❌ | ❌ |
|
||||
| Docker Desktop | ❌ | ✅ | ❌ | ❌ |
|
||||
| Podman CLI | ✅ | ✅ | ❌ | ❌ |
|
||||
| Podman Desktop | ✅ | ✅ | ❌ | ❌ |
|
||||
|
||||
After that you can run the following commands in Linux to check your system:
|
||||
|
||||
```bash
|
||||
sudo apt install cpu-checker
|
||||
@@ -367,16 +387,16 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
|
||||
|
||||
If you do not receive any error from `kvm-ok` but the container still complains about KVM, please check whether:
|
||||
|
||||
- you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.
|
||||
|
||||
- it could help to add `privileged: true` to your compose file (or `sudo` to your `docker run` command), to rule out any permission issue.
|
||||
If you did not receive any error from `kvm-ok` but the container still complains about a missing KVM device, it could help to add `privileged: true` to your compose file (or `sudo` to your `docker` command) to rule out any permission issue.
|
||||
|
||||
### How do I run macOS in a container?
|
||||
|
||||
You can use [dockur/macos](https://github.com/dockur/macos) for that. It shares many of the same features, except for the automatic installation.
|
||||
|
||||
### How do I run a Linux desktop in a container?
|
||||
|
||||
You can use [qemus/qemu](https://github.com/qemus/qemu) in that case.
|
||||
|
||||
### Is this project legal?
|
||||
|
||||
Yes, this project contains only open-source code and does not distribute any copyrighted material. Any product keys found in the code are just generic placeholders provided by Microsoft for trial purposes. So under all applicable laws, this project will be considered legal.
|
||||
|
||||
265
src/define.sh
265
src/define.sh
@@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
: "${KEY:=""}"
|
||||
: "${WIDTH:=""}"
|
||||
: "${HEIGHT:=""}"
|
||||
: "${VERIFY:=""}"
|
||||
: "${REGION:=""}"
|
||||
: "${EDITION:=""}"
|
||||
: "${MANUAL:=""}"
|
||||
: "${REMOVE:=""}"
|
||||
: "${VERSION:=""}"
|
||||
@@ -15,7 +17,6 @@ set -Eeuo pipefail
|
||||
: "${PASSWORD:=""}"
|
||||
|
||||
MIRRORS=3
|
||||
PLATFORM="x64"
|
||||
|
||||
parseVersion() {
|
||||
|
||||
@@ -62,7 +63,7 @@ parseVersion() {
|
||||
;;
|
||||
"7" | "7e" | "win7" | "win7e" | "windows7" | "windows 7" )
|
||||
VERSION="win7x64"
|
||||
[ -z "$DETECTED" ] && DETECTED="win7x64-enterprise"
|
||||
[ -z "$DETECTED" ] && DETECTED="win7x64-enterprise-eval"
|
||||
;;
|
||||
"7u" | "win7u" | "windows7u" | "windows 7u" )
|
||||
VERSION="win7x64-ultimate"
|
||||
@@ -100,6 +101,9 @@ parseVersion() {
|
||||
"16" | "2016" | "win16" | "win2016" | "windows2016" | "windows 2016" )
|
||||
VERSION="win2016-eval"
|
||||
;;
|
||||
"hv" | "hyperv" | "hyper v" | "hyper-v" | "19hv" | "2019hv" | "win2019hv")
|
||||
VERSION="win2019-hv"
|
||||
;;
|
||||
"2012" | "2012r2" | "win2012" | "win2012r2" | "windows2012" | "windows 2012" )
|
||||
VERSION="win2012r2-eval"
|
||||
;;
|
||||
@@ -416,6 +420,7 @@ printVersion() {
|
||||
"win95"* ) desc="Windows 95" ;;
|
||||
"win2k"* ) desc="Windows 2000" ;;
|
||||
"winvista"* ) desc="Windows Vista" ;;
|
||||
"win2019-hv"* ) desc="Hyper-V Server" ;;
|
||||
"win2003"* ) desc="Windows Server 2003" ;;
|
||||
"win2008"* ) desc="Windows Server 2008" ;;
|
||||
"win2012"* ) desc="Windows Server 2012" ;;
|
||||
@@ -460,6 +465,9 @@ printEdition() {
|
||||
*"-education" )
|
||||
edition="Education"
|
||||
;;
|
||||
*"-hv" )
|
||||
edition="2019"
|
||||
;;
|
||||
*"-iot" | *"-iot-eval" )
|
||||
edition="LTSC"
|
||||
;;
|
||||
@@ -481,11 +489,12 @@ printEdition() {
|
||||
"winvista"* )
|
||||
edition="Business"
|
||||
;;
|
||||
"win2025"* | "win2022"* | "win2019"* | "win2016"* )
|
||||
edition="Standard"
|
||||
;;
|
||||
"win2012"* | "win2008"* | "win2003"* )
|
||||
edition="Standard"
|
||||
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
|
||||
case "${EDITION^^}" in
|
||||
*"DATACENTER"* ) edition="Datacenter" ;;
|
||||
"CORE" | "STANDARDCORE" ) edition="Core" ;;
|
||||
* ) edition="Standard" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -502,7 +511,10 @@ fromFile() {
|
||||
local file="${1,,}"
|
||||
local arch="${PLATFORM,,}"
|
||||
|
||||
case "${file// /_}" in
|
||||
file="${file//-/_}"
|
||||
file="${file// /_}"
|
||||
|
||||
case "$file" in
|
||||
*"_x64_"* | *"_x64."*)
|
||||
arch="x64"
|
||||
;;
|
||||
@@ -517,7 +529,7 @@ fromFile() {
|
||||
local add=""
|
||||
[[ "$arch" != "x64" ]] && add="$arch"
|
||||
|
||||
case "${file// /_}" in
|
||||
case "$file" in
|
||||
"win7"* | "win_7"* | *"windows7"* | *"windows_7"* )
|
||||
id="win7${arch}"
|
||||
;;
|
||||
@@ -545,6 +557,9 @@ fromFile() {
|
||||
"tiny10"* | "tiny_10"* )
|
||||
id="tiny10"
|
||||
;;
|
||||
*"_serverhypercore_"* )
|
||||
id="win2019${add}-hv"
|
||||
;;
|
||||
*"server2025"* | *"server_2025"* )
|
||||
id="win2025${add}"
|
||||
;;
|
||||
@@ -589,7 +604,9 @@ fromName() {
|
||||
*"windows 7"* ) id="win7${arch}" ;;
|
||||
*"windows 8"* ) id="win81${arch}" ;;
|
||||
*"windows 10"* ) id="win10${arch}" ;;
|
||||
*"optimum 10"* ) id="win10${arch}" ;;
|
||||
*"windows 11"* ) id="win11${arch}" ;;
|
||||
*"optimum 11"* ) id="win11${arch}" ;;
|
||||
*"windows vista"* ) id="winvista${arch}" ;;
|
||||
*"server 2025"* ) id="win2025${add}" ;;
|
||||
*"server 2022"* ) id="win2022${add}" ;;
|
||||
@@ -598,6 +615,7 @@ fromName() {
|
||||
*"server 2012"* ) id="win2012r2${add}" ;;
|
||||
*"server 2008"* ) id="win2008r2${add}" ;;
|
||||
*"server 2003"* ) id="win2003r2${add}" ;;
|
||||
*"hyper-v server"* ) id="win2019${add}" ;;
|
||||
esac
|
||||
|
||||
echo "$id"
|
||||
@@ -618,6 +636,7 @@ getVersion() {
|
||||
*" home"* ) id="$id-home" ;;
|
||||
*" starter"* ) id="$id-starter" ;;
|
||||
*" ultimate"* ) id="$id-ultimate" ;;
|
||||
*" enterprise evaluation"* ) id="$id-enterprise-eval" ;;
|
||||
*" enterprise"* ) id="$id-enterprise" ;;
|
||||
esac
|
||||
;;
|
||||
@@ -640,6 +659,7 @@ getVersion() {
|
||||
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
|
||||
case "${name,,}" in
|
||||
*" evaluation"* ) id="$id-eval" ;;
|
||||
*"hyper-v server"* ) id="$id-hv" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -662,6 +682,9 @@ switchEdition() {
|
||||
"win81${PLATFORM,,}-enterprise-eval" )
|
||||
DETECTED="win81${PLATFORM,,}-enterprise"
|
||||
;;
|
||||
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise-eval" )
|
||||
DETECTED="win7${PLATFORM,,}-enterprise"
|
||||
;;
|
||||
"win2025-eval" ) DETECTED="win2025" ;;
|
||||
"win2022-eval" ) DETECTED="win2022" ;;
|
||||
"win2019-eval" ) DETECTED="win2019" ;;
|
||||
@@ -678,6 +701,7 @@ getMido() {
|
||||
local id="$1"
|
||||
local lang="$2"
|
||||
local ret="$3"
|
||||
local url=""
|
||||
local sum=""
|
||||
local size=""
|
||||
|
||||
@@ -689,16 +713,14 @@ getMido() {
|
||||
sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
|
||||
;;
|
||||
"win11x64-enterprise-eval" )
|
||||
size=6209064960
|
||||
sum="c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c"
|
||||
size=4295096320
|
||||
sum="dad633276073f14f3e0373ef7e787569e216d54942ce522b39451c8f2d38ad43"
|
||||
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENTENTERPRISEEVAL_OEMRET_A64FRE_en-us.iso"
|
||||
;;
|
||||
"win11x64-enterprise-ltsc-eval" )
|
||||
size=4428627968
|
||||
sum="8abf91c9cd408368dc73aab3425d5e3c02dae74900742072eb5c750fc637c195"
|
||||
;;
|
||||
"win11x64-enterprise-iot-eval" )
|
||||
size=4428627968
|
||||
sum="8abf91c9cd408368dc73aab3425d5e3c02dae74900742072eb5c750fc637c195"
|
||||
"win11x64-enterprise-iot-eval" | "win11x64-enterprise-ltsc-eval" )
|
||||
size=5060020224
|
||||
sum="2cee70bd183df42b92a2e0da08cc2bb7a2a9ce3a3841955a012c0f77aeb3cb29"
|
||||
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win10x64" )
|
||||
size=6140975104
|
||||
@@ -707,45 +729,64 @@ getMido() {
|
||||
"win10x64-enterprise-eval" )
|
||||
size=5550497792
|
||||
sum="ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668"
|
||||
url="https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66750/19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win10x64-enterprise-ltsc-eval" )
|
||||
size=4898582528
|
||||
sum="e4ab2e3535be5748252a8d5d57539a6e59be8d6726345ee10e7afd2cb89fefb5"
|
||||
url="https://software-download.microsoft.com/download/pr/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win81x64-enterprise-eval" )
|
||||
size=3961473024
|
||||
sum="2dedd44c45646c74efc5a028f65336027e14a56f76686a4631cf94ffe37c72f2"
|
||||
url="https://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO"
|
||||
;;
|
||||
"win7x64" | "win7x64-enterprise-eval" )
|
||||
size=3121248256
|
||||
sum="2c16c73388a5c02a0ec4cd8b9e5c14ba28b7b45d13d0c9c7d44459feecc0385f"
|
||||
url="http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso"
|
||||
;;
|
||||
"win2025-eval" )
|
||||
size=5307996160
|
||||
sum="16442d1c0509bcbb25b715b1b322a15fb3ab724a42da0f384b9406ca1c124ed4"
|
||||
size=6014152704
|
||||
sum="d0ef4502e350e3c6c53c15b1b3020d38a5ded011bf04998e950720ac8579b23d"
|
||||
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win2022-eval" )
|
||||
size=5044094976
|
||||
sum="3e4fa6d8507b554856fc9ca6079cc402df11a8b79344871669f0251535255325"
|
||||
url="https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win2019-eval" )
|
||||
size=5652088832
|
||||
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"
|
||||
;;
|
||||
"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" )
|
||||
size=6972221440
|
||||
sum="1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f"
|
||||
url="https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
|
||||
;;
|
||||
"win2012r2-eval" )
|
||||
size=4542291968
|
||||
sum="6612b5b1f53e845aacdf96e974bb119a3d9b4dcb5b82e65804ab7e534dc7b4d5"
|
||||
url="https://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
|
||||
;;
|
||||
"win2008r2" )
|
||||
size=3166840832
|
||||
sum="30832ad76ccfa4ce48ccb936edefe02079d42fb1da32201bf9e3a880c8ed6312"
|
||||
url="https://download.microsoft.com/download/4/1/D/41DEA7E0-B30D-4012-A1E3-F24DC03BA1BB/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${ret,,}" in
|
||||
"sum" ) echo "$sum" ;;
|
||||
"size" ) echo "$size" ;;
|
||||
*) echo "";;
|
||||
*) echo "$url";;
|
||||
esac
|
||||
|
||||
return 0
|
||||
@@ -767,25 +808,23 @@ getLink1() {
|
||||
|
||||
case "${id,,}" in
|
||||
"win11x64" | "win11x64-enterprise" | "win11x64-enterprise-eval" )
|
||||
size=5946128384
|
||||
sum="5bb1459034f50766ee480d895d751af73a4af30814240ae32ebc5633546a5af7"
|
||||
url="11/en-us_windows_11_23h2_x64.iso"
|
||||
size=5332989952
|
||||
sum="aa1ad990f930d907b7a34ea897abbb0dfbe47552ca8acc146f92e40381839e05"
|
||||
url="11/en-us_windows_11_24h2_x64.iso"
|
||||
;;
|
||||
"win11x64-iot" | "win11x64-enterprise-iot-eval" )
|
||||
[[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0
|
||||
size=5144817664
|
||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
||||
[[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0
|
||||
size=5144817664
|
||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||
;;
|
||||
"win10x64" | "win10x64-enterprise" | "win10x64-enterprise-eval" )
|
||||
size=5623582720
|
||||
sum="57371545d752a79a8a8b163b209c7028915da661de83516e06ddae913290a855"
|
||||
size=5535252480
|
||||
sum="557871965263d0fd0a1ea50b5d0d0d7cb04a279148ca905c1c675c9bc0d5486c"
|
||||
url="10/en-us_windows_10_22h2_x64.iso"
|
||||
;;
|
||||
"win10x64-iot" | "win10x64-enterprise-iot-eval" )
|
||||
@@ -838,7 +877,7 @@ getLink1() {
|
||||
sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8"
|
||||
url="server/2008r2/en_windows_server_2008_r2_with_sp1_x64_dvd_617601-018.iso"
|
||||
;;
|
||||
"win7x64" | "win7x64-enterprise" )
|
||||
"win7x64" | "win7x64-enterprise" | "win7x64-enterprise-eval" )
|
||||
size=3182604288
|
||||
sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7"
|
||||
url="7/en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
|
||||
@@ -922,7 +961,7 @@ getLink2() {
|
||||
sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8"
|
||||
url="Windows%20Server%202008%20R2/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso"
|
||||
;;
|
||||
"win7x64" | "win7x64-enterprise" )
|
||||
"win7x64" | "win7x64-enterprise" | "win7x64-enterprise-eval" )
|
||||
size=3182604288
|
||||
sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7"
|
||||
url="Windows%207/en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
|
||||
@@ -1107,66 +1146,12 @@ isESD() {
|
||||
return 1
|
||||
}
|
||||
|
||||
isMG() {
|
||||
|
||||
local id="$1"
|
||||
local lang="$2"
|
||||
|
||||
case "${id,,}" in
|
||||
"win11${PLATFORM,,}" )
|
||||
return 0
|
||||
;;
|
||||
"win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win11${PLATFORM,,}-ltsc" | "win11${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win11${PLATFORM,,}-iot" | "win11${PLATFORM,,}-enterprise-iot-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win10${PLATFORM,,}" )
|
||||
return 0
|
||||
;;
|
||||
"win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win10${PLATFORM,,}-iot" | "win10${PLATFORM,,}-enterprise-iot-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win81${PLATFORM,,}-enterprise" | "win81${PLATFORM,,}-enterprise-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win2025" | "win2025-eval" | "win2022" | "win2022-eval" | "win2019" | "win2019-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win2016" | "win2016-eval" | "win2012r2" | "win2012r2-eval" | "win2008r2" | "win2008r2-eval" )
|
||||
return 0
|
||||
;;
|
||||
"win7x64" | "win7x64-enterprise" | "win7x64-ultimate" | "win7x86" | "win7x86-enterprise" | "win7x86-ultimate" )
|
||||
return 0
|
||||
;;
|
||||
"winvistax64" | "winvistax64-enterprise" | "winvistax64-ultimate" | "winvistax86" | "winvistax86-enterprise" | "winvistax86-ultimate" )
|
||||
return 0
|
||||
;;
|
||||
"winxpx86" | "winxpx64" )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
validVersion() {
|
||||
|
||||
local id="$1"
|
||||
local lang="$2"
|
||||
local url
|
||||
|
||||
isMG "$id" "$lang" && return 0
|
||||
isESD "$id" "$lang" && return 0
|
||||
isMido "$id" "$lang" && return 0
|
||||
|
||||
@@ -1204,34 +1189,11 @@ addFolder() {
|
||||
return 0
|
||||
}
|
||||
|
||||
migrateFiles() {
|
||||
|
||||
local base="$1"
|
||||
local version="$2"
|
||||
local file=""
|
||||
|
||||
[ -f "$base" ] && return 0
|
||||
|
||||
[[ "${version,,}" == "tiny10" ]] && file="tiny10_x64_23h2.iso"
|
||||
[[ "${version,,}" == "tiny11" ]] && file="tiny11_2311_x64.iso"
|
||||
[[ "${version,,}" == "core11" ]] && file="tiny11_core_x64_beta_1.iso"
|
||||
[[ "${version,,}" == "winxpx86" ]] && file="en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso"
|
||||
[[ "${version,,}" == "winvistax64" ]] && file="en_windows_vista_sp2_x64_dvd_342267.iso"
|
||||
[[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
|
||||
|
||||
[ ! -f "$STORAGE/$file" ] && return 0
|
||||
mv -f "$STORAGE/$file" "$base" || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
prepareInstall() {
|
||||
|
||||
local dir="$2"
|
||||
local desc="$3"
|
||||
local arch="$4"
|
||||
local key="$5"
|
||||
local driver="$6"
|
||||
local driver="$4"
|
||||
local drivers="/tmp/drivers"
|
||||
|
||||
rm -rf "$drivers"
|
||||
@@ -1250,7 +1212,8 @@ prepareInstall() {
|
||||
error "Failed to extract drivers!" && return 1
|
||||
fi
|
||||
|
||||
local target
|
||||
local arch target
|
||||
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
||||
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
|
||||
|
||||
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
|
||||
@@ -1336,6 +1299,28 @@ prepareInstall() {
|
||||
[ -n "$PASSWORD" ] && password="$PASSWORD"
|
||||
[ -n "$USERNAME" ] && username=$(echo "$USERNAME" | sed 's/[^[:alnum:]@!._-]//g')
|
||||
|
||||
local ip="20.20.20.1"
|
||||
[ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1"
|
||||
|
||||
# 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 {} \;
|
||||
|
||||
{ echo "[Data]"
|
||||
@@ -1373,7 +1358,7 @@ prepareInstall() {
|
||||
echo " FullName=\"$username\""
|
||||
echo " ComputerName=\"*\""
|
||||
echo " OrgName=\"Windows for Docker\""
|
||||
echo " ProductKey=$key"
|
||||
echo " ProductKey=$KEY"
|
||||
echo ""
|
||||
echo "[Identification]"
|
||||
echo " JoinWorkgroup = WORKGROUP"
|
||||
@@ -1508,6 +1493,12 @@ prepareInstall() {
|
||||
echo ""
|
||||
echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")"
|
||||
echo ""
|
||||
echo "Set oFSO = CreateObject(\"Scripting.FileSystemObject\")"
|
||||
echo "Set oHosts = oFSO.GetFile(\"C:\Windows\System32\drivers\etc\hosts\")"
|
||||
echo "Set fileAPPEND = oFSO.OpenTextFile(\"C:\Windows\System32\drivers\etc\hosts\", 8, true)"
|
||||
echo "fileAPPEND.Write(\"$ip host.lan\")"
|
||||
echo "fileAPPEND.Close()"
|
||||
echo ""
|
||||
} | unix2dos > "$dir/\$OEM\$/admin.vbs"
|
||||
|
||||
{ echo "[COMMANDS]"
|
||||
@@ -1519,56 +1510,6 @@ prepareInstall() {
|
||||
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() {
|
||||
|
||||
local iso="$1"
|
||||
@@ -1655,11 +1596,11 @@ setMachine() {
|
||||
"win2k"* )
|
||||
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
||||
"winxp"* )
|
||||
if ! prepareXP "$iso" "$dir" "$desc"; then
|
||||
if ! prepareInstall "$iso" "$dir" "$desc" "xp"; then
|
||||
error "Failed to prepare $desc ISO!" && return 1
|
||||
fi ;;
|
||||
"win2003"* )
|
||||
if ! prepare2k3 "$iso" "$dir" "$desc"; then
|
||||
if ! prepareInstall "$iso" "$dir" "$desc" "2k3"; then
|
||||
error "Failed to prepare $desc ISO!" && return 1
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
15
src/entry.sh
15
src/entry.sh
@@ -1,16 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
: "${APP:="Windows"}"
|
||||
: "${PLATFORM:="x64"}"
|
||||
: "${BOOT_MODE:="windows"}"
|
||||
|
||||
APP="Windows"
|
||||
SUPPORT="https://github.com/dockur/windows"
|
||||
: "${SUPPORT:="https://github.com/dockur/windows"}"
|
||||
|
||||
cd /run
|
||||
|
||||
. utils.sh # Load functions
|
||||
. reset.sh # Initialize system
|
||||
. define.sh # Define versions
|
||||
. mido.sh # Download code
|
||||
. mido.sh # Download Windows
|
||||
. install.sh # Run installation
|
||||
. disk.sh # Initialize disks
|
||||
. display.sh # Initialize graphics
|
||||
@@ -32,8 +33,10 @@ info "Booting ${APP}${BOOT_DESC} using QEMU v$version..."
|
||||
terminal
|
||||
( sleep 30; boot ) &
|
||||
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
|
||||
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" &
|
||||
wait $! || :
|
||||
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" | \
|
||||
sed -u -e 's/\x1B\[[=0-9;]*[a-z]//gi' \
|
||||
-e 's/failed to load Boot/skipped Boot/g' \
|
||||
-e 's/0): Not Found/0)/g' & wait $! || :
|
||||
|
||||
sleep 1 & wait $!
|
||||
[ ! -f "$QEMU_END" ] && finish 0
|
||||
|
||||
107
src/install.sh
107
src/install.sh
@@ -76,8 +76,6 @@ startInstall() {
|
||||
|
||||
BOOT="$STORAGE/$file"
|
||||
|
||||
! migrateFiles "$BOOT" "$VERSION" && error "Migration failed!" && exit 57
|
||||
|
||||
fi
|
||||
|
||||
skipInstall "$BOOT" && return 1
|
||||
@@ -202,10 +200,16 @@ abortInstall() {
|
||||
detectCustom() {
|
||||
|
||||
local file base
|
||||
local fname="custom.iso"
|
||||
|
||||
CUSTOM=""
|
||||
|
||||
file=$(find / -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
||||
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
||||
if [ -d "/$fname" ]; then
|
||||
error "The file /$fname has an invalid path!" && return 1
|
||||
fi
|
||||
|
||||
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
||||
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
||||
|
||||
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
|
||||
base=$(basename "$VERSION")
|
||||
@@ -246,12 +250,12 @@ extractESD() {
|
||||
mkdir -p "$dir"
|
||||
|
||||
size=16106127360
|
||||
size_gb=$(( (size + 1073741823)/1073741824 ))
|
||||
size_gb=$(formatBytes "$size")
|
||||
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
||||
space_gb=$(( (space + 1073741823)/1073741824 ))
|
||||
space_gb=$(formatBytes "$space")
|
||||
|
||||
if (( size > space )); then
|
||||
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && return 1
|
||||
error "Not enough free space in $STORAGE, have $space_gb available but need at least $size_gb." && return 1
|
||||
fi
|
||||
|
||||
local esdImageCount
|
||||
@@ -337,16 +341,16 @@ extractImage() {
|
||||
mkdir -p "$dir"
|
||||
|
||||
size=$(stat -c%s "$iso")
|
||||
size_gb=$(( (size + 1073741823)/1073741824 ))
|
||||
size_gb=$(formatBytes "$size")
|
||||
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
||||
space_gb=$(( (space + 1073741823)/1073741824 ))
|
||||
space_gb=$(formatBytes "$space")
|
||||
|
||||
if ((size<100000000)); then
|
||||
error "Invalid ISO file: Size is smaller than 100 MB" && return 1
|
||||
fi
|
||||
|
||||
if (( size > space )); then
|
||||
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && return 1
|
||||
error "Not enough free space in $STORAGE, have $space_gb available but need at least $size_gb." && return 1
|
||||
fi
|
||||
|
||||
rm -rf "$dir"
|
||||
@@ -489,6 +493,10 @@ setXML() {
|
||||
|
||||
local file="/custom.xml"
|
||||
|
||||
if [ -d "$file" ]; then
|
||||
warn "The file $file has an invalid path!"
|
||||
fi
|
||||
|
||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
|
||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"
|
||||
@@ -573,6 +581,10 @@ detectImage() {
|
||||
info "Detected: $desc"
|
||||
setXML "" && return 0
|
||||
|
||||
if [[ "$DETECTED" == "win81x86"* ]] || [[ "$DETECTED" == "win10x86"* ]]; then
|
||||
error "The 32-bit version of $desc is not supported!" && return 1
|
||||
fi
|
||||
|
||||
msg="the answer file for $desc was not found ($DETECTED.xml)"
|
||||
local fallback="/run/assets/${DETECTED%%-*}.xml"
|
||||
|
||||
@@ -620,6 +632,10 @@ updateXML() {
|
||||
local language="$2"
|
||||
local culture region user admin pass keyboard
|
||||
|
||||
if [ -n "${VM_NET_IP:-}" ]; then
|
||||
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
|
||||
fi
|
||||
|
||||
[ -z "$HEIGHT" ] && HEIGHT="720"
|
||||
[ -z "$WIDTH" ] && WIDTH="1280"
|
||||
|
||||
@@ -668,6 +684,16 @@ updateXML() {
|
||||
sed -z "s/<AdministratorPassword>...............<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset"
|
||||
fi
|
||||
|
||||
if [ -n "$EDITION" ]; then
|
||||
[[ "${EDITION^^}" == "CORE" ]] && EDITION="STANDARDCORE"
|
||||
sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -677,8 +703,13 @@ addDriver() {
|
||||
local path="$2"
|
||||
local target="$3"
|
||||
local driver="$4"
|
||||
local desc=""
|
||||
local folder=""
|
||||
|
||||
if [ -z "$id" ]; then
|
||||
warn "no Windows version specified for \"$driver\" driver!" && return 0
|
||||
fi
|
||||
|
||||
case "${id,,}" in
|
||||
"win7x86"* ) folder="w7/x86" ;;
|
||||
"win7x64"* ) folder="w7/amd64" ;;
|
||||
@@ -698,7 +729,12 @@ addDriver() {
|
||||
esac
|
||||
|
||||
if [ -z "$folder" ]; then
|
||||
warn "no \"$driver\" driver found for \"$DETECTED\" !" && return 0
|
||||
desc=$(printVersion "$id" "$id")
|
||||
if [[ "${id,,}" != *"x86"* ]]; then
|
||||
warn "no \"$driver\" driver available for \"$desc\" !" && return 0
|
||||
else
|
||||
warn "no \"$driver\" driver available for the 32-bit version of \"$desc\" !" && return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
[ ! -d "$path/$driver/$folder" ] && return 0
|
||||
@@ -731,6 +767,11 @@ addDrivers() {
|
||||
local msg="Adding drivers to image..."
|
||||
info "$msg" && html "$msg"
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
version="win11x64"
|
||||
warn "Windows version unknown, falling back to Windows 11 drivers..."
|
||||
fi
|
||||
|
||||
if ! bsdtar -xf /drivers.txz -C "$drivers"; then
|
||||
error "Failed to extract drivers from archive!" && return 1
|
||||
fi
|
||||
@@ -924,12 +965,12 @@ buildImage() {
|
||||
fi
|
||||
|
||||
size=$(du -h -b --max-depth=0 "$dir" | cut -f1)
|
||||
size_gb=$(( (size + 1073741823)/1073741824 ))
|
||||
size_gb=$(formatBytes "$size")
|
||||
space=$(df --output=avail -B 1 "$TMP" | tail -n 1)
|
||||
space_gb=$(( (space + 1073741823)/1073741824 ))
|
||||
space_gb=$(formatBytes "$space")
|
||||
|
||||
if (( size > space )); then
|
||||
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && return 1
|
||||
error "Not enough free space in $STORAGE, have $space_gb available but need at least $size_gb." && return 1
|
||||
fi
|
||||
|
||||
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
|
||||
@@ -982,44 +1023,10 @@ bootWindows() {
|
||||
|
||||
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
|
||||
BOOT_MODE=$(<"$STORAGE/windows.mode")
|
||||
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
||||
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Migrations
|
||||
|
||||
[[ "${PLATFORM,,}" != "x64" ]] && return 0
|
||||
|
||||
if [ -f "$STORAGE/windows.old" ]; then
|
||||
MACHINE=$(<"$STORAGE/windows.old")
|
||||
[ -z "$MACHINE" ] && MACHINE="q35"
|
||||
BOOT_MODE="windows_legacy"
|
||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local creation="1.10"
|
||||
local minimal="2.14"
|
||||
|
||||
if [ -f "$STORAGE/windows.ver" ]; then
|
||||
creation=$(<"$STORAGE/windows.ver")
|
||||
[[ "${creation}" != *"."* ]] && creation="$minimal"
|
||||
fi
|
||||
|
||||
# Force secure boot on installs created prior to v2.14
|
||||
if (( $(echo "$creation < $minimal" | bc -l) )); then
|
||||
if [[ "${BOOT_MODE,,}" == "windows" ]]; then
|
||||
BOOT_MODE="windows_secure"
|
||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
||||
if [ -f "$STORAGE/windows.rom" ] && [ ! -f "$STORAGE/$BOOT_MODE.rom" ]; then
|
||||
mv -f "$STORAGE/windows.rom" "$STORAGE/$BOOT_MODE.rom"
|
||||
fi
|
||||
if [ -f "$STORAGE/windows.vars" ] && [ ! -f "$STORAGE/$BOOT_MODE.vars" ]; then
|
||||
mv -f "$STORAGE/windows.vars" "$STORAGE/$BOOT_MODE.vars"
|
||||
fi
|
||||
fi
|
||||
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
||||
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
|
||||
fi
|
||||
|
||||
return 0
|
||||
|
||||
316
src/mido.sh
316
src/mido.sh
@@ -208,6 +208,9 @@ download_windows_eval() {
|
||||
"win2022-eval" )
|
||||
enterprise_type="server"
|
||||
windows_version="windows-server-2022" ;;
|
||||
"win2019-hv" )
|
||||
enterprise_type="server"
|
||||
windows_version="hyper-v-server-2019" ;;
|
||||
"win2019-eval" )
|
||||
enterprise_type="server"
|
||||
windows_version="windows-server-2019" ;;
|
||||
@@ -242,10 +245,10 @@ download_windows_eval() {
|
||||
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Getting download link.."
|
||||
|
||||
if [[ "$enterprise_type" == "iot" ]]; then
|
||||
filter="https://go.microsoft.com/fwlink/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country^^}"
|
||||
else
|
||||
filter="https://go.microsoft.com/fwlink/p/?LinkID=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country^^}"
|
||||
filter="https://go.microsoft.com/fwlink/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country,,}"
|
||||
|
||||
if ! echo "$iso_download_page_html" | grep -io "$filter" > /dev/null; then
|
||||
filter="https://go.microsoft.com/fwlink/p/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country,,}"
|
||||
fi
|
||||
|
||||
iso_download_links=$(echo "$iso_download_page_html" | grep -io "$filter") || {
|
||||
@@ -310,7 +313,7 @@ getWindows() {
|
||||
info "$msg" && html "$msg"
|
||||
|
||||
case "${version,,}" in
|
||||
"win2008r2" | "win81${PLATFORM,,}-enterprise"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
||||
"win2008r2" | "win7${PLATFORM,,}"* | "win81${PLATFORM,,}"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
||||
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
||||
error "No download in the $language language available for $edition!"
|
||||
MIDO_URL="" && return 1
|
||||
@@ -335,61 +338,18 @@ getWindows() {
|
||||
"win11${PLATFORM,,}-enterprise"* | "win10${PLATFORM,,}-enterprise"* )
|
||||
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
|
||||
;;
|
||||
"win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
||||
"win7${PLATFORM,,}"* | "win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
||||
;;
|
||||
* ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;;
|
||||
esac
|
||||
|
||||
if [[ "${PLATFORM,,}" != "x64" ]]; then
|
||||
MIDO_URL=""
|
||||
return 1
|
||||
fi
|
||||
MIDO_URL=$(getMido "$version" "$lang" "")
|
||||
[ -z "$MIDO_URL" ] && return 1
|
||||
|
||||
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
||||
MIDO_URL=""
|
||||
return 1
|
||||
fi
|
||||
|
||||
case "${version,,}" in
|
||||
"win81${PLATFORM,,}-enterprise"* )
|
||||
MIDO_URL="https://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO"
|
||||
return 0
|
||||
;;
|
||||
"win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
||||
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso"
|
||||
return 0
|
||||
;;
|
||||
"win2025-eval" )
|
||||
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_SERVER_EVAL_x64FRE_en-us.iso"
|
||||
return 0
|
||||
;;
|
||||
"win2022-eval" )
|
||||
MIDO_URL="https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso"
|
||||
return 0
|
||||
;;
|
||||
"win2019-eval" )
|
||||
MIDO_URL="https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
|
||||
return 0
|
||||
;;
|
||||
"win2016-eval" )
|
||||
MIDO_URL="https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
|
||||
return 0
|
||||
;;
|
||||
"win2012r2-eval" )
|
||||
MIDO_URL="https://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
|
||||
return 0
|
||||
;;
|
||||
"win2008r2" )
|
||||
MIDO_URL="https://download.microsoft.com/download/4/1/D/41DEA7E0-B30D-4012-A1E3-F24DC03BA1BB/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
MIDO_URL=""
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
getCatalog() {
|
||||
@@ -429,215 +389,6 @@ getCatalog() {
|
||||
return 0
|
||||
}
|
||||
|
||||
getMG() {
|
||||
|
||||
local version="$1"
|
||||
local lang="$2"
|
||||
local desc="$3"
|
||||
|
||||
local locale=""
|
||||
local culture=""
|
||||
local language=""
|
||||
local user_agent=""
|
||||
|
||||
user_agent=$(get_agent)
|
||||
language=$(getLanguage "$lang" "desc")
|
||||
culture=$(getLanguage "$lang" "culture")
|
||||
|
||||
local msg="Requesting download link from massgrave.dev..."
|
||||
info "$msg" && html "$msg"
|
||||
|
||||
local pattern=""
|
||||
local locale="${culture,,}"
|
||||
local platform="${PLATFORM,,}"
|
||||
local url="https://massgrave.dev/"
|
||||
|
||||
if [[ "${PLATFORM,,}" != "arm64" ]]; then
|
||||
|
||||
case "${version,,}" in
|
||||
"win11${PLATFORM,,}" )
|
||||
url+="windows_11_links"
|
||||
pattern="consumer"
|
||||
;;
|
||||
"win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval" )
|
||||
url+="windows_11_links"
|
||||
pattern="business"
|
||||
;;
|
||||
"win11${PLATFORM,,}-ltsc" | "win11${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
url+="windows_ltsc_links"
|
||||
pattern="11_enterprise_ltsc"
|
||||
;;
|
||||
"win11${PLATFORM,,}-iot" | "win11${PLATFORM,,}-enterprise-iot-eval" )
|
||||
url+="windows_ltsc_links"
|
||||
pattern="11_iot"
|
||||
;;
|
||||
"win10${PLATFORM,,}" )
|
||||
url+="windows_10_links"
|
||||
pattern="consumer"
|
||||
;;
|
||||
"win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" )
|
||||
url+="windows_10_links"
|
||||
pattern="business"
|
||||
;;
|
||||
"win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
url+="windows_ltsc_links"
|
||||
pattern="10_enterprise_ltsc"
|
||||
;;
|
||||
"win10${PLATFORM,,}-iot" | "win10${PLATFORM,,}-enterprise-iot-eval" )
|
||||
url+="windows_ltsc_links"
|
||||
pattern="10_iot"
|
||||
;;
|
||||
"win81${PLATFORM,,}-enterprise" | "win81${PLATFORM,,}-enterprise-eval" )
|
||||
url+="windows_8.1_links"
|
||||
pattern="8.1_enterprise"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
[[ "$locale" == "sr" ]] && locale="sr-latn"
|
||||
;;
|
||||
"win2025" | "win2025-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2025"
|
||||
;;
|
||||
"win2022" | "win2022-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2022"
|
||||
;;
|
||||
"win2019" | "win2019-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2019"
|
||||
;;
|
||||
"win2016" | "win2016-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2016"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
[[ "$locale" == "hk" ]] && locale="ct"
|
||||
[[ "$locale" == "tw" ]] && locale="ct"
|
||||
;;
|
||||
"win2012r2" | "win2012r2-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2012_r2"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"win2008r2" | "win2008r2-eval" )
|
||||
url+="windows_server_links"
|
||||
pattern="server_2008_r2"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"win7x64" | "win7x64-enterprise" )
|
||||
url+="windows_7_links"
|
||||
pattern="enterprise"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"win7x64-ultimate" )
|
||||
url+="windows_7_links"
|
||||
pattern="ultimate"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"win7x86" | "win7x86-enterprise" )
|
||||
platform="x86"
|
||||
url+="windows_7_links"
|
||||
pattern="enterprise"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"win7x86-ultimate" )
|
||||
platform="x86"
|
||||
url+="windows_7_links"
|
||||
pattern="ultimate"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"winvistax64" | "winvistax64-enterprise" )
|
||||
url+="windows_vista_links"
|
||||
pattern="enterprise"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"winvistax64-ultimate" )
|
||||
url+="windows_vista_links"
|
||||
pattern="sp2"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"winvistax86" | "winvistax86-enterprise" )
|
||||
platform="x86"
|
||||
url+="windows_vista_links"
|
||||
pattern="enterprise"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"winvistax86-ultimate" )
|
||||
platform="x86"
|
||||
url+="windows_vista_links"
|
||||
pattern="sp2"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
"winxpx86" )
|
||||
platform="x86"
|
||||
url+="windows_xp_links"
|
||||
pattern="xp"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
[[ "$locale" == "pt" ]] && locale="pt-br"
|
||||
[[ "$locale" == "pp" ]] && locale="pt-pt"
|
||||
[[ "$locale" == "cn" ]] && locale="zh-hans"
|
||||
[[ "$locale" == "hk" ]] && locale="zh-hk"
|
||||
[[ "$locale" == "tw" ]] && locale="zh-tw"
|
||||
;;
|
||||
"winxpx64" )
|
||||
url+="windows_xp_links"
|
||||
pattern="xp"
|
||||
locale=$(getLanguage "$lang" "code")
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
case "${version,,}" in
|
||||
"win11${PLATFORM,,}" | "win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval" )
|
||||
url+="windows_arm_links"
|
||||
pattern="11_business"
|
||||
;;
|
||||
"win11${PLATFORM,,}-ltsc" | "win11${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
url+="windows_arm_links"
|
||||
pattern="11_iot_enterprise_ltsc"
|
||||
;;
|
||||
"win10${PLATFORM,,}" | "win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" )
|
||||
url+="windows_arm_links"
|
||||
pattern="Pro_10"
|
||||
locale="$language"
|
||||
[[ "$locale" == "Chinese" ]] && locale="ChnSimp"
|
||||
[[ "$locale" == "Chinese HK" ]] && locale="ChnTrad"
|
||||
[[ "$locale" == "Chinese TW" ]] && locale="ChnTrad"
|
||||
;;
|
||||
"win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" )
|
||||
url+="windows_arm_links"
|
||||
pattern="10_iot_enterprise_ltsc"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
local body=""
|
||||
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Parsing download page: ${url}"
|
||||
body=$(curl --silent --max-time 30 --user-agent "$user_agent" --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url") || {
|
||||
handle_curl_error "$?" "Massgrave"
|
||||
return $?
|
||||
}
|
||||
|
||||
local list=""
|
||||
list=$(echo "$body" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep -i '\.iso$')
|
||||
|
||||
local result=""
|
||||
result=$(echo "$list" | grep -i "${platform}" | grep "${pattern}" | grep -i -m 1 "${locale,,}_")
|
||||
|
||||
if [ -z "$result" ]; then
|
||||
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
||||
error "No download in the $language language available for $desc!"
|
||||
else
|
||||
error "Failed to parse download link for $desc! Please report this at $SUPPORT/issues."
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
MG_URL="$result"
|
||||
return 0
|
||||
}
|
||||
|
||||
getESD() {
|
||||
|
||||
local dir="$1"
|
||||
@@ -728,7 +479,9 @@ verifyFile() {
|
||||
local check="$4"
|
||||
|
||||
if [ -n "$size" ] && [[ "$total" != "$size" ]] && [[ "$size" != "0" ]]; then
|
||||
warn "The downloaded file has an unexpected size: $total bytes, while expected value was: $size bytes. Please report this at $SUPPORT/issues"
|
||||
if [[ "$VERIFY" == [Yy1]* ]] || [[ "$DEBUG" == [Yy1]* ]]; then
|
||||
warn "The downloaded file has a different size ( $total bytes) than expected ( $size bytes). Please report this at $SUPPORT/issues"
|
||||
fi
|
||||
fi
|
||||
|
||||
local hash=""
|
||||
@@ -751,7 +504,7 @@ verifyFile() {
|
||||
info "Succesfully verified ISO!" && return 0
|
||||
fi
|
||||
|
||||
error "The downloaded file has an invalid $algo checksum: $hash , while expected value was: $check. Please report this at $SUPPORT/issues"
|
||||
error "The downloaded file has an unknown $algo checksum: $hash , as the expected value was: $check. Please report this at $SUPPORT/issues"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -763,14 +516,15 @@ downloadFile() {
|
||||
local size="$4"
|
||||
local lang="$5"
|
||||
local desc="$6"
|
||||
local rc total progress domain dots space folder
|
||||
local rc total total_gb progress domain dots space folder
|
||||
|
||||
rm -f "$iso"
|
||||
|
||||
if [ -n "$size" ] && [[ "$size" != "0" ]]; then
|
||||
folder=$(dirname -- "$iso")
|
||||
space=$(df --output=avail -B 1 "$folder" | tail -n 1)
|
||||
(( size > space )) && error "Not enough free space left to download file!" && return 1
|
||||
total_gb=$(formatBytes "$space")
|
||||
(( size > space )) && error "Not enough free space to download file, only $total_gb left!" && return 1
|
||||
fi
|
||||
|
||||
# Check if running with interactive TTY or redirected to docker log
|
||||
@@ -800,8 +554,9 @@ downloadFile() {
|
||||
|
||||
if (( rc == 0 )) && [ -f "$iso" ]; then
|
||||
total=$(stat -c%s "$iso")
|
||||
total_gb=$(formatBytes "$total")
|
||||
if [ "$total" -lt 100000000 ]; then
|
||||
error "Invalid download link: $url (is only $total bytes?). Please report this at $SUPPORT/issues." && return 1
|
||||
error "Invalid download link: $url (is only $total_gb ?). Please report this at $SUPPORT/issues." && return 1
|
||||
fi
|
||||
verifyFile "$iso" "$size" "$total" "$sum" || return 1
|
||||
html "Download finished successfully..." && return 0
|
||||
@@ -810,7 +565,7 @@ downloadFile() {
|
||||
msg="Failed to download $url"
|
||||
(( rc == 3 )) && error "$msg , cannot write file (disk full?)" && return 1
|
||||
(( rc == 4 )) && error "$msg , network failure!" && return 1
|
||||
(( rc == 8 )) && error "$msg , server issued an error response!" && return 1
|
||||
(( rc == 8 )) && error "$msg , server issued an error response! Please report this at $SUPPORT/issues." && return 1
|
||||
|
||||
error "$msg , reason: $rc"
|
||||
return 1
|
||||
@@ -922,31 +677,6 @@ downloadImage() {
|
||||
|
||||
done
|
||||
|
||||
if isMG "$version" "$lang"; then
|
||||
|
||||
if [[ "$tried" != "n" ]]; then
|
||||
info "Failed to download $desc, will try a diferent method now..."
|
||||
fi
|
||||
|
||||
tried="y"
|
||||
success="n"
|
||||
|
||||
if getMG "$version" "$lang" "$desc"; then
|
||||
success="y"
|
||||
else
|
||||
info "$msg" && html "$msg" && sleep "$delay"
|
||||
getMG "$version" "$lang" "$desc" && success="y"
|
||||
fi
|
||||
|
||||
if [[ "$success" == "y" ]]; then
|
||||
downloadFile "$iso" "$MG_URL" "" "" "$lang" "$desc" && return 0
|
||||
info "$msg" && html "$msg" && sleep "$delay"
|
||||
downloadFile "$iso" "$MG_URL" "" "" "$lang" "$desc" && return 0
|
||||
rm -f "$iso"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ boot() {
|
||||
grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && fail="y"
|
||||
fi
|
||||
if [ -z "$fail" ]; then
|
||||
info "Windows started succesfully, visit http://localhost:8006/ to view the screen..."
|
||||
info "Windows started succesfully, visit http://127.0.0.1:8006/ to view the screen..."
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
19
src/samba.sh
19
src/samba.sh
@@ -14,6 +14,10 @@ if [[ "$DHCP" == [Yy1]* ]]; then
|
||||
interface="$VM_NET_DEV"
|
||||
fi
|
||||
|
||||
if [[ "${NETWORK,,}" == "user"* ]]; then
|
||||
interface="127.0.0.1"
|
||||
fi
|
||||
|
||||
addShare() {
|
||||
local dir="$1"
|
||||
local name="$2"
|
||||
@@ -71,6 +75,9 @@ addShare() {
|
||||
echo " guest account = nobody"
|
||||
echo " map to guest = Bad User"
|
||||
echo " server min protocol = NT1"
|
||||
echo " follow symlinks = yes"
|
||||
echo " wide links = yes"
|
||||
echo " unix extensions = no"
|
||||
echo ""
|
||||
echo " # disable printing services"
|
||||
echo " load printers = no"
|
||||
@@ -89,6 +96,18 @@ addShare "$share" "Data" "Shared" || error "Failed to create shared folder!"
|
||||
[ -d "/data2" ] && addShare "/data2" "Data2" "Shared"
|
||||
[ -d "/data3" ] && addShare "/data3" "Data3" "Shared"
|
||||
|
||||
IFS=',' read -r -a dirs <<< "${SHARES:-}"
|
||||
for dir in "${dirs[@]}"; do
|
||||
[ ! -d "$dir" ] && continue
|
||||
dir_name=$(basename "$dir")
|
||||
addShare "$dir" "$dir_name" "Shared $dir_name" || error "Failed to create shared folder for $dir!"
|
||||
done
|
||||
|
||||
# Fix Samba permissions
|
||||
[ -d /run/samba/msg.lock ] && chmod -R 0755 /run/samba/msg.lock
|
||||
[ -d /var/log/samba/cores ] && chmod -R 0700 /var/log/samba/cores
|
||||
[ -d /var/cache/samba/msg.lock ] && chmod -R 0755 /var/cache/samba/msg.lock
|
||||
|
||||
if ! smbd; then
|
||||
error "Samba daemon failed to start!"
|
||||
smbd -i --debug-stdout || true
|
||||
|
||||
Reference in New Issue
Block a user