|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<unattend xmlns="urn:schemas-microsoft-com:unattend"> |
| 3 | + <settings pass="windowsPE"> |
| 4 | + <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> |
| 5 | + <DriverPaths> |
| 6 | + <PathAndCredentials wcm:keyValue="2ddfcae9" wcm:action="add"> |
| 7 | + <!-- Install QEMU storage drivers from virtio-win drive --> |
| 8 | + <!-- The drive letter doesn't match the paths user later on, because the primary drive will be inserted as C: after partitioning, shifting all other drive letters a step --> |
| 9 | + <Path>E:\</Path> |
| 10 | + </PathAndCredentials> |
| 11 | + </DriverPaths> |
| 12 | + </component> |
| 13 | + <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> |
| 14 | + <!-- FIXME: Auto-partitioning seems to prevent install from working? --> |
| 15 | + <!-- <DiskConfiguration> --> |
| 16 | + <!-- <Disk wcm:action="add"> --> |
| 17 | + <!-- <CreatePartitions> --> |
| 18 | + <!-- <CreatePartition wcm:action="add"> --> |
| 19 | + <!-- <Type>EFI</Type> --> |
| 20 | + <!-- <Size>200</Size> --> |
| 21 | + <!-- <Order>1</Order> --> |
| 22 | + <!-- </CreatePartition> --> |
| 23 | + <!-- <CreatePartition wcm:action="add"> --> |
| 24 | + <!-- <Type>MSR</Type> --> |
| 25 | + <!-- <Size>200</Size> --> |
| 26 | + <!-- <Order>2</Order> --> |
| 27 | + <!-- </CreatePartition> --> |
| 28 | + <!-- <CreatePartition wcm:action="add"> --> |
| 29 | + <!-- <Type>Primary</Type> --> |
| 30 | + <!-- <Size>1024</Size> --> |
| 31 | + <!-- <Order>3</Order> --> |
| 32 | + <!-- </CreatePartition> --> |
| 33 | + <!-- </CreatePartitions> --> |
| 34 | + <!-- <ModifyPartitions> --> |
| 35 | + <!-- <ModifyPartition wcm:action="add"> --> |
| 36 | + <!-- <!-\- <Active>true</Active> -\-> --> |
| 37 | + <!-- <Order>1</Order> --> |
| 38 | + <!-- <!-\- <PartitionID>1</PartitionID> -\-> --> |
| 39 | + <!-- <!-\- <Label>System</Label> -\-> --> |
| 40 | + <!-- <Format>NTFS</Format> --> |
| 41 | + <!-- <!-\- <TypeID>0x27</TypeID> -\-> --> |
| 42 | + <!-- </ModifyPartition> --> |
| 43 | + <!-- <ModifyPartition wcm:action="add"> --> |
| 44 | + <!-- <!-\- <Active>true</Active> -\-> --> |
| 45 | + <!-- <Order>2</Order> --> |
| 46 | + <!-- <!-\- <PartitionID>2</PartitionID> -\-> --> |
| 47 | + <!-- <!-\- <Label>Microsoft Reserved</Label> -\-> --> |
| 48 | + <!-- <Format>NTFS</Format> --> |
| 49 | + <!-- <!-\- <TypeID>0x27</TypeID> -\-> --> |
| 50 | + <!-- </ModifyPartition> --> |
| 51 | + <!-- <ModifyPartition wcm:action="add"> --> |
| 52 | + <!-- <Order>3</Order> --> |
| 53 | + <!-- <!-\- <PartitionID>3</PartitionID> -\-> --> |
| 54 | + <!-- <!-\- <Active>true</Active> -\-> --> |
| 55 | + <!-- <Format>NTFS</Format> --> |
| 56 | + <!-- <Extend>true</Extend> --> |
| 57 | + <!-- <Letter>C</Letter> --> |
| 58 | + <!-- </ModifyPartition> --> |
| 59 | + <!-- </ModifyPartitions> --> |
| 60 | + <!-- <DiskID>0</DiskID> --> |
| 61 | + <!-- <WillWipeDisk>true</WillWipeDisk> --> |
| 62 | + <!-- </Disk> --> |
| 63 | + <!-- </DiskConfiguration> --> |
| 64 | + <ImageInstall> |
| 65 | + <OSImage> |
| 66 | + <InstallFrom> |
| 67 | + <MetaData wcm:action="add"> |
| 68 | + <Key>/IMAGE/NAME</Key> |
| 69 | + <Value>Windows Server 2022 SERVERDATACENTER</Value> |
| 70 | + </MetaData> |
| 71 | + </InstallFrom> |
| 72 | + <!-- <InstallToAvailablePartition>true</InstallToAvailablePartition> --> |
| 73 | + <!-- <WillShowUI>OnError</WillShowUI> --> |
| 74 | + </OSImage> |
| 75 | + </ImageInstall> |
| 76 | + <UserData> |
| 77 | + <AcceptEula>true</AcceptEula> |
| 78 | + </UserData> |
| 79 | + </component> |
| 80 | + <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> |
| 81 | + <SetupUILanguage> |
| 82 | + <UILanguage>en-US</UILanguage> |
| 83 | + </SetupUILanguage> |
| 84 | + <UILanguage>en-US</UILanguage> |
| 85 | + <InputLocale>sv-SE</InputLocale> |
| 86 | + </component> |
| 87 | + </settings> |
| 88 | + <settings pass="specialize"> |
| 89 | + <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> |
| 90 | + <RunSynchronous> |
| 91 | + <!-- Install guest tools certificate to suppress driver permission prompts --> |
| 92 | + <RunSynchronousCommand wcm:action="add"> |
| 93 | + <Order>1</Order> |
| 94 | + <Path>certutil -addstore TrustedPublisher A:\redhat-drivers.crt</Path> |
| 95 | + </RunSynchronousCommand> |
| 96 | + <!-- Disable the "new network detected" prompt --> |
| 97 | + <RunSynchronousCommand wcm:action="add"> |
| 98 | + <Order>2</Order> |
| 99 | + <Path>reg add HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff /f</Path> |
| 100 | + </RunSynchronousCommand> |
| 101 | + <!-- RTC is in UTC --> |
| 102 | + <!-- If time is desynced then ADCS will generate certificates that aren't valid yet --> |
| 103 | + <RunSynchronousCommand wcm:action="add"> |
| 104 | + <Order>3</Order> |
| 105 | + <Path>reg add HKLM\System\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1 /f</Path> |
| 106 | + </RunSynchronousCommand> |
| 107 | + </RunSynchronous> |
| 108 | + </component> |
| 109 | + </settings> |
| 110 | + <!-- <settings pass="auditSystem"> --> |
| 111 | + <!-- <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> --> |
| 112 | + <!-- <AuditComputerName> --> |
| 113 | + <!-- <Name>sble-adds</Name> --> |
| 114 | + <!-- </AuditComputerName> --> |
| 115 | + <!-- </component> --> |
| 116 | + <!-- </settings> --> |
| 117 | + <settings pass="oobeSystem"> |
| 118 | + <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> |
| 119 | + <UserAccounts> |
| 120 | + <AdministratorPassword> |
| 121 | + <Value>Asdf1234</Value> |
| 122 | + <PlainText>true</PlainText> |
| 123 | + </AdministratorPassword> |
| 124 | + </UserAccounts> |
| 125 | + <AutoLogon> |
| 126 | + <Enabled>true</Enabled> |
| 127 | + <Username>Administrator</Username> |
| 128 | + <Password> |
| 129 | + <Value>Asdf1234</Value> |
| 130 | + <PlainText>true</PlainText> |
| 131 | + </Password> |
| 132 | + </AutoLogon> |
| 133 | + <FirstLogonCommands> |
| 134 | + <!-- Install QEMU and SPICE guest tools --> |
| 135 | + <!-- NOTE: MUST happen in OOBE stage since Ansible assumes that having guest tools (more specifically, the qemu guest agent) available means the install is ready to proceed --> |
| 136 | + <SynchronousCommand wcm:action="add"> |
| 137 | + <Order>1</Order> |
| 138 | + <!-- QEMU guest tools are on virtio-win drive --> |
| 139 | + <CommandLine>F:\virtio-win-guest-tools.exe /passive</CommandLine> |
| 140 | + <RequiresUserInput>true</RequiresUserInput> |
| 141 | + </SynchronousCommand> |
| 142 | + <!-- SPICE guest tools aren't strictly required, but makes it Nicer(tm) to interact with graphically (automatic resolution adjustment, clipboard sync, etc) --> |
| 143 | + <SynchronousCommand wcm:action="add"> |
| 144 | + <Order>2</Order> |
| 145 | + <!-- SPICE guest tools are on the guest-files virtual USB drive --> |
| 146 | + <CommandLine>D:\spice-guest-tools.exe /S</CommandLine> |
| 147 | + <RequiresUserInput>true</RequiresUserInput> |
| 148 | + </SynchronousCommand> |
| 149 | + </FirstLogonCommands> |
| 150 | + </component> |
| 151 | + </settings> |
| 152 | + <cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/users/administrator/desktop/install.wim#Windows Server 2022 SERVERDATACENTER"/> |
| 153 | +</unattend> |
0 commit comments