separated church and state
This commit is contained in:
1 parent
b9a8ded252
commit
c4d42aa54c
7 files changed
+548
-80
No files matched your search
+25
-13
@@ -5,12 +5,12 @@
|
||||
Target: Unraid / KVM virtual machine, UEFI firmware, GPT disk
|
||||
Storage: VirtIO (or VirtIO-SCSI) vdisk - drivers injected into WinPE
|
||||
Behavior: Wipes Disk 0, creates ESP/MSR/Windows, installs, autologons,
|
||||
then runs oobe-ltsc.ps1 (VirtIO guest tools, MeshCentral, settings).
|
||||
installs the VirtIO guest tools, then downloads and runs
|
||||
oobe-vms.ps1 from https://url.isworking.fyi/oobe-vms.
|
||||
|
||||
PLACE AT: the ROOT of the merged VirtIO ISO, renamed to autounattend.xml,
|
||||
alongside virtio-win-guest-tools.exe AND oobe-ltsc.ps1. The ISO
|
||||
needs Joliet names so oobe-ltsc.ps1 isn't mangled to 8.3.
|
||||
Attach that ISO in the Unraid VM's
|
||||
BUILD: ./build-isos.sh produces build/virtio-vms.iso with this file as
|
||||
autounattend.xml plus oobe-vms.ps1 (offline fallback) at the
|
||||
root of the latest virtio-win ISO. Attach that ISO in the Unraid VM's
|
||||
"VirtIO Drivers ISO" slot; leave "OS Install ISO" on the LTSC image.
|
||||
|
||||
>>> DESTRUCTIVE: WillWipeDisk erases Disk 0 with no prompt. <<<
|
||||
@@ -325,16 +325,28 @@
|
||||
<RequiresUserInput>false</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
||||
<!-- Provisioning: oobe-ltsc.ps1 sits at the root of the merged ISO
|
||||
next to this file. Scans every drive for it rather than assuming
|
||||
a letter, since the VirtIO disc moves around post-install.
|
||||
The script installs the VirtIO guest tools, MeshCentral agent,
|
||||
power/RDP/SSH settings, then restarts the VM itself, so this
|
||||
must stay the LAST command. Log: C:\ProgramData\OOBE\oobe-ltsc.log -->
|
||||
<!-- NetKVM has to be in place before anything can be downloaded, so
|
||||
the guest tools go on from the ISO first. Scans every drive for
|
||||
the installer rather than assuming a letter, since the VirtIO
|
||||
disc moves around post-install. -->
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>3</Order>
|
||||
<Description>Run oobe-ltsc.ps1 provisioning script</Description>
|
||||
<CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "$s = Get-PSDrive -PSProvider FileSystem | ForEach-Object { Join-Path $_.Root 'oobe-ltsc.ps1' } | Where-Object { Test-Path $_ } | Select-Object -First 1; if ($s) { & $s } else { Write-Warning 'oobe-ltsc.ps1 not found on any drive'; Start-Sleep -Seconds 60 }"</CommandLine>
|
||||
<Description>Install VirtIO guest tools</Description>
|
||||
<CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "Get-Volume | Where-Object DriveLetter | ForEach-Object { $exe = $_.DriveLetter + ':\virtio-win-guest-tools.exe'; if (Test-Path $exe) { Start-Process $exe -ArgumentList '/install','/quiet','/norestart' -Wait } }"</CommandLine>
|
||||
<RequiresUserInput>false</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
||||
<!-- Provisioning: pulls oobe-vms.ps1 from the repo so the VM always
|
||||
gets the current version, retrying for ~2.5 minutes while the
|
||||
network comes up. If that fails, falls back to the copy of
|
||||
oobe-vms.ps1 baked into the root of the ISO. The script installs
|
||||
the MeshCentral agent, applies the power/RDP/SSH settings and
|
||||
restarts the VM itself, so this must stay the LAST command.
|
||||
Log: C:\ProgramData\OOBE\oobe-vms.log -->
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>4</Order>
|
||||
<Description>Run oobe-vms.ps1 (url.isworking.fyi, else ISO copy)</Description>
|
||||
<CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $s = $null; for ($i = 1; $i -le 10; $i++) { try { $s = Invoke-RestMethod 'https://url.isworking.fyi/oobe-vms'; break } catch { Start-Sleep -Seconds 15 } }; if (-not $s) { $f = Get-PSDrive -PSProvider FileSystem | ForEach-Object { Join-Path $_.Root 'oobe-vms.ps1' } | Where-Object { Test-Path $_ } | Select-Object -First 1; if ($f) { $s = Get-Content -Raw $f } }; if ($s) { Invoke-Expression $s } else { Write-Warning 'oobe-vms.ps1 not found online or on any drive'; Start-Sleep -Seconds 60 }"</CommandLine>
|
||||
<RequiresUserInput>false</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
||||
|
||||
Reference in new issue
Block a user