Windows server 2025 unattended iso issues known?

johnski001

New Member
Apr 2, 2025
1
1
1
Hello everyone,

I have this issue with installing Window Server 2025 unattended.
I know how to set this process up because the same workflow works with Windows Server 2022.

We load the standard Microsoft Windows server iso, also the iso with the unattended file and the scsi drivers are loaded properly. 2022 installs automatically as we want it.
Now, when applying the same process with an updated unattended.xml file for 2025 it does not work.
I know that:

- SCSI drivers are loaded properly
- The unattended file is read

The issue is that the partitions are made but the 2025 installer stops at the screen where you have to specify the partition where to install (partitions are made and the correct partition is preselected). You have to click on next to start the installation process.

In hyper-V everything is working as expected. Does anyone know where to look?
 
  • Like
Reactions: rocha.best
Hello everyone,

I have this issue with installing Window Server 2025 unattended.
I know how to set this process up because the same workflow works with Windows Server 2022.

We load the standard Microsoft Windows server iso, also the iso with the unattended file and the scsi drivers are loaded properly. 2022 installs automatically as we want it.
Now, when applying the same process with an updated unattended.xml file for 2025 it does not work.
I know that:

- SCSI drivers are loaded properly
- The unattended file is read

The issue is that the partitions are made but the 2025 installer stops at the screen where you have to specify the partition where to install (partitions are made and the correct partition is preselected). You have to click on next to start the installation process.

In hyper-V everything is working as expected. Does anyone know where to look?
Hi

Same issue here.

I have made few tests on the same environment.

First, the Installation Wizard does not detect disks.

I change the unattended file to look for VirtIO SCSI Controller driver on specific folder (\amd64\2k25\) inside CD/DVD Drive (which has virtio.iso mounted on it)

Now server 2025 recognizes the disk, but stuck at "Select location to install WIndows Server"

Captura de tela 2025-05-16 133004.png

If I click "Bring Disk Online", and click next, it works.


Things I have tried

