Windows 11 25H2
Windows 11 25H2 VM creation on a Linux host using KVM
This process gives us a fairly minimal UEFI based Windows 11 25H2 running under KVM. This process has only been tested on Fedora Linux.
Define the VM name and location
Note that the Windows 11 VM requires UEFI boot so that the TPM module can be emulated!
::: note
Note that no network is provisioned by default during OS install so as to prevent the forcing of a Microsoft login account upon the clean install.
See: https://www.tomshardware.com/how-to/install-windows-11-without-microsoft-account
:::
# Define the new VM name:
export VMNAME="windows11-01"
mkdir -p ~/VMs/"${VMNAME}"
cd ~/VMs/"${VMNAME}"
# Set a custom folder icon with GNOME:
gio set -t string ${HOME}/VMs/${VMNAME} metadata::custom-icon file://${HOME}/Pictures/icons/folder-windows-11.png
# No VHD available, only ISO, so we need to install the OS to a clean OS disk
# Make qcow file for the C: drive for a clean OS install - Minimum of 52GB
qemu-img create -f qcow2 "${HOME}/VMs/${VMNAME}/${VMNAME}-c.qcow2" "64G"
# Create the VM:
virt-install \
--connect qemu:///session \
--hvm \
--name "${VMNAME}" \
--memory "8192" \
--vcpus "2" \
--disk path="${HOME}/VMs/${VMNAME}/${VMNAME}-c.qcow2",bus=virtio \
--disk path="${HOME}/VMs/ISOs/Windows/Windows_11/26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",device=cdrom \
--disk path="${HOME}/VMs/ISOs/Windows/VirtIO-Win/latest/virtio-win-0.1.285.iso",device=cdrom \
--os-variant "win11" \
--graphics spice \
--network none \
--boot uefi \
--noautoconsole \
--import
Installing VirtIO drivers
During the OS install the installer will not be able to see the system disk and you will need to add the VirtIO disk driver. TODO_ADD_IMAGE TODO_ADD_IMAGE TODO_ADD_IMAGE Continue the OS install as normal, you will be prompted to setup a local user since no internet connection is available. (Store this login info in the Password Manager - See the entry named: Local KVM based Windows VMs) Run the following application from the second DVD drive (E:) and accept all the defaults:
virtio-win-guest-tools
TODO_ADD_IMAGE Eject the ISO from the VM when the install has completed and shut down the system. We can now add an active NIC to the system to put it on the network and allow it to download patches etc.
# Add a network bridge to the VM:
virsh attach-interface \
--domain "${VMNAME}" \
--type bridge \
--source virbr0 \
--model virtio \
--config
You can now turn the VM back on.
Desktop Optimization
Set the desktop resolution to: 2560 x 1600 at 150% scale. Run the PowerShell script at: Set background colors for Windows desktops to set the intended desktop color.
Remove Sign-In Screen Wallpaper
Settings → Personalization → Lock screen
- Personalize your lock screen
- Pick the default windows wallpaper
- Disable: Get fun facts, tips, tricks, and more on your lock screen
- Lock screen status: None
- Disable: Show the lock screen background picture on the sign-in screen
Set the hostname
Set the hostname via an administrative level PowerShell instance:
Rename-Computer -NewName "windows11-01"
A system restart will be required for this to take effect, but do not reboot yet!
Set the time zone
Run the tzutil CLI utility in an administrative level PowerShell instance:
tzutil /s "Eastern Standard Time"
Ensure the system clock matches wall time after setting this.
Windows Update
Settings → Windows Update Install all available updates and reboot. This step may have to be run 3 times to get all of the updates installed. Continue until no more updates are available.
Installing PowerShell 7
Install the latest available version of PowerShell on Windows Server 2025, this installs to: C:\Program Files\PowerShell\7
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') } -useMSI -Quiet -EnablePSRemoting"
There will be a new PowerShell 7 (x64) item on the Start Menu. In the Windows Terminal app, open Settings → Startup → Default Profile → PowerShell → Save → Close to set PowerShell 7 as the default terminal.
Do NOT install PowerShell from the Windows Store as if you do the install will end up in the users %LOCALAPPDATA%\Microsoft\WindowsApps\ folder and is only usable by the user that installed it.
Install POSH
See: Installing OhMyPosh / Powerline on your local Windows 11 system
Install Git etc.
Here we’ll install a few basic utilities to make our life easier:
# Install Git
winget install -e --source winget --id Microsoft.Git
# Install Notepad++
winget install -e --source winget --id Notepad++.Notepad++
# Install Zed (Advanced text editor) - Optional
# winget install -e --source winget --id ZedIndustries.Zed
# Install Nano for Windows (CLI text editor) - Optional
# winget install -e --source winget --id okibcn.nano
# Install 7-Zip
winget install -e --source winget --id 7zip.7zip
# Install WinSCP
winget install -e --source winget --id WinSCP.WinSCP
# Install the Sysinternals Suite
winget install -e --source winget --id Microsoft.Sysinternals.Suite
See also: Base applications install on Windows 11
Install marcosnils/bin for managing random binaries
bin is a lightweight, cross-platform binary manager that simplifies downloading, installing, and managing binaries without requiring root privileges. See the doc at: bin - Effortless binary manager
Uninstall PowerShell ISE
This tool does not support PowerShell 7 therefore it should be removed from the system and its usage discouraged.
DISM /Online /Remove-Capability /CapabilityName:Microsoft.Windows.PowerShell.ISE~~~~0.0.1.0
Expected response:
Deployment Image Servicing and Management tool
Version: 10.0.26100.5074
Image Version: 10.0.26100.32690
[==========================100.0%==========================]
The operation completed successfully.
Optional Installs
Installing IIS
Install-WindowsFeature -name Web-Server -IncludeManagementTools
Expected response:
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No Success {Common HTTP Features, Default Document, Dir…
Verify what features are installed:
Get-WindowsFeature | Where-Object {$_.Installed -eq $true} | Format-Table Name, InstallState
Expected result:
Name InstallState
---- ------------
FileAndStorage-Services Installed
Storage-Services Installed
Web-Server Installed
Web-WebServer Installed
Web-Common-Http Installed
Web-Default-Doc Installed
Web-Dir-Browsing Installed
Web-Http-Errors Installed
Web-Static-Content Installed
Web-Health Installed
Web-Http-Logging Installed
Web-Performance Installed
Web-Stat-Compression Installed
Web-Security Installed
Web-Filtering Installed
Web-Mgmt-Tools Installed
Web-Mgmt-Console Installed
NET-Framework-45-Features Installed
NET-Framework-45-Core Installed
NET-WCF-Services45 Installed
NET-WCF-TCP-PortSharing45 Installed
Windows-Defender Installed
System-DataArchiver Installed
WindowsAdminCenterSetup Installed
PowerShellRoot Installed
PowerShell Installed
Wireless-Networking Installed
WoW64-Support Installed
XPS-Viewer Installed