From 7f572131b05c6d6d49aece8f32657a24f597e7db Mon Sep 17 00:00:00 2001 From: Bob Sira Date: Thu, 25 Jan 2024 02:46:48 -0800 Subject: [PATCH 1/7] intial authoring of auto install file --- automation/autounattend.xml | 224 ++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 automation/autounattend.xml diff --git a/automation/autounattend.xml b/automation/autounattend.xml new file mode 100644 index 0000000..8453a52 --- /dev/null +++ b/automation/autounattend.xml @@ -0,0 +1,224 @@ + + + + + + + en-US + + en-US + en-US + en-US + en-US + en-US + + + + + + + + + + + 1 + Primary + 499 + + + + 2 + EFI + 280 + + + + 3 + MSR + 16 + + + + 4 + Primary + true + + + + + + 1 + 1 + + NTFS + de94bba4-06d1-4d40-a16a-bfd50179d6ac + + + + 2 + 2 + + FAT32 + + + + 3 + 3 + + + + 4 + 4 + + NTFS + C + + + 0 + true + + + + + + + + + /IMAGE/INDEX + 3 + + + + 0 + 4 + + + + + + + + + + OnError + + true + Bosira + Microsoft + + + + + + + en-US + en-US + en-US + en-US + en-US + + + + minikube-m05 + Central Standard Time + true + + + + true + + + + + + + + YQB1AHQAbwBtAGEAdABlAHMAcQBsAFAAYQBzAHMAdwBvAHIAZAA= + false</PlainText> + </Password> + <Enabled>true</Enabled> + <Username>Administrator</Username> + </AutoLogon> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "WinRMCertificate"</CommandLine> + <Description>Certificate for WinRM</Description> + <Order>1</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Enable-PSRemoting -SkipNetworkProfileCheck -Force</CommandLine> + <Description>Enable WinRM</Description> + <Order>2</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command ($cert = gci Cert:\LocalMachine\My\) -and (New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $cert.Thumbprint –Force)</CommandLine> + <Description>Add HTTPS WinRM listener with previously generated certificate</Description> + <Order>3</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command New-NetFirewallRule -DisplayName 'Windows Remote Management (HTTPS-In)' -Name 'Windows Remote Management (HTTPS-In)' -Profile Any -LocalPort 5986 -Protocol TCP</CommandLine> + <Description>Add firewall exception to TCP port 5986 for WinRM over HTTPS</Description> + <Order>4</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Set-Item WSMan:\localhost\Service\Auth\Basic -Value $true</CommandLine> + <Description>Enable Basic authentication</Description> + <Order>5</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Stop-Service WinRM</CommandLine> + <Description>Stop the WinRM service to allow the dism process to finish before packer executes scripts</Description> + <Order>6</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Restart-Computer -Force</CommandLine> + <Order>7</Order> + <Description>Restart computer to apply changes</Description> + </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>TQBAAGsAaQBuAGQAdQAuADIAMAAyADMAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value> + <PlainText>false</PlainText> + </AdministratorPassword> + </UserAccounts> + <RegisteredOwner /> + </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>en-US</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"> + <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-lua-settings --> + <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> + <component name="Microsoft-Windows-PnpSysprep" 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"> + <DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices> + </component> + </settings> + <cpi:offlineImage cpi:source="wim:d:/minikubewindowscontainers/install.wim#Windows Server 2022 SERVERDATACENTERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> +</unattend> From d29165299ba582b0d273cfbee1182baf27523920 Mon Sep 17 00:00:00 2001 From: Bob Sira <bosira@microsoft.com> Date: Tue, 30 Jan 2024 00:56:01 -0800 Subject: [PATCH 2/7] BIOS/MBR-Based Hard Disk answer file --- automation/autounattend.xml | 110 +++++++----------------------------- 1 file changed, 20 insertions(+), 90 deletions(-) diff --git a/automation/autounattend.xml b/automation/autounattend.xml index 8453a52..9d6e68b 100644 --- a/automation/autounattend.xml +++ b/automation/autounattend.xml @@ -2,76 +2,42 @@ <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"> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-international-core-winpe --> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> - <InputLocale>en-US</InputLocale> + <InputLocale>en-US</InputLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> <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"> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup --> <DiskConfiguration> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-diskconfiguration --> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-diskconfiguration-disk-modifypartitions-modifypartition-typeid --> <Disk wcm:action="add"> <CreatePartitions> - <!-- Windows RE Tools partition --> <CreatePartition wcm:action="add"> + <Size>250</Size> <Order>1</Order> <Type>Primary</Type> - <Size>499</Size> </CreatePartition> - <!-- System partition (ESP) --> <CreatePartition wcm:action="add"> <Order>2</Order> - <Type>EFI</Type> - <Size>280</Size> - </CreatePartition> - <!-- Microsoft reserved partition (MSR) --> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Type>MSR</Type> - <Size>16</Size> - </CreatePartition> - <!-- Windows partition --> - <CreatePartition wcm:action="add"> - <Order>4</Order> - <Type>Primary</Type> <Extend>true</Extend> + <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> - <!-- Windows RE Tools partition --> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> - <Label>Recovery</Label> <Format>NTFS</Format> - <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> + <Label>Boot</Label> + <Active>true</Active> </ModifyPartition> - <!-- System partition (ESP) --> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> - <Label>System</Label> - <Format>FAT32</Format> - </ModifyPartition> - <!-- MSR partition does not need to be modified --> - <ModifyPartition wcm:action="add"> - <Order>3</Order> - <PartitionID>3</PartitionID> - </ModifyPartition> - <!-- Windows partition --> - <ModifyPartition wcm:action="add"> - <Order>4</Order> - <PartitionID>4</PartitionID> - <Label>Windows</Label> <Format>NTFS</Format> - <Letter>C</Letter> + <Label>System</Label> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> @@ -81,30 +47,25 @@ <ImageInstall> <OSImage> <InstallFrom> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> - <!-- Get-WindowsImage -ImagePath D:\sources\install.wim --> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX </Key> - <Value>3</Value> + <Value>2</Value> </MetaData> </InstallFrom> <InstallTo> <DiskID>0</DiskID> - <PartitionID>4</PartitionID> + <PartitionID>2</PartitionID> </InstallTo> + <WillShowUI>OnError</WillShowUI> + <InstallToAvailablePartition>false</InstallToAvailablePartition> </OSImage> </ImageInstall> <UserData> - <!-- Product Key from http://technet.microsoft.com/en-us/library/jj612867.aspx --> + <AcceptEula>true</AcceptEula> <ProductKey> - <!-- Do not uncomment the Key element if you are using trial ISOs --> - <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs --> - <!-- <Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key> --> - <WillShowUI>OnError</WillShowUI> + <WillShowUI>Never</WillShowUI> + <!-- <Key>11111-22222-33333-44444-55555</Key> --> </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Bosira</FullName> - <Organization>Microsoft</Organization> </UserData> </component> </settings> @@ -130,14 +91,13 @@ </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"> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup --> <AutoLogon> <Password> - <Value>YQB1AHQAbwBtAGEAdABlAHMAcQBsAFAAYQBzAHMAdwBvAHIAZAA=</Value> - <PlainText>false</PlainText> + <Value>M@kindu.2023</Value> + <PlainText>true</PlainText> </Password> - <Enabled>true</Enabled> <Username>Administrator</Username> + <Enabled>true</Enabled> </AutoLogon> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> @@ -182,43 +142,13 @@ <Description>Restart computer to apply changes</Description> </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>TQBAAGsAaQBuAGQAdQAuADIAMAAyADMAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value> - <PlainText>false</PlainText> + <Value>M@kindu.2023</Value> + <PlainText>true</PlainText> </AdministratorPassword> </UserAccounts> - <RegisteredOwner /> - </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>en-US</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"> - <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-lua-settings --> - <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> - <component name="Microsoft-Windows-PnpSysprep" 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"> - <DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices> </component> </settings> - <cpi:offlineImage cpi:source="wim:d:/minikubewindowscontainers/install.wim#Windows Server 2022 SERVERDATACENTERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> -</unattend> + <cpi:offlineImage cpi:source="wim:c:/wims/install.wim#Windows Server 2022 SERVERDATACENTER" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> +</unattend> \ No newline at end of file From 7ae051c9ce544f750e893489de73b437ea5ebaff Mon Sep 17 00:00:00 2001 From: Bob Sira <bosira@microsoft.com> Date: Wed, 31 Jan 2024 00:41:14 -0800 Subject: [PATCH 3/7] setup file to test the configuration --- automation/SetUp.ps1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 automation/SetUp.ps1 diff --git a/automation/SetUp.ps1 b/automation/SetUp.ps1 new file mode 100644 index 0000000..b8615d5 --- /dev/null +++ b/automation/SetUp.ps1 @@ -0,0 +1,17 @@ +$SwitchName = "External VM Switch" +$ISOFile = "C:\Users\bosira\Downloads\SERVER_EVAL_x64FRE_en-us-uni.iso" +$VMName = 'minikube-m05' +$VM = @{ + Name = $VMName; + MemoryStartupBytes = 1GB; + NewVHDPath = "${env:homepath}\.minikube\machines\$VMName\VHD.vhdx"; + NewVHDSizeBytes = 10GB; + BootDevice = "VHD"; + Path = "${env:homepath}\.minikube\machines\"; + SwitchName = $SwitchName +} +New-VM @VM +Set-VM -Name $VMName -ProcessorCount 2 -AutomaticCheckpointsEnabled $false +Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true +Set-VMDvdDrive -VMName $VMName -Path $ISOFile +Start-VM -Name $VMName \ No newline at end of file From 58c3230080f976379af569e33c86cc82f6ba9a50 Mon Sep 17 00:00:00 2001 From: Bob Sira <bosira@microsoft.com> Date: Wed, 31 Jan 2024 06:10:35 -0800 Subject: [PATCH 4/7] updates for testing --- automation/SetUp.ps1 | 2 +- automation/autounattend.xml | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/automation/SetUp.ps1 b/automation/SetUp.ps1 index b8615d5..cf88047 100644 --- a/automation/SetUp.ps1 +++ b/automation/SetUp.ps1 @@ -1,5 +1,5 @@ $SwitchName = "External VM Switch" -$ISOFile = "C:\Users\bosira\Downloads\SERVER_EVAL_x64FRE_en-us-uni.iso" +$ISOFile = "$HOME\Downloads\SERVER_EVAL_x64FRE_en-us-uni.iso" $VMName = 'minikube-m05' $VM = @{ Name = $VMName; diff --git a/automation/autounattend.xml b/automation/autounattend.xml index 9d6e68b..c1610ff 100644 --- a/automation/autounattend.xml +++ b/automation/autounattend.xml @@ -47,6 +47,8 @@ <ImageInstall> <OSImage> <InstallFrom> + <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> + <!-- Get-WindowsImage -ImagePath D:\sources\install.wim --> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX </Key> <Value>2</Value> @@ -64,6 +66,8 @@ <AcceptEula>true</AcceptEula> <ProductKey> <WillShowUI>Never</WillShowUI> + <!-- Do not uncomment the Key element if you are using trial ISOs --> + <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs --> <!-- <Key>11111-22222-33333-44444-55555</Key> --> </ProductKey> </UserData> @@ -91,9 +95,10 @@ </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"> + <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup --> <AutoLogon> <Password> - <Value>M@kindu.2023</Value> + <Value>Minikube@2024</Value> <PlainText>true</PlainText> </Password> <Username>Administrator</Username> @@ -137,14 +142,24 @@ <RequiresUserInput>true</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> - <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Restart-Computer -Force</CommandLine> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Install-WindowsFeature -Name containers</CommandLine> <Order>7</Order> + <Description>Installs Containers feature</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Set-SConfig -AutoLaunch $false</CommandLine> + <Order>8</Order> + <Description>Turns off Server Configuration tool (SConfig)</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command Restart-Computer -Force</CommandLine> + <Order>9</Order> <Description>Restart computer to apply changes</Description> </SynchronousCommand> </FirstLogonCommands> <UserAccounts> <AdministratorPassword> - <Value>M@kindu.2023</Value> + <Value>Minikube@2024</Value> <PlainText>true</PlainText> </AdministratorPassword> </UserAccounts> From 5306cf7493895211fc73f33ebc9ba483c54f6635 Mon Sep 17 00:00:00 2001 From: Ian King'ori <kingorim.ian@gmail.com> Date: Thu, 1 Feb 2024 23:56:25 +0300 Subject: [PATCH 5/7] add auto-unattend iso file --- automation/SetUp.ps1 | 3 ++- automation/auto-install.iso | Bin 0 -> 73728 bytes 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 automation/auto-install.iso diff --git a/automation/SetUp.ps1 b/automation/SetUp.ps1 index cf88047..9db2ab0 100644 --- a/automation/SetUp.ps1 +++ b/automation/SetUp.ps1 @@ -5,7 +5,7 @@ $VM = @{ Name = $VMName; MemoryStartupBytes = 1GB; NewVHDPath = "${env:homepath}\.minikube\machines\$VMName\VHD.vhdx"; - NewVHDSizeBytes = 10GB; + NewVHDSizeBytes = 15GB; BootDevice = "VHD"; Path = "${env:homepath}\.minikube\machines\"; SwitchName = $SwitchName @@ -14,4 +14,5 @@ New-VM @VM Set-VM -Name $VMName -ProcessorCount 2 -AutomaticCheckpointsEnabled $false Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true Set-VMDvdDrive -VMName $VMName -Path $ISOFile +Add-VMDvdDrive -VMName $VMName -Path "$PSScriptRoot\auto-install.iso" -ControllerNumber 1 -ControllerLocation 1 Start-VM -Name $VMName \ No newline at end of file diff --git a/automation/auto-install.iso b/automation/auto-install.iso new file mode 100644 index 0000000000000000000000000000000000000000..7ed2d7be6ce4c8b5b00c47c7bf88529cb0c6569b GIT binary patch literal 73728 zcmeI5-)`H;6^H4)D3Tx-dl4*(Hd##71e<h0Q<jr7YcSd>wz6x~b_7%2WD5fUO^qzV zB!?Z6mR0nk@6b2wi?nBk6fK#OEC+R*-TY|8B8T&j-<&yf&KX8F3>+W;0w4eaAOHd& z00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY z0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4ea zAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd& z00JNY0w4eaAOHd&00JNY0w4eaAOHd@n_Knz+KTbkkJcM({!wqdudlst)EiG{=NXfH zn4c6M<J9Wsieap%f5xp_#-053oqOlmzEY<(<9?oU-?*htZW;glV&$v*t9QRp1yy;5 z<3<UzqS32NMmO4rkJz{p|9Ydo)@U?dJbhlT->oFnFC4~&>$(zL93TJ!An+*=_@Y?< zjkktxM8>+&FxbqWI^B71)QvUz-Js8g@pLL*@i61{|B=;R_;{oSSJc1B_5Zi$C4Q$) zYsP~-<-xr5f2s$w`;FA=B+w$685ysP%#d_;oh^NM-Ai?AsZ5pSzLHQ`?kf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C;E80#N?K>9juzucwO9u0oXLu=<=j8jVWFIN7)}?Kc0ee{N5iN`N#qxN& z^io~IM88k^R;m?iYI~RF6)l&Ki$0OvH90cB0!w$F)4rTcm7wbw<rQ3xT#&z8o^;U` z^Tur{Z5GF5b$SDOxsG3^n=Th;dLQHxFJFfpXxmR@Q93ICFcplLAHC2%*Y$=@mgq?y zEU7+CCAeFO_j$3uK_VZJ*2;I|RYJZ8uU-}nH@ppcjUY@c+748&GN}FdKaS1SVxCZ_ zsKK1}{!i`wtyZ_S+1~56_s6eXQhkeFSEbuEX3-n2<(ml2&-GnkJU0k{z~@Eae`cU{ AF8}}l literal 0 HcmV?d00001 From b4aae2e4721d8366e01f120b5992303db1137e97 Mon Sep 17 00:00:00 2001 From: Bob Sira <bosira@microsoft.com> Date: Mon, 5 Feb 2024 07:05:29 -0800 Subject: [PATCH 6/7] generic computer name --- automation/autounattend.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/autounattend.xml b/automation/autounattend.xml index c1610ff..08e796d 100644 --- a/automation/autounattend.xml +++ b/automation/autounattend.xml @@ -84,7 +84,7 @@ </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"> <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup --> - <ComputerName>minikube-m05</ComputerName> + <ComputerName>MINIKUBE-WINDOWS</ComputerName> <TimeZone>Central Standard Time</TimeZone> <CopyProfile>true</CopyProfile> </component> From 4aa93e99c2b79ae3724fcae7997fc02553ae8db0 Mon Sep 17 00:00:00 2001 From: Bob Sira <bosira@microsoft.com> Date: Mon, 5 Feb 2024 09:39:48 -0800 Subject: [PATCH 7/7] computer name changes --- automation/SetUp.ps1 | 2 +- automation/autounattend.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/SetUp.ps1 b/automation/SetUp.ps1 index 9db2ab0..80a929c 100644 --- a/automation/SetUp.ps1 +++ b/automation/SetUp.ps1 @@ -1,6 +1,6 @@ $SwitchName = "External VM Switch" $ISOFile = "$HOME\Downloads\SERVER_EVAL_x64FRE_en-us-uni.iso" -$VMName = 'minikube-m05' +$VMName = 'minikube-ws22' $VM = @{ Name = $VMName; MemoryStartupBytes = 1GB; diff --git a/automation/autounattend.xml b/automation/autounattend.xml index 08e796d..51d9d00 100644 --- a/automation/autounattend.xml +++ b/automation/autounattend.xml @@ -51,7 +51,7 @@ <!-- Get-WindowsImage -ImagePath D:\sources\install.wim --> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX </Key> - <Value>2</Value> + <Value>3</Value> </MetaData> </InstallFrom> <InstallTo> @@ -84,7 +84,7 @@ </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"> <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup --> - <ComputerName>MINIKUBE-WINDOWS</ComputerName> + <ComputerName>minikube-ws22</ComputerName> <TimeZone>Central Standard Time</TimeZone> <CopyProfile>true</CopyProfile> </component>