Disable Cache on disk - no success
Install server 2022 (with brand new unattended.xml file created for Server 2022 using WISM (from Microsoft) - it works flawless
Install server 2019 (with brand new unattended.xml file created for Server 2019 using WISM (from Microsoft) - it works flawless

New Attempt to install Server 2025 - same issue

I detach the VM Disk and attached it again using VirtIO Block BUS (instead of SCSI) - same issue
After that, I detach the VM Disk and attached it again using IDE BUS (instead of SCSI) - it works
Finally, I detach the VM Disk and attached it again using SATA Bus (instead of SCSI) - it works.


Just to keep it clear, if I do a regular (non unnatended) installation, after load VirtIO SCSI Drivers and select disk, it works fine.
 
Last edited:
Works here with drivers put into folder $WinpeDriver$ created at root of the iso.
Windows Setup will load and install these automatically, nothing to do in the AutoUnattend.xml
 
Hi

Same issue here.

I have made few tests on the same environment.

First, the Installation Wizard does not detect disks.

I change the unattended file to look for VirtIO SCSI Controller driver on specific folder (\amd64\2k25\) inside CD/DVD Drive (which has virtio.iso mounted on it)

Now server 2025 recognizes the disk, but stuck at "Select location to install WIndows Server"

View attachment 86109

If I click "Bring Disk Online", and click next, it works.


Things I have tried

Disable Cache on disk - no success
Install server 2022 (with brand new unattended.xml file created for Server 2022 using WISM (from Microsoft) - it works flawless
Install server 2019 (with brand new unattended.xml file created for Server 2019 using WISM (from Microsoft) - it works flawless

New Attempt to install Server 2025 - same issue

I detach the VM Disk and attached it again using VirtIO Block BUS (instead of SCSI) - same issue
After that, I detach the VM Disk and attached it again using IDE BUS (instead of SCSI) - it works
Finally, I detach the VM Disk and attached it again using SATA Bus (instead of SCSI) - it works.


Just to keep it clear, if I do a regular (non unnatended) installation, after load VirtIO SCSI Drivers and select disk, it works fine.
Same Issue with VirtioBlock but work with SATA and IDE
Works here with drivers put into folder $WinpeDriver$ created at root of the iso.
That dont answer the issue, its not a driver problem but a autounattend issue only with WS2025
 
I found a solution but you need to modify registry in the ISO boot.wim

dism /Mount-Wim /WimFile:C:\Users\someuser\Desktop\WS2025_ISO_Custom\sources\boot.wim /index:2 /MountDir:C:\Users\someuser\Desktop\WinPE_Work\mount
mkdir C:\Users\someuser\Desktop\WinPE_Work\mount
dism /Image:C:\Users\someuser\Desktop\WinPE_Work\mount /Add-Driver /Driver:E:\amd64\2k25 /Recurse
dism /Unmount-Wim /mountdir:C:\Users\someuser\Desktop\WinPE_Work\mount /Commit
reg load HKLM\WimSys C:\Users\someuser\Desktop\WinPE_Work\mount\Windows\System32\config\SYSTEM
reg add "HKLM\WimSys\ControlSet001\Services\partmgr\Parameters" /v SanPolicy /t REG_DWORD /d 1 /f
reg unload "HKLM\WimSys"
cd "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg"
.\Oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bC:\Users\someuser\Desktop\WS2025_ISO_Custom\boot\etfsboot.com#pEF,e,bC:\Users\someuser\Desktop\WS2025_ISO_Custom\efi\microsoft\boot\efisys.bin -h C:\Users\someuser\Desktop\WS2025_ISO_Custom C:\Users\someuser\Desktop\WS2025_DATACENTER.ISO

also there is a bug problem for format disk, you can hook this with RunSynchronousCommand

Order 1
cmd /c "(echo select disk 0 & echo clean & echo convert GPT & echo create partition efi size=300 & echo format quick fs=FAT32 label=System) | diskpart"
Order 2
cmd /c "(echo select disk 0 & echo create partition msr size=16) | diskpart"
Order 3
cmd /c "(echo select disk 0 & echo create partition primary & echo format quick fs=ntfs label=Windows) | diskpart"

I write a script if that can help :

Code:
function Get-ValidResponse {
    param (
        [string]$Question,
        [string[]]$AllowedResponses
    )
    while ($true) {
        Write-Host $Question -ForegroundColor Green
        $Response = Read-Host " "
        if ($AllowedResponses -contains $Response.ToLower()) {
            return $Response.ToLower()
        } else {
            Write-Host "Please answer with one of the following: $($AllowedResponses -join ', ')." -ForegroundColor Red
        }
    }
}

$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + " (Administrator)"
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator"))
{Start-Process PowerShell.exe -ArgumentList ("-NoProfile -ExecutionPolicy Bypass -File `"{0}`"" -f $PSCommandPath) -Verb RunAs
Exit}
Write-Host "Fill Windows Server 2025 ISO Path"
$ISOPath = Read-Host " "
Write-Host "Fill Driver Folder"
$DriverDir = Read-Host " "
Write-Host "Fill Autounattend.xml Path"
$AutounattendFile = Read-Host " "
Write-Host "Index 1 : Windows Server 2025 Standard Evaluation"
Write-Host "Index 2 : Windows Server 2025 Standard Evaluation (Desktop Experience)"
Write-Host "Index 3 : Windows Server 2025 Datacenter Evaluation"
Write-Host "Index 4 : Windows Server 2025 Datacenter Evaluation (Desktop Experience)"
$IndexNumber = Get-ValidResponse "Specify Index number [1|2|3|4]" @('1', '2', '3', '4') -ForegroundColor Green
$WorkDir = Join-Path $env:HOMEDRIVE $env:HOMEPATH
$DefaultISODir = "$WorkDir\Default"
$CustomISODir = "$WorkDir\Custom"
$MountBootDir = "$WorkDir\Boot"
$OscdimgExe = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe"
$OutISOFile = "$WorkDir\MY.iso"
if (Test-Path $DefaultISODir) {
    Write-Host "$DefaultISODir exit so lets use it" -ForegroundColor Yellow
} else {
    if (Test-Path $ISOPath ) {
        echo $ISOPath
        try {
            $MountResult = Mount-DiskImage -ImagePath $ISOPath -ErrorAction Stop
        } catch {
            Write-Host "Mount $ISOPath Failed" -ForegroundColor Red
            break
        }
        mkdir $DefaultISODir > null
        $DriveLetter = ($MountResult | Get-Volume).DriveLetter
        $DevicePath = ($MountResult | Get-Volume).DevicePath
        Copy-Item -Path "$DriveLetter`:`\*" -Destination $DefaultISODir -Recurse
        Dismount-DiskImage -DevicePath $MountResult.DevicePath > null
    } else {
        Write-Host "$ISOPath not found" -ForegroundColor Red
    }
}
if (Test-Path $CustomISODir) {
    Write-Host "$CustomISODir exit please remove it" -ForegroundColor Red
    break
} elseif ((Test-Path $AutounattendFile) -and (Test-Path $DriverDir)) {
    mkdir $CustomISODir > null
    Copy-Item -Path "$DefaultISODir`\*" -Destination $CustomISODir -Recurse
    Copy-Item -Path $AutounattendFile -Destination "$CustomISODir\autounattend.xml"
    move "$CustomISODir`\efi`\microsoft`\boot`\efisys.bin" "$CustomISODir`\efi`\microsoft`\boot`\efisys.bin.old"
    copy "$CustomISODir`\efi`\microsoft`\boot`\efisys_noprompt.bin" "$CustomISODir`\efi`\microsoft`\boot`\efisys.bin"
    mkdir $MountBootDir > null
    Set-ItemProperty -Path "$CustomISODir`\sources`\boot.wim" -Name IsReadOnly -Value $false
    dism /Mount-Wim /WimFile:"$CustomISODir`\sources`\boot.wim" /index:2 /MountDir:"$MountBootDir"
    dism /Image:$MountBootDir /Add-Driver /Driver:"$DriverDir" /Recurse
    reg load HKLM\WimSys "$MountBootDir\Windows\System32\config\SYSTEM"
    reg add "HKLM\WimSys\ControlSet001\Services\partmgr\Parameters" /v SanPolicy /t REG_DWORD /d 1 /f
    reg unload "HKLM\WimSys"
    dism /Unmount-Wim /mountdir:$MountBootDir /Commit
    Set-ItemProperty -Path "$CustomISODir`\sources`\install.wim" -Name IsReadOnly -Value $false
    dism /Mount-Wim /WimFile:"$CustomISODir`\sources`\install.wim" /index:$IndexNumber /MountDir:"$MountBootDir"
    dism /Image:$MountBootDir /Add-Driver /Driver:"$DriverDir" /Recurse
    reg load HKLM\WimSys "$MountBootDir\Windows\System32\config\SYSTEM"
    reg add "HKLM\WimSys\ControlSet001\Services\partmgr\Parameters" /v SanPolicy /t REG_DWORD /d 1 /f
    reg unload "HKLM\WimSys"
    dism /Unmount-Wim /mountdir:$MountBootDir /Commit
    & $OscdimgExe -m -o -u2 -udfver102 -bootdata:2#p0,e,b$CustomISODir\boot\etfsboot.com#pEF,e,b$CustomISODir\efi\microsoft\boot\efisys.bin -h $CustomISODir $OutISOFile
    Remove-Item $CustomISODir -Force -Recurse
    Remove-Item $MountBootDir -Force -Recurse
}
Write-Host "Finish" -ForegroundColor Green

Here is my autounattend.xml

XML:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>fr-FR</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" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ImageInstall>
                <OSImage>
                    <InstallFrom>
                        <MetaData wcm:action="add">
                            <Key>/IMAGE/INDEX</Key>
                            <Value>3</Value>
                        </MetaData>
                    </InstallFrom>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>3</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
            <UserData>
                <AcceptEula>true</AcceptEula>
                <FullName>AutomationName</FullName>
                <Organization>AutomationORG</Organization>
            </UserData>
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Path>cmd /c &quot;(echo select disk 0 &amp; echo online disk &amp; echo clean &amp; echo attributes disk clear readonly &amp; echo convert GPT) | diskpart&quot;</Path>
                    <Order>1</Order>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Path>cmd /c &quot;(echo select disk 0 &amp; echo create partition efi size=512 &amp; echo format quick fs=FAT32 label=System) | diskpart&quot;</Path>
                    <Order>2</Order>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Path>cmd /c &quot;(echo select disk 0 &amp; echo create partition msr size=128) | diskpart&quot;</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>4</Order>
                    <Path>cmd /c &quot;(echo select disk 0 &amp; echo create partition primary &amp; echo format quick fs=ntfs label=Windows) | diskpart&quot;</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command E:\boot1.ps1 &gt; %SystemRoot%\boot1.log</CommandLine>
                    <Description>Execute boot1.ps1</Description>
                    <Order>1</Order>
                    <RequiresUserInput>true</RequiresUserInput>
                </SynchronousCommand>
            </FirstLogonCommands>
        </component>
    </settings>
    <settings pass="offlineServicing">
        <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <EnableLUA>false</EnableLUA>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:c:/users/someuser/ws2025_iso_custom/sources/install.wim#Windows Server 2025 SERVERDATACENTERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
 
Last edited:
Works here with drivers put into folder $WinpeDriver$ created at root of the iso.
That dont answer the issue, its not a driver problem but a autounattend issue only with WS2025
I don't see issue here , I confirm putting drivers into $WinpeDriver$ root folder of iso works here , using AutoUnattend.xml ( without works too ).
 
Last edited:
I don't see issue here , I confirm putting drivers into $WinpeDriver$ root folder of iso works here , using AutoUnattend.xml ( without works too ).
The issue is the disk is not online because virtio SCSI or virtio block is used and WS2025 put it offline because of SanPolicy. Any Synchronous command dont resolve it (if you try to put it online with diskpart). Look the screenshot
 
Last edited: