This commit is contained in:
2
packer/ova/windows/disable-network-discovery.cmd
Normal file
2
packer/ova/windows/disable-network-discovery.cmd
Normal file
@ -0,0 +1,2 @@
|
||||
reg ADD HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff /f
|
||||
netsh advfirewall firewall set rule group="Network Discovery" new enable=No
|
8
packer/ova/windows/disable-winrm.ps1
Normal file
8
packer/ova/windows/disable-winrm.ps1
Normal file
@ -0,0 +1,8 @@
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block
|
||||
netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes
|
||||
$winrmService = Get-Service -Name WinRM
|
||||
if ($winrmService.Status -eq "Running"){
|
||||
Disable-PSRemoting -Force
|
||||
}
|
||||
Stop-Service winrm
|
||||
Set-Service -Name winrm -StartupType Disabled
|
18
packer/ova/windows/enable-winrm.ps1
Normal file
18
packer/ova/windows/enable-winrm.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
$NetworkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
|
||||
$Connections = $NetworkListManager.GetNetworkConnections()
|
||||
$Connections | ForEach-Object { $_.GetNetwork().SetCategory(1) }
|
||||
|
||||
Enable-PSRemoting -Force
|
||||
winrm quickconfig -q
|
||||
winrm quickconfig -transport:http
|
||||
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}'
|
||||
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
|
||||
winrm set winrm/config/service/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/client/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"}'
|
||||
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow
|
||||
Set-Service winrm -startuptype "auto"
|
||||
Restart-Service winrm
|
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.cat
Normal file
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.cat
Normal file
Binary file not shown.
221
packer/ova/windows/pvscsi/amd64/pvscsi.inf
Normal file
221
packer/ova/windows/pvscsi/amd64/pvscsi.inf
Normal file
@ -0,0 +1,221 @@
|
||||
|
||||
;pvscsi.inf
|
||||
;This file contains the information required to load the driver for the VMware PVSCSI Controller
|
||||
; Copyright (C) 2001 - 2019, VMware, Inc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[version]
|
||||
Signature="$Windows NT$"
|
||||
Class=SCSIAdapter
|
||||
ClassGuid={4D36E97B-E325-11CE-BFC1-08002BE10318}
|
||||
Provider=%VMWARE%
|
||||
DriverVer=08/02/2019,1.3.15.0
|
||||
CatalogFile=pvscsi.cat
|
||||
|
||||
[ControlFlags]
|
||||
ExcludeFromSelect = *
|
||||
|
||||
[SourceDisksNames]
|
||||
1 = %DSKID1%,pvscsi.sys,,
|
||||
|
||||
[SourceDisksFiles]
|
||||
pvscsi.sys = 1,,
|
||||
|
||||
[Manufacturer]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%VMWARE%=pvscsi,NTamd64.6.2
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
; Other architectures are unsupported, as are older versions of Windows on all platforms.
|
||||
[pvscsi]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[pvscsi.NTamd64.6.2]
|
||||
%DEVICE%=DDInstall.x64.vista, PCI\VEN_15AD&DEV_07C0
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[DDInstall.x64.vista.NT]
|
||||
CopyFiles=pvscsi.x64.CopyFiles
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x64.vista.NT.HW]
|
||||
AddReg=enableMSI.reg
|
||||
Include=machine.inf
|
||||
Needs=PciIoSpaceNotRequired
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[pvscsi.x64.CopyFiles]
|
||||
pvscsi.sys,,,2
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x64.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x64,EventLog_Install
|
||||
|
||||
[DDInstall.x64.vista.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x64,EventLog_Install
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DestinationDirs]
|
||||
pvscsi.x64.CopyFiles = 12
|
||||
DefaultDestDir=12
|
||||
|
||||
; ##################################################
|
||||
|
||||
[Service_Install.x64]
|
||||
DisplayName=%pvscsi.DiskName%
|
||||
ServiceType=1 ; %SERVICE_KERNEL_DRIVER%
|
||||
StartType=0 ; %SERVICE_BOOT_START%
|
||||
ErrorControl=1 ; %SERVICE_ERROR_NORMAL%
|
||||
ServiceBinary=%12%\pvscsi.sys
|
||||
LoadOrderGroup=SCSI Miniport
|
||||
|
||||
; We need to force the use of \Driver\pvscsi32 as the driver object name,
|
||||
; otherwise the crash dump driver loader functions cannot find the driver.
|
||||
; StartName entry defined in the INF format is supposed to facilitate that,
|
||||
; but at least on win2k3sp2-32 and win2k8-datacenter-32 the driver installer
|
||||
; interpretes StartName as the name of the account to start the service under,
|
||||
; which is an incorrect interpretation for SERVICE_KERNEL_DRIVER type. As a
|
||||
; work around ObjectName registry entry is added directly using brute-force.
|
||||
|
||||
AddReg=busTypeSAS,pnpsafe_pci_addreg,vmware_installers_addreg
|
||||
DelReg=driverObjectName.del
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[busTypeSAS]
|
||||
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A ; BusTypeSAS
|
||||
|
||||
[enableMSI.reg]
|
||||
HKR, Interrupt Management,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
|
||||
[pnpsafe_pci_addreg]
|
||||
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001
|
||||
|
||||
[vmware_installers_addreg]
|
||||
HKR,, %pvscsi.installers.value.name%, %FLG_ADDREG_KEYONLY%, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_KEYONLY
|
||||
HKR,, %pvscsi.installers.value.name%, 0x00010002, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_NOCLOBBER | FLG_ADDREG_TYPE_MULTI_SZ
|
||||
|
||||
[driverObjectName.del]
|
||||
HKR, , "ObjectName"
|
||||
|
||||
[EventLog_Install]
|
||||
AddReg = EventLog_AddReg
|
||||
|
||||
[EventLog_AddReg]
|
||||
HKR,,EventMessageFile,%FLG_ADDREG_TYPE_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
|
||||
HKR,,TypesSupported,%FLG_ADDREG_TYPE_DWORD%,7
|
||||
|
||||
[strings]
|
||||
pvscsi.installers.value.name="vwdk.installers"
|
||||
pvscsi.installers.value.windows="Windows"
|
||||
pvscsi.DiskName="pvscsi Storage Controller Driver"
|
||||
VMWARE="VMware, Inc."
|
||||
DEVICE="VMware PVSCSI Controller"
|
||||
DSKID1="VMware PVSCSI Controller Installation Disk 1"
|
||||
FLG_ADDREG_KEYONLY = 0x00000010
|
||||
FLG_ADDREG_TYPE_DWORD = 0x00010001
|
||||
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
|
||||
FLG_DELREG_MULTI_SZ_DELSTRING = 0x00018002
|
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.sys
Normal file
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.sys
Normal file
Binary file not shown.
35
packer/ova/windows/pvscsi/amd64/txtsetup.oem
Normal file
35
packer/ova/windows/pvscsi/amd64/txtsetup.oem
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
; txtsetup.oem file.
|
||||
; Required to install the pvscsi driver at install time.
|
||||
|
||||
[Disks]
|
||||
;"directory" should specify the full-path as per the documentation, but only
|
||||
; relative paths worked during testing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Defaults]
|
||||
SCSI = pvscsi
|
||||
|
||||
[SCSI]
|
||||
pvscsi = "VMware PVSCSI Controller"
|
||||
|
||||
[Files.SCSI.pvscsi]
|
||||
driver = disk,pvscsi.sys,pvscsi
|
||||
inf = disk,pvscsi.inf
|
||||
catalog = disk,pvscsi.cat
|
||||
|
||||
[Config.pvscsi]
|
||||
value = Parameters\PnpInterface, 5 ,REG_DWORD, 1
|
||||
value = Parameters, BusType, REG_DWORD, A
|
||||
|
||||
[HardwareIds.scsi.pvscsi]
|
||||
id = "PCI\VEN_15AD&DEV_07C0", "pvscsi"
|
BIN
packer/ova/windows/pvscsi/i386/pvscsi.cat
Normal file
BIN
packer/ova/windows/pvscsi/i386/pvscsi.cat
Normal file
Binary file not shown.
221
packer/ova/windows/pvscsi/i386/pvscsi.inf
Normal file
221
packer/ova/windows/pvscsi/i386/pvscsi.inf
Normal file
@ -0,0 +1,221 @@
|
||||
|
||||
;pvscsi.inf
|
||||
;This file contains the information required to load the driver for the VMware PVSCSI Controller
|
||||
; Copyright (C) 2001 - 2019, VMware, Inc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[version]
|
||||
Signature="$Windows NT$"
|
||||
Class=SCSIAdapter
|
||||
ClassGuid={4D36E97B-E325-11CE-BFC1-08002BE10318}
|
||||
Provider=%VMWARE%
|
||||
DriverVer=08/02/2019,1.3.15.0
|
||||
CatalogFile=pvscsi.cat
|
||||
|
||||
[ControlFlags]
|
||||
ExcludeFromSelect = *
|
||||
|
||||
[SourceDisksNames]
|
||||
1 = %DSKID1%,pvscsi.sys,,
|
||||
|
||||
[SourceDisksFiles]
|
||||
pvscsi.sys = 1,,
|
||||
|
||||
[Manufacturer]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%VMWARE%=pvscsi,NTx86.6.2
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
; Other architectures are unsupported, as are older versions of Windows on all platforms.
|
||||
[pvscsi]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[pvscsi.NTx86.6.2]
|
||||
%DEVICE%=DDInstall.x86.vista, PCI\VEN_15AD&DEV_07C0
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[DDInstall.x86.vista.NT]
|
||||
CopyFiles=pvscsi.x86.CopyFiles
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x86.vista.NT.HW]
|
||||
AddReg=enableMSI.reg
|
||||
Include=machine.inf
|
||||
Needs=PciIoSpaceNotRequired
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[pvscsi.x86.CopyFiles]
|
||||
pvscsi.sys,,,2
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x86.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x86,EventLog_Install
|
||||
|
||||
[DDInstall.x86.vista.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x86,EventLog_Install
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DestinationDirs]
|
||||
pvscsi.x86.CopyFiles = 12
|
||||
DefaultDestDir=12
|
||||
|
||||
; ##################################################
|
||||
|
||||
[Service_Install.x86]
|
||||
DisplayName=%pvscsi.DiskName%
|
||||
ServiceType=1 ; %SERVICE_KERNEL_DRIVER%
|
||||
StartType=0 ; %SERVICE_BOOT_START%
|
||||
ErrorControl=1 ; %SERVICE_ERROR_NORMAL%
|
||||
ServiceBinary=%12%\pvscsi.sys
|
||||
LoadOrderGroup=SCSI Miniport
|
||||
|
||||
; We need to force the use of \Driver\pvscsi32 as the driver object name,
|
||||
; otherwise the crash dump driver loader functions cannot find the driver.
|
||||
; StartName entry defined in the INF format is supposed to facilitate that,
|
||||
; but at least on win2k3sp2-32 and win2k8-datacenter-32 the driver installer
|
||||
; interpretes StartName as the name of the account to start the service under,
|
||||
; which is an incorrect interpretation for SERVICE_KERNEL_DRIVER type. As a
|
||||
; work around ObjectName registry entry is added directly using brute-force.
|
||||
|
||||
AddReg=busTypeSAS,pnpsafe_pci_addreg,vmware_installers_addreg
|
||||
DelReg=driverObjectName.del
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[busTypeSAS]
|
||||
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A ; BusTypeSAS
|
||||
|
||||
[enableMSI.reg]
|
||||
HKR, Interrupt Management,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
|
||||
[pnpsafe_pci_addreg]
|
||||
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001
|
||||
|
||||
[vmware_installers_addreg]
|
||||
HKR,, %pvscsi.installers.value.name%, %FLG_ADDREG_KEYONLY%, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_KEYONLY
|
||||
HKR,, %pvscsi.installers.value.name%, 0x00010002, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_NOCLOBBER | FLG_ADDREG_TYPE_MULTI_SZ
|
||||
|
||||
[driverObjectName.del]
|
||||
HKR, , "ObjectName"
|
||||
|
||||
[EventLog_Install]
|
||||
AddReg = EventLog_AddReg
|
||||
|
||||
[EventLog_AddReg]
|
||||
HKR,,EventMessageFile,%FLG_ADDREG_TYPE_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
|
||||
HKR,,TypesSupported,%FLG_ADDREG_TYPE_DWORD%,7
|
||||
|
||||
[strings]
|
||||
pvscsi.installers.value.name="vwdk.installers"
|
||||
pvscsi.installers.value.windows="Windows"
|
||||
pvscsi.DiskName="pvscsi Storage Controller Driver"
|
||||
VMWARE="VMware, Inc."
|
||||
DEVICE="VMware PVSCSI Controller"
|
||||
DSKID1="VMware PVSCSI Controller Installation Disk 1"
|
||||
FLG_ADDREG_KEYONLY = 0x00000010
|
||||
FLG_ADDREG_TYPE_DWORD = 0x00010001
|
||||
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
|
||||
FLG_DELREG_MULTI_SZ_DELSTRING = 0x00018002
|
BIN
packer/ova/windows/pvscsi/i386/pvscsi.sys
Normal file
BIN
packer/ova/windows/pvscsi/i386/pvscsi.sys
Normal file
Binary file not shown.
35
packer/ova/windows/pvscsi/i386/txtsetup.oem
Normal file
35
packer/ova/windows/pvscsi/i386/txtsetup.oem
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
; txtsetup.oem file.
|
||||
; Required to install the pvscsi driver at install time.
|
||||
|
||||
[Disks]
|
||||
;"directory" should specify the full-path as per the documentation, but only
|
||||
; relative paths worked during testing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Defaults]
|
||||
SCSI = pvscsi
|
||||
|
||||
[SCSI]
|
||||
pvscsi = "VMware PVSCSI Controller"
|
||||
|
||||
[Files.SCSI.pvscsi]
|
||||
driver = disk,pvscsi.sys,pvscsi
|
||||
inf = disk,pvscsi.inf
|
||||
catalog = disk,pvscsi.cat
|
||||
|
||||
[Config.pvscsi]
|
||||
value = Parameters\PnpInterface, 5 ,REG_DWORD, 1
|
||||
value = Parameters, BusType, REG_DWORD, A
|
||||
|
||||
[HardwareIds.scsi.pvscsi]
|
||||
id = "PCI\VEN_15AD&DEV_07C0", "pvscsi"
|
13
packer/ova/windows/sysprep.ps1
Normal file
13
packer/ova/windows/sysprep.ps1
Normal file
@ -0,0 +1,13 @@
|
||||
Write-Output '>>> Sysprepping VM ...'
|
||||
if( Test-Path $Env:SystemRoot\system32\Sysprep\unattend.xml ) {
|
||||
Remove-Item $Env:SystemRoot\system32\Sysprep\unattend.xml -Force
|
||||
}
|
||||
$unattendedXml = "$ENV:ProgramFiles\Cloudbase Solutions\Cloudbase-Init\conf\Unattend.xml"
|
||||
$FileExists = Test-Path $unattendedXml
|
||||
If ($FileExists -eq $True) {
|
||||
# Use the Cloudbase-init provided unattend file during install
|
||||
Write-Output "Using cloudbase-init unattend file for sysprep: $unattendedXml"
|
||||
& $Env:SystemRoot\System32\Sysprep\Sysprep.exe /oobe /generalize /mode:vm /shutdown /quiet /unattend:$unattendedXml
|
||||
}else {
|
||||
& $Env:SystemRoot\System32\Sysprep\Sysprep.exe /oobe /generalize /mode:vm /shutdown /quiet
|
||||
}
|
231
packer/ova/windows/windows-2004/autounattend.xml
Normal file
231
packer/ova/windows/windows-2004/autounattend.xml
Normal file
@ -0,0 +1,231 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--*************************************************
|
||||
Windows Server 2004 Answer File
|
||||
|
||||
Installation Notes
|
||||
Location:
|
||||
Notes: We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
Users will want to modify this file.
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" 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">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</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">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Size>350</Size>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Extend>true</Extend>
|
||||
<Order>2</Order>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Label>System</Label>
|
||||
<Format>NTFS</Format>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server SERVERSTANDARDACORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<ProductKey>
|
||||
<Key>N2KJX-J94YW-TQVFB-DG9YT-724CC</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<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>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</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>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" 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">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" 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">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" 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">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" 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">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" 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">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<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">
|
||||
<ProductKey>N2KJX-J94YW-TQVFB-DG9YT-724CC</ProductKey>
|
||||
</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">
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Name>Administrator</Name>
|
||||
<Group>Administrators</Group>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Description>Administrator</Description>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
<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">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemRoot%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
<Order>3</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Description>Disable Hibernation</Description>
|
||||
<Order>4</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>5</Order>
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>6</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>7</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
</component>
|
||||
</settings>
|
||||
<cpi:offlineImage cpi:source="wim:c:/windows-2004/sources/install.wim#Windows Server SERVERSTANDARDACORE"
|
||||
xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||
</unattend>
|
255
packer/ova/windows/windows-2019/autounattend.xml
Normal file
255
packer/ova/windows/windows-2019/autounattend.xml
Normal file
@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--*************************************************
|
||||
Windows Server 2019 Answer File Generator
|
||||
Created using Windows AFG found at:
|
||||
;http://www.windowsafg.com
|
||||
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" 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">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</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">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Size>350</Size>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Extend>true</Extend>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Format>NTFS</Format>
|
||||
<Label>System</Label>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server 2019 SERVERSTANDARDCORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
<ProductKey>
|
||||
<Key>N69G4-B89J2-4G8F4-WWYCC-J464C</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<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>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</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>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" 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">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" 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">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" 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">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" 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">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" 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">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<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">
|
||||
<ComputerName></ComputerName>
|
||||
<ProductKey>N69G4-B89J2-4G8F4-WWYCC-J464C</ProductKey>
|
||||
</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">
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemDrive%\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>3</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>4</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>5</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>10</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>11</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Work</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||
<SkipUserOOBE>true</SkipUserOOBE>
|
||||
</OOBE>
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Description>Administrator</Description>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Group>Administrators</Group>
|
||||
<Name>Administrator</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
256
packer/ova/windows/windows-2022/autounattend.xml
Normal file
256
packer/ova/windows/windows-2022/autounattend.xml
Normal file
@ -0,0 +1,256 @@
|
||||
<!--*************************************************
|
||||
Windows Server 2019 Answer File Generator
|
||||
Created using Windows AFG found at:
|
||||
;http://www.windowsafg.com
|
||||
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" 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">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</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">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Size>350</Size>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Extend>true</Extend>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Format>NTFS</Format>
|
||||
<Label>System</Label>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server 2022 SERVERSTANDARDCORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
<ProductKey>
|
||||
<Key>VDYBN-27WPP-V4HQT-9VMD4-VMK7H</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<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>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</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>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" 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">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" 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">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" 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">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" 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">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" 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">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<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">
|
||||
<ComputerName></ComputerName>
|
||||
<ProductKey>VDYBN-27WPP-V4HQT-9VMD4-VMK7H</ProductKey>
|
||||
</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">
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemDrive%\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>3</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>4</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>5</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>10</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>11</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Work</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||
<SkipUserOOBE>true</SkipUserOOBE>
|
||||
</OOBE>
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Description>Administrator</Description>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Group>Administrators</Group>
|
||||
<Name>Administrator</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
Reference in New Issue
Block a user