Initial commit: Packer + QEMU/KVM Windows 11 minimal VM

Fully unattended Windows 11 Pro build using Autounattend.xml, swtpm
for TPM 2.0 emulation, and VirtIO drivers. Five PowerShell provisioners
strip bloatware, telemetry, unused services, and apply performance tuning
for a resource-constrained host. Output is a compressed QCOW2 image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 19:31:18 -05:00
commit e4741ccc96
12 changed files with 980 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
#Requires -RunAsAdministrator
$apps = @(
# Microsoft bloat
"Microsoft.3DBuilder",
"Microsoft.BingFinance",
"Microsoft.BingNews",
"Microsoft.BingSearch",
"Microsoft.BingSports",
"Microsoft.BingTranslator",
"Microsoft.BingWeather",
"Microsoft.GetHelp",
"Microsoft.Getstarted",
"Microsoft.GamingApp",
"Microsoft.Microsoft3DViewer",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.MicrosoftSolitaireCollection",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.MixedReality.Portal",
"Microsoft.Office.OneNote",
"Microsoft.People",
"Microsoft.PowerAutomateDesktop",
"Microsoft.Print3D",
"Microsoft.SkypeApp",
"Microsoft.Todos",
"Microsoft.WindowsAlarms",
"Microsoft.WindowsCamera",
"Microsoft.windowscommunicationsapps", # Mail + Calendar
"Microsoft.WindowsFeedbackHub",
"Microsoft.WindowsMaps",
"Microsoft.WindowsPhone",
"Microsoft.WindowsSoundRecorder",
"Microsoft.Whiteboard",
"Microsoft.Windows.DevHome",
# Xbox ecosystem
"Microsoft.Xbox.TCUI",
"Microsoft.XboxApp",
"Microsoft.XboxGameOverlay",
"Microsoft.XboxGamingOverlay",
"Microsoft.XboxIdentityProvider",
"Microsoft.XboxSpeechToTextOverlay",
# Media / entertainment
"Microsoft.ZuneMusic",
"Microsoft.ZuneVideo",
"Clipchamp.Clipchamp",
# Teams personal and Cortana
"MicrosoftTeams",
"Microsoft.549981C3F5F10",
# Phone Link
"Microsoft.YourPhone"
)
foreach ($app in $apps) {
Get-AppxPackage -Name $app -AllUsers -ErrorAction SilentlyContinue |
Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue |
Where-Object { $_.PackageName -like "*$app*" } |
Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
}
# Uninstall OneDrive
Stop-Process -Name OneDrive -Force -ErrorAction SilentlyContinue
$uninstaller = if (Test-Path "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe") {
"$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe"
} else {
"$env:SYSTEMROOT\System32\OneDriveSetup.exe"
}
if (Test-Path $uninstaller) {
Start-Process $uninstaller -ArgumentList "/uninstall" -Wait -ErrorAction SilentlyContinue
}
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v DisableFileSyncNGSC /t REG_DWORD /d 1 /f | Out-Null