none
Server 2019 Unattend File will not work (Automation with 2019/Packer/VMware) RRS feed

  • Question

  • I have an automation using Packer and VMware and I am having trouble with the Server 2019 Unattaned file. Every time my scripts run the OS install hangs on applying disk configuration:

    I have modified the unattend file so many times to correct this I have no idea what can be the issue. All other scripts in this automation process works so its specifically between 2019 and its unattend file. Has anyone had issues with unattends and server 2019?

    Thursday, July 11, 2019 3:18 PM

All replies

  • Could you show the unattaned file?
    Thursday, July 11, 2019 3:38 PM
  • <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <component language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" 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>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UILanguageFallback>en-US</UILanguageFallback>
                <UserLocale>en-US</UserLocale>
            </component>
            <component language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DiskConfiguration>
                    <Disk wcm:action="add">
                        <DiskID>0</DiskID>
                        <WillWipeDisk>true</WillWipeDisk>
                        <CreatePartitions>
                            <CreatePartition wcm:action="add">
                                <Type>Primary</Type>
                                <Size>450</Size>
                                <Order>1</Order>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Type>Primary</Type>
                                <Order>2</Order>
                                <Extend>true</Extend>
                            </CreatePartition>
                        </CreatePartitions>
                        <ModifyPartitions>
                            <ModifyPartition wcm:action="add">
                                <Order>2</Order>
                                <Letter>C</Letter>
                                <Label>OS</Label>
                                <Format>NTFS</Format>
                                <PartitionID>2</PartitionID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Order>1</Order>
                                <PartitionID>1</PartitionID>
                                <Format>NTFS</Format>
                                <Label>System</Label>
                                <Active>true</Active>
                            </ModifyPartition>
                        </ModifyPartitions>
                    </Disk>
                </DiskConfiguration>
            </component>
        </settings>
        <settings pass="specialize">
            <component language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <OEMInformation>
                    <HelpCustomized>false</HelpCustomized>
                </OEMInformation>
                <ComputerName>win2019</ComputerName>
                <TimeZone>UTC</TimeZone>
                <RegisteredOwner />
            </component>
            <component language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
            </component>
            <component language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <IEHardenAdmin>false</IEHardenAdmin>
                <IEHardenUser>false</IEHardenUser>
            </component>
            <component language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SearchScopes>
                    <Scope wcm:action="add">
                        <ScopeDefault>true</ScopeDefault>
                        <ScopeDisplayName>Google</ScopeDisplayName>
                        <ScopeKey>Google</ScopeKey>
                        <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl>
                    </Scope>
                </SearchScopes>
                <DisableAccelerators>true</DisableAccelerators>
                <DisableFirstRunWizard>true</DisableFirstRunWizard>
                <Home_Page>about:blank</Home_Page>
            </component>
            <component language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <fDenyTSConnections>false</fDenyTSConnections>
            </component>
            <component language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <UserAuthentication>0</UserAuthentication>
            </component>
            <component language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <FirewallGroups>
                    <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
                        <Active>true</Active>
                        <Group>Remote Desktop</Group>
                        <Profile>all</Profile>
                    </FirewallGroup>
                </FirewallGroups>
            </component>
            <component language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipAutoActivation>true</SkipAutoActivation>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <AutoLogon>
                    <Password>
                        <Value>dgBhAGcAcgBhAG4AdABQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <Username>vagrant</Username>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
                        <Description>Set Execution Policy 64 Bit</Description>
                        <Order>1</Order>
                        <RequiresUserInput>true</RequiresUserInput>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd.exe /c powershell -File a:\fixnetwork.ps1</CommandLine>
                        <Description>Fix public network</Description>
                        <Order>2</Order>
                        <RequiresUserInput>true</RequiresUserInput>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd.exe /c powershell -Command "Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))"</CommandLine>
                        <Description>Enable WinRM</Description>
                        <Order>3</Order>
                        <RequiresUserInput>true</RequiresUserInput>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd.exe /c reg add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
                        <Description>Network prompt</Description>
                        <Order>4</Order>
                        <RequiresUserInput>true</RequiresUserInput>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE"</CommandLine>
                        <Description>Disable password expiration for vagrant user</Description>
                        <Order>5</Order>
                        <RequiresUserInput>true</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideLocalAccountScreen>true</HideLocalAccountScreen>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                </OOBE>
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>dgBhAGcAcgBhAG4AdABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>dgBhAGcAcgBhAG4AdABQAGEAcwBzAHcAbwByAGQA</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Group>administrators</Group>
                            <DisplayName>Vagrant</DisplayName>
                            <Name>vagrant</Name>
                            <Description>Vagrant User</Description>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <RegisteredOwner />
            </component>
        </settings>
        <settings pass="offlineServicing">
            <component language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" 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="catalog:c:/packerio/iso/svr2019/sources/install_windows server 2019 serverstandard.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    

    Thursday, July 11, 2019 3:54 PM
  • Hi,

    Does the issue occur when we not use any third party software?

    Here is a step by step image configuration with Windows system image manager, please try to check if it is available on your side. Please pay attention to the disk part configuration.

    https://www.tenforums.com/tutorials/96683-create-media-automated-unattended-install-windows-10-a.html

    Note: This is a third-party link and we do not have any guarantees on this website. And Microsoft does not make any guarantees about the content.

    Bests,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    • Edited by Joy-Qiao Friday, July 12, 2019 7:13 AM
    Friday, July 12, 2019 7:13 AM
  • This was one of the links I actually found when trying to fix this problem and I tried both the 4 partition steps and the legacy steps to creating disks. I'm not sure how to test this not using a "third party" as I need this to work for VMware. Packer is the automation script that makes it all happen inside the VM but at this stage, packer is waiting for the OS and autounattend file to finish. I has to be something on the VMware or disk config part of the xml file.
    Friday, July 12, 2019 2:12 PM
  • UPDATE: When using the Autounattend file and deploying Server 2019 to VMWARE workstation on my local machine, it goes right past the disk configuration and moves to installing windows like it should. When I deploy to a vcenter environment however with the same code, it does not. 
    Tuesday, July 16, 2019 3:16 PM