Compare commits

...

54 Commits

Author SHA1 Message Date
Kroese 7b4404db6b fix: Improve version string trimming (#1738) 2026-05-17 12:58:03 +02:00
Kroese 2412a3ed18 fix: Local variable declaration (#1736) 2026-05-17 10:51:00 +02:00
Kroese 8c57b119cf fix: Language string replacement syntax (#1735) 2026-05-17 10:22:20 +02:00
Kroese 40867f6e85 feat: Update Windows 11 download links (#1733) 2026-05-17 06:06:54 +02:00
Kroese b5d8c2ad08 feat: Update Windows 11 download link (#1732) 2026-05-16 22:41:45 +02:00
Kroese 603465a687 fix: Update Windows Server 2025 download link (#1731) 2026-05-16 22:18:31 +02:00
Kroese d8a548c3fb fix: Escape illegal characters in base64 output (#1730) 2026-05-16 22:10:56 +02:00
Kroese 60e5925d72 feat: Enhance debug messages (#1729) 2026-05-16 19:34:35 +02:00
Kroese 398344163f fix: Invalid sed command syntax (#1728) 2026-05-16 18:53:26 +02:00
Kroese f2809a8929 fix: Missing equals sign before ConvertNTFS (#1727) 2026-05-16 02:45:58 +02:00
Kroese 7fd7ab3050 fix: Code formatting (#1726) 2026-05-16 02:44:47 +02:00
Kroese fddbebadae fix: Case statements (#1725) 2026-05-16 02:37:05 +02:00
Kroese 34f312ddff build: Update wsddn package to v1.24 (#1724) 2026-05-16 00:17:11 +02:00
Kroese daea34a10f feat: Update download links (#1723) 2026-05-15 22:03:48 +02:00
Kroese c5417e8fca fix: Automated downloads from Microsoft (#1722) 2026-05-13 20:34:30 +02:00
Kroese 603ee5f93b fix: Remove VirtIO Balloon service for x86 (#1721) 2026-05-13 17:49:22 +02:00
Kroese 4926ad0ea9 feat: Always copy drivers to Windows folder (#1720) 2026-05-13 17:10:40 +02:00
Kroese a81c45de30 feat: Update download links (#1719) 2026-05-13 16:50:37 +02:00
Kroese 85bacbec63 fix: Check if VERSION variable is empty (#1718) 2026-05-13 08:28:18 +02:00
Kroese 8f1335d7f8 docs: Improve warning for USB disk drives (#1717) 2026-05-13 04:47:49 +02:00
Kroese 8d50472167 build: Update QEMU base image to v7.30 (#1713) 2026-05-10 16:30:16 +02:00
renovate[bot] 173f35d21b chore(deps): update grantbirki/json-yaml-validate action to v5 (#1712) 2026-05-10 16:27:30 +02:00
dependabot[bot] e21418b228 build(deps): bump docker/metadata-action from 5 to 6 (#1667) 2026-05-06 20:56:39 +02:00
dependabot[bot] 1246667afa build(deps): bump docker/setup-buildx-action from 3 to 4 (#1668) 2026-05-06 20:52:52 +02:00
dependabot[bot] 247e4e0b38 build(deps): bump docker/login-action from 3 to 4 (#1669) 2026-05-06 20:51:21 +02:00
dependabot[bot] c534901402 build(deps): bump docker/build-push-action from 6 to 7 (#1670) 2026-05-06 20:49:05 +02:00
Kroese 49e962e56a fix: Use PID file from base image (#1711) 2026-05-06 20:47:37 +02:00
Kroese 3e37a04d96 build: Update VirtIO drivers to v1.9.57 (#1709) 2026-05-06 08:25:54 +02:00
Luca De Petrillo 0ea63962af feat: Add memory ballooning support (#1688) 2026-05-06 07:57:31 +02:00
Kroese 4d01a81586 build: Use Firefox impersonation while checking links (#1681) 2026-03-23 15:17:26 +01:00
Kroese d8e51d8965 build: Add workflow to validate download links (#1680) 2026-03-23 13:36:57 +01:00
Kroese 8d4788f7c0 build: Update WSDD version to v1.23 (#1679) 2026-03-23 11:31:04 +01:00
Kroese 8ec135d826 build: Update VirtIO drivers to v1.9.53 (#1678) 2026-03-23 11:26:50 +01:00
huulme 0400f5f45d docs: Higher quality video thumbnail (#1671) 2026-03-09 11:50:01 -04:00
Azim Muradov 588969ae5f fix: Path to "Desktop" folder on Windows XP (#1625)
Fix path to "Desktop" folder to work correctly with different locales on Windows XP.
2026-01-13 13:43:48 +01:00
Kroese c7aac1edcf build: Update QEMU base image to v7.29 (#1583) 2025-11-22 05:02:48 +01:00
renovate[bot] ea03c67a04 chore(deps): update actions/checkout action to v6 (#1580) 2025-11-21 12:38:58 +01:00
Gamal Moussa bdb0488151 refactor: replace PID cleanup with loop (#1579) 2025-11-20 08:49:24 +01:00
Kroese ad6f87046a build: Update VirtIO drivers to v1.9.49 (#1570) 2025-11-14 07:18:24 +01:00
Kroese e7a3894210 fix: Update Workspaces configuration (#1569) 2025-11-14 06:26:07 +01:00
Kroese 8443559a76 build: Update QEMU base image to v7.28 (#1562) 2025-11-12 07:08:22 +01:00
Kroese 6dbac13cd1 fix: Use pcnet network adapter for Win9x (#1558) 2025-11-07 06:06:01 +01:00
Kroese fd907bb78a feat: Update Windows Server download links (#1555) 2025-11-06 01:27:27 +01:00
Kroese 1a6a2dbad0 build: Use Github token (#1539) 2025-10-29 14:06:26 +01:00
Kroese 11a19f6a9d fix: Remove unnecessary operation (#1534) 2025-10-24 04:33:47 +02:00
Kroese 544501107a feat: Check if shared folder is writeable (#1531) 2025-10-22 12:19:39 +02:00
Kroese 122d1ff98e fix: Inherit owner from parent folder (#1526) 2025-10-22 10:06:26 +02:00
Kroese c1c44c4da7 build: Add code quality checks (#1529) 2025-10-22 01:23:25 +02:00
Kroese f661df3abc build: Update QEMU base image to v7.27 (#1528) 2025-10-21 23:19:54 +02:00
Kroese a0bcd719be build: Add review workflow for shell formatting (#1527) 2025-10-21 22:46:06 +02:00
Kroese 9236127a86 fix: Add SELinux warning for shared folder (#1522) 2025-10-20 14:50:37 +02:00
Kroese fa606aec53 build: Update wsddn package to v1.22 (#1521) 2025-10-20 14:48:46 +02:00
Kroese 8790b4ec7c fix: Remove SeaBIOS control characters (#1520) 2025-10-20 13:59:27 +02:00
Kroese e3cf3ccf3d docs: Update docker run command (#1519) 2025-10-20 12:29:03 +02:00
68 changed files with 597 additions and 172 deletions
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "../codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
-1
View File
@@ -15,6 +15,5 @@
"onAutoForward": "ignore"
},
"dockerComposeFile": "codespaces.yml",
"workspaceFolder": "/workspaces/windows",
"initializeCommand": "docker system prune --all --force"
}
+6 -6
View File
@@ -22,13 +22,13 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Docker metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
context: git
images: |
@@ -43,23 +43,23 @@ jobs:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
-
name: Login into Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build Docker image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
+2 -2
View File
@@ -9,7 +9,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
-
name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
@@ -30,6 +30,6 @@ jobs:
file-endings: ".xml"
-
name: Validate JSON and YML files
uses: GrantBirki/json-yaml-validate@v4
uses: GrantBirki/json-yaml-validate@v5.0.0
with:
yaml_exclude_regex: ".*\\kubernetes\\.yml$"
+12 -10
View File
@@ -12,13 +12,15 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
-
name: Docker Hub Description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_REPO }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./readme.md
-
name: Checkout repo
uses: actions/checkout@v6
-
name: Docker Hub Description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_REPO }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./readme.md
+67
View File
@@ -0,0 +1,67 @@
name: Links
on:
workflow_dispatch:
concurrency:
group: links
cancel-in-progress: false
jobs:
links:
name: Links
runs-on: ubuntu-latest
permissions:
actions: read
packages: read
contents: read
steps:
-
name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Validate Links
run: |
errors=0
count=0
host=""
declare -A seen
wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.6.1/curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz
tar -xzf curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz
sudo cp curl-impersonate-ff /usr/local/bin/
check() {
local url="$1" http
http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
[[ "$http" == 2* ]] && return 0
http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
[[ "$http" == 2* ]]
}
while IFS= read -r line; do
if [[ "$line" =~ ^[[:space:]]*local[[:space:]]+host=\"(https://[^\"]+)\" ]]; then
host="${BASH_REMATCH[1]%/}"
continue
fi
[[ "$line" =~ ^[[:space:]]*url=\"(.+)\" ]] || continue
val="${BASH_REMATCH[1]#/}"
if [[ "$val" == https://* ]]; then
url="$val"
elif [[ -n "$host" ]]; then
url="$host/$val"
else
continue
fi
[[ -v seen[$url] ]] && continue
seen[$url]=1
count=$((count + 1))
if check "$url"; then
echo " OK: $url"
else
echo "FAIL: $url"
errors=$((errors + 1))
fi
done < "src/define.sh"
echo ""
printf '%d/%d links valid\n' "$(( count - errors ))" "$count"
(( errors == 0 ))
+66
View File
@@ -0,0 +1,66 @@
on:
pull_request:
name: "Review"
permissions:
contents: read
pull-requests: write
checks: write
jobs:
review:
name: review
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Spelling
uses: reviewdog/action-misspell@v1
with:
locale: "US"
level: warning
pattern: |
*.md
*.sh
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: Hadolint
uses: reviewdog/action-hadolint@v1
with:
level: warning
reporter: github-pr-review
hadolint_ignore: DL3006 DL3008
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: YamlLint
uses: reviewdog/action-yamllint@v1
with:
level: warning
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: ActionLint
uses: reviewdog/action-actionlint@v1
with:
level: warning
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: Shellformat
uses: reviewdog/action-shfmt@v1
with:
level: warning
shfmt_flags: "-i 2 -ci -bn"
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: Shellcheck
uses: reviewdog/action-shellcheck@v1
with:
level: warning
reporter: github-pr-review
shellcheck_flags: -x -e SC1091 -e SC2001 -e SC2002 -e SC2034 -e SC2064 -e SC2153 -e SC2317 -e SC2028
github_token: ${{ secrets.GITHUB_TOKEN }}
+6 -3
View File
@@ -3,9 +3,12 @@
ARG VERSION_ARG="latest"
FROM scratch AS build-amd64
COPY --from=qemux/qemu:7.26 / /
COPY --from=qemux/qemu:7.30 / /
ARG TARGETARCH
ARG VERSION_WSDD="1.24"
ARG VERSION_VIRTIO="1.9.57"
ARG DEBCONF_NOWARNINGS="yes"
ARG DEBIAN_FRONTEND="noninteractive"
ARG DEBCONF_NONINTERACTIVE_SEEN="true"
@@ -19,7 +22,7 @@ RUN set -eu && \
cabextract \
libxml2-utils \
libarchive-tools && \
wget "https://github.com/gershnik/wsdd-native/releases/download/v1.21/wsddn_1.21_${TARGETARCH}.deb" -O /tmp/wsddn.deb -q && \
wget "https://github.com/gershnik/wsdd-native/releases/download/v${VERSION_WSDD}/wsddn_${VERSION_WSDD}_${TARGETARCH}.deb" -O /tmp/wsddn.deb -q && \
dpkg -i /tmp/wsddn.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -27,7 +30,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.48-0/virtio-win-1.9.48.tar.xz /var/drivers.txz
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v${VERSION_VIRTIO}-0/virtio-win-${VERSION_VIRTIO}.tar.xz /var/drivers.txz
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
FROM build-${TARGETARCH}
+5
View File
@@ -246,6 +246,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -249,6 +249,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -255,6 +255,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -252,6 +252,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -249,6 +249,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -269,6 +269,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>27</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -272,6 +272,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>27</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -272,6 +272,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>27</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -272,6 +272,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>27</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -272,6 +272,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>27</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -154,6 +154,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -157,6 +157,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -155,6 +155,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -158,6 +158,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -155,6 +155,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -158,6 +158,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -164,6 +164,11 @@
<Path>dism.exe /online /Disable-Feature /FeatureName:Microsoft-Hyper-V /NoRestart</Path>
<Description>Disable Hyper-V role</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -164,6 +164,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -167,6 +167,11 @@
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
<Description>Install VirtIO display driver</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -148,6 +148,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -152,6 +152,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -152,6 +152,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -152,6 +152,15 @@
</FirewallGroup>
</FirewallGroups>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -146,6 +146,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -149,6 +149,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+5
View File
@@ -156,6 +156,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>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -90,6 +90,15 @@
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<fDenyTSConnections>false</fDenyTSConnections>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -90,6 +90,15 @@
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<fDenyTSConnections>false</fDenyTSConnections>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+9
View File
@@ -90,6 +90,15 @@
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<fDenyTSConnections>false</fDenyTSConnections>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>C:\Windows\Drivers\Balloon\blnsvr.exe -i</Path>
<Description>Install VirtIO Balloon service</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
+7 -6
View File
@@ -22,7 +22,7 @@ Windows inside a Docker container.
## Video 📺
[![Youtube](https://img.youtube.com/vi/xhGYobuG508/0.jpg)](https://www.youtube.com/watch?v=xhGYobuG508)
[![Youtube](https://img.youtube.com/vi/xhGYobuG508/maxresdefault.jpg)](https://www.youtube.com/watch?v=xhGYobuG508)
## Usage 🐳
@@ -53,7 +53,7 @@ services:
##### Via Docker CLI:
```bash
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
docker run -it --rm --name windows -e "VERSION=11" -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v "${PWD:-.}/windows:/storage" --stop-timeout 120 docker.io/dockurr/windows
```
##### Via Kubernetes:
@@ -97,7 +97,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
| **Value** | **Version** | **Size** |
|---|---|---|
| `11` | Windows 11 Pro | 7.2 GB |
| `11` | Windows 11 Pro | 7.9 GB |
| `11l` | Windows 11 LTSC | 4.7 GB |
| `11e` | Windows 11 Enterprise | 6.6 GB |
||||
@@ -111,7 +111,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
| `xp` | Windows XP Professional | 0.6 GB |
| `2k` | Windows 2000 Professional | 0.4 GB |
||||
| `2025` | Windows Server 2025 | 6.7 GB |
| `2025` | Windows Server 2025 | 7.6 GB |
| `2022` | Windows Server 2022 | 6.0 GB |
| `2019` | Windows Server 2019 | 5.3 GB |
| `2016` | Windows Server 2016 | 6.5 GB |
@@ -143,7 +143,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
```
> [!TIP]
> This can also be used to resize the existing disk to a larger capacity without any data loss. However you will need to [manually extend the disk partition](https://learn.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume?tabs=disk-management) since the added disk space will appear as unallocated.
> This can also be used to resize the existing disk to a larger capacity without any data loss. However you will need to [manually extend the disk partition](https://learn.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume?tabs=disk-management) afterwards, since the added disk space will appear as unallocated.
### How do I share files with the host?
@@ -343,7 +343,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
- /dev/bus/usb
```
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.
> [!WARNING]
> Adding a USB mass storage device before Windows Setup has finished may cause it to fail. Or worse: the drive can get formatted as the system disk, and all your data will be lost! So always keep them disconnected when launching the container for the first time.
### How do I verify if my system supports KVM?
+42 -38
View File
@@ -24,7 +24,9 @@ parseVersion() {
VERSION="${VERSION:1:-1}"
fi
VERSION=$(expr "$VERSION" : "^\ *\(.*[^ ]\)\ *$")
VERSION="${VERSION#"${VERSION%%[! ]*}"}"
VERSION="${VERSION%"${VERSION##*[! ]}"}"
[ -z "$VERSION" ] && VERSION="win11"
case "${VERSION,,}" in
@@ -138,7 +140,7 @@ parseVersion() {
"nano11" | "nano 11" )
VERSION="nano11"
[ -z "$DETECTED" ] && DETECTED="win11x64"
;;
;;
"core11" | "core 11" )
VERSION="core11"
[ -z "$DETECTED" ] && DETECTED="win11x64"
@@ -276,7 +278,7 @@ getLanguage() {
lang="Latvian"
desc="$lang"
culture="lv-LV" ;;
"nb" | "nb-"* |"nn" | "nn-"* | "no" | "no-"* )
"nb" | "nb-"* | "nn" | "nn-"* | "no" | "no-"* )
short="no"
lang="Norwegian"
desc="$lang"
@@ -376,9 +378,9 @@ getLanguage() {
parseLanguage() {
REGION="${REGION//_/-/}"
KEYBOARD="${KEYBOARD//_/-/}"
LANGUAGE="${LANGUAGE//_/-/}"
REGION="${REGION//_/-}"
KEYBOARD="${KEYBOARD//_/-}"
LANGUAGE="${LANGUAGE//_/-}"
[ -z "$LANGUAGE" ] && LANGUAGE="en"
@@ -722,8 +724,8 @@ getMido() {
case "${id,,}" in
"win11x64" )
size=7736125440
sum="d141f6030fed50f75e2b03e1eb2e53646c4b21e5386047cb860af5223f102a32"
size=8471603200
sum="768984706b909479417b2368438909440f2967ff05c6a9195ed2667254e465e3"
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENT_CONSUMER_x64FRE_en-us.iso"
;;
"win11x64-enterprise-eval" )
@@ -734,11 +736,7 @@ getMido() {
"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
sum="a6f470ca6d331eb353b815c043e327a347f594f37ff525f17764738fe812852e"
url="https://software-static.download.prss.microsoft.com/dbazure/998969d5-f34g-4e03-ac9d-1f9786c66749/26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso"
;;
"win10x64-enterprise-eval" )
size=5550497792
@@ -756,9 +754,9 @@ getMido() {
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"
;;
"win2025-eval" )
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"
size=8152356864
sum="7b052573ba7894c9924e3e87ba732ccd354d18cb75a883efa9b900ea125bfd51"
url="https://software-static.download.prss.microsoft.com/dbazure/998969d5-f34g-4e03-ac9d-1f9786c66749/26100.32230.260111-0550.lt_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
;;
"win2022-eval" )
size=5044094976
@@ -817,9 +815,9 @@ getLink1() {
case "${id,,}" in
"win11x64" | "win11x64-enterprise" | "win11x64-enterprise-eval" )
size=5332989952
sum="aa1ad990f930d907b7a34ea897abbb0dfbe47552ca8acc146f92e40381839e05"
url="11/en-us_windows_11_24h2_x64.iso"
size=6898546688
sum="2618a56931b645a6f097082431994bd85ae80862518de389e382f35ebfd455be"
url="11/en-us_windows_11_25h2_x64.iso"
;;
"win11x64-iot" | "win11x64-enterprise-iot" | "win11x64-enterprise-iot-eval" )
size=5144817664
@@ -832,8 +830,8 @@ getLink1() {
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=5535252480
sum="557871965263d0fd0a1ea50b5d0d0d7cb04a279148ca905c1c675c9bc0d5486c"
size=5767888896
sum="9dce12d73168debc697919a6bc4d8c6624b2175bbed01a2ca97edb7d93627319"
url="10/en-us_windows_10_22h2_x64.iso"
;;
"win10x64-iot" | "win10x64-enterprise-iot" | "win10x64-enterprise-iot-eval" )
@@ -857,14 +855,14 @@ getLink1() {
url="8.x/8.1/en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso"
;;
"win2025" | "win2025-eval" )
size=6786627584
sum="bf3ef0849c7cb5e818e1035b7466d206af5aa227ace1a3f4b0de2bf00d2e2144"
url="server/2025/en-us_windows_server_2025_updated_april_2025_x64_dvd_ea86301d.iso"
size=7571058688
sum="d273d0a85565ffbc06a3d46313f619103e2830a3373306ddbb9a08b8824f509d"
url="server/2025/en-us_windows_server_2025_updated_oct_2025_x64_dvd_6c0c5aa8.iso"
;;
"win2022" | "win2022-eval" )
size=6005706752
sum="cea2cb2c09de9910c236e64eae3a801c55e9c77ec25e8d81585e3a4581d24bfb"
url="server/2022/en-us_windows_server_2022_updated_april_2025_x64_dvd_3f755ec1.iso"
size=6023239680
sum="5d6d91efa972cbdd6701d78db1dcf6a34c7024ca931c1718e7cb3d0c6dd54e88"
url="server/2022/en-us_windows_server_2022_updated_oct_2025_x64_dvd_26e9af36.iso"
;;
"win2019" | "win2019-eval" )
size=5575774208
@@ -1078,6 +1076,7 @@ getLink3() {
size=387424256
sum="08b11c3897eb38d1e6566a17cec5cdf2b3c620444e160e3db200a7e223aabbd8"
url="Windows_2000_SP4.iso"
;;
esac
case "${ret,,}" in
@@ -1167,10 +1166,15 @@ getLink4() {
sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1"
url="en_windows_8.1_enterprise_with_update_x64_dvd/en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso"
;;
"win2025" | "win2025-eval" )
size=6014152704
sum="d0ef4502e350e3c6c53c15b1b3020d38a5ded011bf04998e950720ac8579b23d"
url="26100.1742.240906-0331.ge-release-svc-refresh-server-eval-x-64-fre-en-us/26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
;;
"win2022" | "win2022-eval" )
size=5365624832
sum="c3c57bb2cf723973a7dcfb1a21e97dfa035753a7f111e348ad918bb64b3114db"
url="win-server-2022/2227-January_2024/en-us_windows_server_2022_updated_jan_2024_x64_dvd_2b7a0c9f.iso"
size=5550684160
sum="5a077ee2a95976ef9f3623eb4040e25cdf7f8f01dee3b8165a32a7626f39f025"
url="en-us_windows_server_2022_x64_dvd_620d7eac_202405/en-us_windows_server_2022_x64_dvd_620d7eac.iso"
;;
"win2019" | "win2019-eval" )
size=5575774208
@@ -1215,7 +1219,7 @@ getLink4() {
"winvistax64" | "winvistax64-ultimate" )
size=3861460992
sum="edf9f947c5791469fd7d2d40a5dcce663efa754f91847aa1d28ed7f585675b78"
url="en_windows_vista_sp2_x64_dvd_342267_202010/en_windows_vista_sp2_x64_dvd_342267.iso"
url="ms_windows_vista_sp2/en_windows_vista_sp2_x64_dvd_342267.iso"
;;
"winvistax64-enterprise" )
size=3205953536
@@ -1251,6 +1255,7 @@ getLink4() {
size=386859008
sum="e3816f6e80b66ff686ead03eeafffe9daf020a5e4717b8bd4736b7c51733ba22"
url="MicrosoftWindows2000BuildCollection/5.00.2195.6717_x86fre_client-professional_retail_en-us-ZRMPFPP_EN.iso"
;;
esac
case "${ret,,}" in
@@ -1605,7 +1610,7 @@ prepareInstall() {
echo " OemPnPDriversPath=\"Drivers\viostor;Drivers\NetKVM;Drivers\sata\""
echo " NoWaitAfterTextMode=1"
echo " NoWaitAfterGUIMode=1"
echo " FileSystem-ConvertNTFS"
echo " FileSystem=ConvertNTFS"
echo " ExtendOemPartition=0"
echo " Hibernation=\"No\""
echo ""
@@ -1766,7 +1771,7 @@ prepareInstall() {
echo ""
echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")"
echo ""
echo "Set oLink = WshShell.CreateShortcut(WshShell.ExpandEnvironmentStrings(\"%userprofile%\\Desktop\\Shared.lnk\"))"
echo "Set oLink = WshShell.CreateShortcut(WshShell.SpecialFolders(\"Desktop\") & \"\\Shared.lnk\")"
echo "With oLink"
echo " .TargetPath = \"\\\\host.lan\\Data\""
echo " .Save"
@@ -1857,7 +1862,6 @@ detectLegacy() {
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IB -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51ID -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IL -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IS -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AA -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AD -print -quit)
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AS -print -quit)
@@ -1915,16 +1919,16 @@ setMachine() {
USB="no"
VGA="cirrus"
DISK_TYPE="auto"
ADAPTER="rtl8139"
MACHINE="pc-i440fx-2.4"
BOOT_MODE="windows_legacy" ;;
BOOT_MODE="windows_legacy"
[ -z "${ADAPTER:-}" ] && ADAPTER="pcnet" ;;
"win2k"* )
VGA="cirrus"
MACHINE="pc"
USB="pci-ohci"
DISK_TYPE="auto"
ADAPTER="rtl8139"
BOOT_MODE="windows_legacy" ;;
BOOT_MODE="windows_legacy"
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;;
"winxp"* | "win2003"* )
DISK_TYPE="blk"
BOOT_MODE="windows_legacy" ;;
+3
View File
@@ -23,6 +23,7 @@ cd /run
. proc.sh # Initialize processor
. power.sh # Configure shutdown
. memory.sh # Check available memory
. balloon.sh # Initialize ballooning
. config.sh # Configure arguments
. finish.sh # Finish initialization
@@ -39,6 +40,8 @@ terminal
tail -fn +0 "$QEMU_LOG" --pid=$$ 2>/dev/null &
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" | \
sed -u -e 's/\x1B\[[=0-9;]*[a-z]//gi' \
-e 's/\x1B\x63//g' -e 's/\x1B\[[=?]7l//g' \
-e '/^$/d' -e 's/\x44\x53\x73//g' \
-e 's/failed to load Boot/skipped Boot/g' \
-e 's/0): Not Found/0)/g' & wait $! || :
+85 -35
View File
@@ -22,7 +22,11 @@ backup () {
fi
mkdir -p "$root"
if ! makeDir "$root"; then
error "Failed to create directory \"$root\" !"
return 1
fi
local folder="$name"
local dir="$root/$folder"
@@ -34,7 +38,11 @@ backup () {
done
rm -rf "$dir"
mkdir -p "$dir"
if ! makeDir "$dir"; then
error "Failed to create directory \"$dir\" !"
return 1
fi
[ -f "$iso" ] && mv -f "$iso" "$dir/"
find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -not -iname '*.iso' -exec mv -n {} "$dir/" \;
@@ -127,7 +135,6 @@ startInstall() {
if [[ "${VERSION,,}" == "http"* ]]; then
file=$(basename "${VERSION%%\?*}")
file="${file//+/ }"
printf -v file '%b' "${file//%/\\x}"
file="${file//[!A-Za-z0-9._-]/_}"
@@ -156,7 +163,9 @@ startInstall() {
! backup "" && error "Backup failed!"
fi
mkdir -p "$TMP"
if ! makeDir "$TMP"; then
error "Failed to create directory \"$TMP\" !"
fi
if [ -z "$CUSTOM" ]; then
@@ -178,6 +187,20 @@ startInstall() {
return 0
}
writeFile() {
local txt="$1"
local path="$2"
echo "$txt" >"$path"
if ! setOwner "$path"; then
error "Failed to set the owner for \"$path\" !"
fi
return 0
}
finishInstall() {
local iso="$1"
@@ -188,6 +211,10 @@ finishInstall() {
error "Failed to find ISO file: $iso" && return 1
fi
if [[ "$iso" == "$STORAGE/"* ]]; then
! setOwner "$iso" && error "Failed to set the owner for \"$iso\" !"
fi
if [[ "$aborted" != [Yy1]* ]]; then
# Mark ISO as prepared via magic byte
byte="16" && [[ "$MANUAL" == [Yy1]* ]] && byte="17"
@@ -196,56 +223,68 @@ finishInstall() {
fi
fi
cp -f /run/version "$STORAGE/windows.ver"
local file="$STORAGE/windows.ver"
cp -f /run/version "$file"
! setOwner "$file" && error "Failed to set the owner for \"$file\" !"
if [[ "$iso" == "$STORAGE/"* ]]; then
if [[ "$aborted" != [Yy1]* ]] || [ -z "$CUSTOM" ]; then
base=$(basename "$iso")
echo "$base" > "$STORAGE/windows.base"
file="$STORAGE/windows.base"
writeFile "$base" "$file"
fi
fi
if [[ "${PLATFORM,,}" == "x64" ]]; then
if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
file="$STORAGE/windows.mode"
writeFile "$BOOT_MODE" "$file"
if [[ "${MACHINE,,}" != "q35" ]]; then
echo "$MACHINE" > "$STORAGE/windows.old"
file="$STORAGE/windows.old"
writeFile "$MACHINE" "$file"
fi
else
# Enable secure boot + TPM on manual installs as Win11 requires
if [[ "$MANUAL" == [Yy1]* || "$aborted" == [Yy1]* ]]; then
if [[ "${DETECTED,,}" == "win11"* ]]; then
BOOT_MODE="windows_secure"
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
file="$STORAGE/windows.mode"
writeFile "$BOOT_MODE" "$file"
fi
fi
# Enable secure boot on multi-socket systems to workaround freeze
if [ -n "$SOCKETS" ] && [[ "$SOCKETS" != "1" ]]; then
BOOT_MODE="windows_secure"
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
file="$STORAGE/windows.mode"
writeFile "$BOOT_MODE" "$file"
fi
fi
fi
if [ -n "${ARGS:-}" ]; then
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
echo "$ARGS" > "$STORAGE/windows.args"
file="$STORAGE/windows.args"
writeFile "$ARGS" "$file"
fi
if [ -n "${VGA:-}" ] && [[ "${VGA:-}" != "virtio"* ]]; then
echo "$VGA" > "$STORAGE/windows.vga"
file="$STORAGE/windows.vga"
writeFile "$VGA" "$file"
fi
if [ -n "${USB:-}" ] && [[ "${USB:-}" != "qemu-xhci"* ]]; then
echo "$USB" > "$STORAGE/windows.usb"
file="$STORAGE/windows.usb"
writeFile "$USB" "$file"
fi
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
echo "$DISK_TYPE" > "$STORAGE/windows.type"
file="$STORAGE/windows.type"
writeFile "$DISK_TYPE" "$file"
fi
if [ -n "${ADAPTER:-}" ] && [[ "${ADAPTER:-}" != "virtio-net-pci" ]]; then
echo "$ADAPTER" > "$STORAGE/windows.net"
file="$STORAGE/windows.net"
writeFile "$ADAPTER" "$file"
fi
rm -rf "$TMP"
@@ -340,7 +379,7 @@ extractESD() {
local version="$3"
local desc="$4"
local size size_gb sizes space space_gb
local desc total total1 total2 total3 total4
local retVal total total1 total2 total3 total4
local imageIndex links links1 links2 links3 links4
local msg="Extracting $desc bootdisk"
@@ -351,7 +390,10 @@ extractESD() {
fi
rm -rf "$dir"
mkdir -p "$dir"
if ! makeDir "$dir"; then
error "Failed to create directory \"$dir\" !" && return 1
fi
size=9606127360
size_gb=$(formatBytes "$size")
@@ -407,6 +449,8 @@ extractESD() {
error "Adding WinPE failed ($retVal)" && return 1
}
fKill "progress.sh"
local msg="Extracting $desc setup"
info "$msg..."
@@ -414,9 +458,9 @@ extractESD() {
/run/progress.sh "$bootWimFile" "$total3" "$msg ([P])..." &
wimlib-imagex export "$iso" "$imageIndex" "$bootWimFile" --compress=none --boot --quiet || {
retVal=$?
fKill "progress.sh"
error "Adding Windows Setup failed ($retVal)" && return 1
retVal=$?
fKill "progress.sh"
error "Adding Windows Setup failed ($retVal)" && return 1
}
fKill "progress.sh"
@@ -486,14 +530,17 @@ extractImage() {
info "$msg..." && html "$msg..."
rm -rf "$dir"
mkdir -p "$dir"
if ! makeDir "$dir"; then
error "Failed to create directory \"$dir\" !" && return 1
fi
size=$(stat -c%s "$iso")
size_gb=$(formatBytes "$size")
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
space_gb=$(formatBytes "$space")
if ((size<100000000)); then
if (( size < 100000000 )); then
error "Invalid ISO file: Size is smaller than 100 MB" && return 1
fi
@@ -547,7 +594,7 @@ getPlatform() {
case "${arch,,}" in
"0" ) platform="x86" ;;
"9" ) platform="x64" ;;
"12" )platform="arm64" ;;
"12" ) platform="arm64" ;;
esac
echo "$platform"
@@ -846,12 +893,12 @@ updateXML() {
pw=$(printf '%s' "${pass}Password" | iconv -f utf-8 -t utf-16le | base64 -w 0)
admin=$(printf '%s' "${pass}AdministratorPassword" | iconv -f utf-8 -t utf-16le | base64 -w 0)
sed -i "s/<Value>password<\/Value>/<Value>$admin<\/Value>/g" "$asset"
sed -i "s/<PlainText>true<\/PlainText>/<PlainText>false<\/PlainText>/g" "$asset"
sed -z "s/<Password>...........<Value \/>/<Password>\n <Value>$pw<\/Value>/g" -i "$asset"
sed -z "s/<Password>...............<Value \/>/<Password>\n <Value>$pw<\/Value>/g" -i "$asset"
sed -z "s/<AdministratorPassword>...........<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset"
sed -z "s/<AdministratorPassword>...............<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset"
sed -i "s|<Value>password<\/Value>|<Value>$admin<\/Value>|g" "$asset"
sed -i "s|<PlainText>true<\/PlainText>|<PlainText>false<\/PlainText>|g" "$asset"
sed -i -z "s|<Password>...........<Value \/>|<Password>\n <Value>$pw<\/Value>|g" "$asset"
sed -i -z "s|<Password>...............<Value \/>|<Password>\n <Value>$pw<\/Value>|g" "$asset"
sed -i -z "s|<AdministratorPassword>...........<Value \/>|<AdministratorPassword>\n <Value>$admin<\/Value>|g" "$asset"
sed -i -z "s|<AdministratorPassword>...............<Value \/>|<AdministratorPassword>\n <Value>$admin<\/Value>|g" "$asset"
if [ -n "$EDITION" ]; then
[[ "${EDITION^^}" == "CORE" ]] && EDITION="STANDARDCORE"
@@ -968,12 +1015,13 @@ addDrivers() {
addDriver "$version" "$drivers" "$target" "vioserial" || return 1
addDriver "$version" "$drivers" "$target" "qemupciserial" || return 1
local dst="$src/\$OEM\$/\$\$/Drivers"
mkdir -p "$dst" || return 1
cp -Lr "$dest/." "$dst" || return 1
case "${version,,}" in
"win11x64"* | "win2025"* )
# Workaround Virtio GPU driver bug
local dst="$src/\$OEM\$/\$\$/Drivers"
mkdir -p "$dst" || return 1
cp -Lr "$dest/." "$dst" || return 1
rm -rf "$dest/viogpudo"
;;
esac
@@ -1170,13 +1218,15 @@ buildImage() {
error "Failed to build image!" && return 1
fi
local error=""
local err=""
local hide="Warning: creating filesystem that does not conform to ISO-9660."
[ -s "$log" ] && error="$(<"$log")"
[[ "$error" != "$hide" ]] && echo "$error"
[ -s "$log" ] && err="$(<"$log")"
[[ "$err" != "$hide" ]] && echo "$err"
mv -f "$out" "$BOOT" || return 1
! setOwner "$BOOT" && error "Failed to set the owner for \"$BOOT\" !"
return 0
}
+65 -17
View File
@@ -49,7 +49,7 @@ handle_curl_error() {
get_agent() {
local user_agent
local browser_version
# Determine approximate latest Firefox release
browser_version="$((124 + ($(date +%s) - 1710892800) / 2419200))"
@@ -83,7 +83,6 @@ download_windows() {
case "${id,,}" in
"win11x64" ) windows_version="11" && download_type="1" ;;
"win10x64" ) windows_version="10" && download_type="1" ;;
"win11arm64" ) windows_version="11arm64" && download_type="2" ;;
* ) error "Invalid VERSION specified, value \"$id\" is not recognized!" && return 1 ;;
esac
@@ -115,15 +114,65 @@ download_windows() {
return 1
fi
[[ "$DEBUG" == [Yy1]* ]] && echo "Permit Session ID: $session_id"
# Microsoft download "protection" requires the sessionId to be whitelisted through vlscppe.microsoft.com/tags
org_id="y6jn8c31"
vls_url="https://vlscppe.microsoft.com/tags?org_id=$org_id&session_id=$session_id"
[[ "$DEBUG" == [Yy1]* ]] && echo "Getting Session ID: $session_id"
# Permit Session ID
curl --silent --max-time 30 --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || {
curl --silent --max-time 30 --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$vls_url" || {
# This should only happen if there's been some change to how this API works
handle_curl_error "$?" "Microsoft"
return $?
}
# Microsoft download "protection" also requires an ov-df.microsoft.com request/reply
# 1) Request mdt.js to get w and rticks. InstanceId is (currently) constant.
instance_id="560dc9f3-1aa5-4a2f-b63c-9e18f8d0e175"
ov_url="https://ov-df.microsoft.com/mdt.js?instanceId=$instance_id&PageId=si&session_id=$session_id"
[[ "$DEBUG" == [Yy1]* ]] && echo -n "Getting OV data: "
ov_data=$(curl --silent --max-time 30 --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$ov_url") || {
handle_curl_error "$?" "Microsoft"
return $?
}
if [[ $ov_data =~ [\?\&]w=([A-Fa-f0-9]+) ]]; then
ovw="${BASH_REMATCH[1]}"
fi
if [[ $ov_data =~ rticks=\"\+?([0-9]+) ]]; then
rticks="${BASH_REMATCH[1]}"
fi
if [[ -z $ovw || -z $rticks ]]; then
error "Could not extract ov-df data from Microsoft server!"
return 1
fi
[[ "$DEBUG" == [Yy1]* ]] && echo "$ovw"
sleep 0.2
# 2) Send a reply with session ID, current epoch and previously retrieved w and rticks
mdt=$(date +%s%3N)
ov_url="https://ov-df.microsoft.com/?session_id=$session_id&CustomerId=$instance_id&PageId=si&w=$ovw&mdt=$mdt&rticks=$rticks"
[[ "$DEBUG" == [Yy1]* ]] && echo "Sending OV reply: $instance_id"
curl --silent --max-time 30 --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$ov_url" || {
# This should only happen if there's been some change to how this API works
handle_curl_error "$?" "Microsoft"
return $?
}
[[ "$DEBUG" == [Yy1]* ]] && echo -n "Getting language SKU ID: "
sku_url="https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=$profile&ProductEditionId=$product_edition_id&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id"
language_skuid_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$sku_url") || {
handle_curl_error "$?" "Microsoft"
@@ -166,7 +215,7 @@ download_windows() {
{ iso_download_link=$(echo "$iso_json" | jq --argjson TYPE "$download_type" -r '.ProductDownloadOptions[] | select(.DownloadType==$TYPE).Uri') 2>/dev/null; rc=$?; } || :
if [ -z "$iso_download_link" ] || [[ "${iso_download_link,,}" == "null" ]] || (( rc != 0 )); then
error "Microsoft servers gave us no download link to our request for an automated download!"
error "Microsoft server gave us no download link to our request for an automated download!"
info "Response: $iso_json"
return 1
fi
@@ -198,12 +247,6 @@ download_windows_eval() {
"win11${PLATFORM,,}-enterprise-ltsc-eval" )
enterprise_type="iot"
windows_version="windows-11-iot-enterprise-ltsc-eval" ;;
"win10${PLATFORM,,}-enterprise-eval" )
enterprise_type="enterprise"
windows_version="windows-10-enterprise" ;;
"win10${PLATFORM,,}-enterprise-ltsc-eval" )
enterprise_type="ltsc"
windows_version="windows-10-enterprise" ;;
"win2025-eval" )
enterprise_type="server"
windows_version="windows-server-2025" ;;
@@ -230,6 +273,7 @@ download_windows_eval() {
culture=$(getLanguage "$lang" "culture")
local country="${culture#*-}"
local iso_download_links=""
local iso_download_page_html=""
local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
@@ -349,7 +393,8 @@ getWindows() {
info "$msg" && html "$msg"
case "${version,,}" in
"win2008r2" | "win81${PLATFORM,,}"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
"win2008r2" | "win81${PLATFORM,,}"* | "win10${PLATFORM,,}-enterprise"* | \
"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
@@ -367,16 +412,16 @@ getWindows() {
esac
case "${version,,}" in
"win10${PLATFORM,,}" | "win11${PLATFORM,,}" )
"win11${PLATFORM,,}" )
download_windows "$version" "$lang" "$edition" && return 0
;;
"win11${PLATFORM,,}-enterprise"* | "win10${PLATFORM,,}-enterprise"* )
"win11${PLATFORM,,}-enterprise"* )
download_windows_eval "$version" "$lang" "$edition" && return 0
;;
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2019-hv" | "win2016-eval" | "win2012r2-eval" )
download_windows_eval "$version" "$lang" "$edition" && return 0
;;
"win81${PLATFORM,,}-enterprise"* | "win2008r2" )
"win2008r2" | "win81${PLATFORM,,}"* | "win10${PLATFORM,,}-enterprise"* )
;;
* ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;;
esac
@@ -483,11 +528,14 @@ getESD() {
error "Invalid VERSION specified, value \"$version\" is not recognized!" && return 1
fi
local msg="Downloading catalog..."
local msg="Downloading catalog from the Microsoft servers..."
info "$msg" && html "$msg"
rm -rf "$dir"
mkdir -p "$dir"
if ! makeDir "$dir"; then
error "Failed to create directory \"$dir\" !" && return 1
fi
local xFile="products.xml"
local eFile="esd_edition.xml"
+17 -21
View File
@@ -6,8 +6,6 @@ set -Eeuo pipefail
# Configure QEMU for graceful shutdown
QEMU_TERM=""
QEMU_DIR="/run/shm"
QEMU_PID="$QEMU_DIR/qemu.pid"
QEMU_PTY="$QEMU_DIR/qemu.pty"
QEMU_LOG="$QEMU_DIR/qemu.log"
QEMU_OUT="$QEMU_DIR/qemu.out"
@@ -76,6 +74,12 @@ finish() {
local pid
local cnt=0
local reason=$1
local pids=(
"/var/run/tpm.pid"
"/var/run/wsdd.pid"
"/var/run/samba/nmbd.pid"
"/var/run/samba/smbd.pid"
)
touch "$QEMU_END"
@@ -93,7 +97,7 @@ finish() {
# Workaround for zombie pid
[ ! -s "$QEMU_PID" ] && break
if [ "$cnt" == "5" ]; then
if [ "$cnt" -eq 5 ]; then
echo && error "QEMU did not terminate itself, forcefully killing process..."
{ kill -9 "$pid" || true; } 2>/dev/null
fi
@@ -105,28 +109,21 @@ finish() {
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
# Remove CD-ROM ISO after install
if ready; then
touch "$STORAGE/windows.boot"
local file="$STORAGE/windows.boot"
touch "$file"
! setOwner "$file" && error "Failed to set the owner for \"$file\" !"
if [[ "$REMOVE" != [Nn]* ]]; then
rm -f "$BOOT" 2>/dev/null || true
fi
fi
fi
pid="/var/run/tpm.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"
rm -f "$pid"
pid="/var/run/wsdd.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"
rm -f "$pid"
pid="/var/run/samba/nmbd.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"
rm -f "$pid"
pid="/var/run/samba/smbd.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"
rm -f "$pid"
for pid in "${pids[@]}"; do
if [[ -s "$pid" ]]; then
pKill "$(cat "$pid")"
fi
rm -f "$pid"
done
closeNetwork
@@ -234,8 +231,7 @@ _graceful_shutdown() {
}
SERIAL="pty"
MONITOR="telnet:localhost:$MON_PORT,server,nowait,nodelay"
MONITOR+=" -daemonize -D $QEMU_LOG -pidfile $QEMU_PID"
MONITOR="telnet:localhost:$MON_PORT,server,nowait,nodelay -daemonize -D $QEMU_LOG"
_trap _graceful_shutdown SIGTERM SIGHUP SIGINT SIGABRT SIGQUIT
+18 -12
View File
@@ -46,10 +46,21 @@ addShare() {
local cfg="$5"
local owner=""
mkdir -p "$dir" || return 1
if [ ! -d "$dir" ]; then
if ! mkdir -p "$dir"; then
error "Failed to create shared folder ($dir)." && return 1
fi
fi
if ! ls -A "$dir" >/dev/null 2>&1; then
error "Failed to access directory $dir" && return 1
msg="No permission to access shared folder ($dir)."
msg+=" If SELinux is active, you need to add the \":Z\" flag to the bind mount."
error "$msg" && return 1
fi
if [ ! -w "$dir" ]; then
msg="shared folder ($dir) is not writeable!"
warn "$msg"
fi
if [ -z "$(ls -A "$dir")" ]; then
@@ -136,26 +147,21 @@ share="/shared"
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
[ ! -d "$share" ] && share="$tmp"
m1="Failed to add shared folder"
m2="Please check its permissions."
if ! addShare "$share" "/shared" "Data" "Shared" "$SAMBA_CONFIG"; then
error "$m1 '$share'. $m2" && return 0
fi
! addShare "$share" "/shared" "Data" "Shared" "$SAMBA_CONFIG" && return 0
if [ -d "/shared2" ]; then
addShare "/shared2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || error "$m1 '/shared2'. $m2"
addShare "/shared2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || :
else
if [ -d "/data2" ]; then
addShare "/data2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || error "$m1 '/data2'. $m2."
addShare "/data2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || :
fi
fi
if [ -d "/shared3" ]; then
addShare "/shared3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || error "$m1 '/shared3'. $m2"
addShare "/shared3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || :
else
if [ -d "/data3" ]; then
addShare "/data3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || error "$m1 '/data3'. $m2"
addShare "/data3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || :
fi
fi