Commit 3c62b085 authored by Stefan Scherer's avatar Stefan Scherer

Merge pull request #2 from StefanScherer/win2016tp4

Windows Server 2016 TP4
parents 55bd677e 942007aa
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<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">
<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>
......@@ -11,7 +11,7 @@
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>de-DE</UserLocale>
</component>
<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">
<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>
......@@ -51,7 +51,7 @@
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME </Key>
<Value>Windows Server 2012 R2 SERVERDATACENTER</Value>
<Value>Windows Server 2016 Technical Preview 4 SERVERDATACENTER</Value>
</MetaData>
</InstallFrom>
<InstallTo>
......@@ -75,7 +75,7 @@
</component>
</settings>
<settings pass="specialize">
<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">
<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">
<OEMInformation>
<HelpCustomized>false</HelpCustomized>
</OEMInformation>
......@@ -83,22 +83,41 @@
<TimeZone>W. Europe Standard Time</TimeZone>
<RegisteredOwner/>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" 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">
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<component name="Microsoft-Windows-IE-ESC" 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">
<IEHardenAdmin>false</IEHardenAdmin>
<IEHardenUser>false</IEHardenUser>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<component name="Microsoft-Windows-OutOfBoxExperience" 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">
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
</component>
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<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-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">
<Order>1</Order>
<Description>Set Execution Policy 64 Bit</Description>
<Path>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Description>Set Execution Policy 32 Bit</Description>
<Path>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Description>Disable WinRM</Description>
<Path>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-winrm.ps1</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<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>vagrant</Value>
......@@ -211,13 +230,13 @@
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOwner/>
<RegisteredOwner />
</component>
</settings>
<settings pass="offlineServicing">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<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>
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/wim/install.wim#Windows Server 2016 SERVERSTANDARD"/>
<cpi:offlineImage cpi:source="wim:c:/wim/install.wim#Windows Server 2012 R2 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
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"}'
# Set-Service winrm -startuptype "auto"
# Restart-Service winrm
Write-Host "Install Containers"
Install-WindowsFeature -Name Containers
Write-Host "Install Hyper-V"
Install-WindowsFeature -Name Hyper-V
Stop-Service winrm
. sc.exe config winrm start= delayed-auto
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
Restart-Computer
Write-Host "WARNING: DO NOT USE DOCKER IN PRODUCTION WITHOUT TLS"
Write-Host "Enabling Docker unsecure port 2375"
if (!(Get-NetFirewallRule | where {$_.Name -eq "DockerUnsecure2375"})) {
New-NetFirewallRule -Name "DockerUnsecure2375" -DisplayName "Docker unsecure on TCP/2375" -Protocol tcp -LocalPort 2375 -Action Allow -Enabled True
}
Write-Host "Enabling Docker to listen on unsecure port 2375"
cp C:\programdata\docker\runDockerDaemon.cmd C:\programdata\docker\runDockerDaemon.cmd.bak
cat C:\programdata\docker\runDockerDaemon.cmd.bak | %{$_ -replace '^docker daemon -D -b "Virtual Switch"$','docker daemon -D -b "Virtual Switch" -H 0.0.0.0:2375'} | Set-Content C:\programdata\docker\runDockerDaemon.cmd
Write-Host "Restarting Docker"
Stop-Service docker
Start-Service docker
powershell.exe -Command "Install-WindowsFeature -Name Containers"
shutdown /r /t 5 /f /d p:4:1 /c "Reboot for Containters"
net stop winrm
net stop OpenSSHd
echo Sleeping while restart in progress
ping 127.0.0.1 -n 60 > nul
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/inplace_setup
powershell.exe -Command "wget -uri http://aka.ms/setupcontainers -OutFile C:\ContainerSetup.ps1"
set WIMPATH=http://192.168.254.1:8000/ContainerOSImage.wim
set LOCALWIMPATH=C:\Users\vagrant\ContainerOSImage.wim
if "%WIMPATH%x"=="x" (
powershell.exe -File "C:\ContainerSetup.ps1"
) else (
powershell.exe -Command "wget -uri %WIMPATH% -OutFile %LOCALWIMPATH%"
)
:waiting
if not exist %LOCALWIMPATH% (
echo Waiting for WimPath %LOCALWIMPATH%
ping 127.0.0.1 -n 5 > nul
goto waiting
)
if exist %LOCALWIMPATH% (
powershell.exe -File "C:\ContainerSetup.ps1" -WimPath %LOCALWIMPATH%
del %LOCALWIMPATH%
) else (
powershell.exe -File "C:\ContainerSetup.ps1"
)
)
echo Done with %0
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/manage_docker
Sleep 2
# https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/inplace_setup
wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1
# create a Task Scheduler task which is also able to run in battery mode due
# to host notebooks working in battery mode.
function Run-Interactive {
param( [string] $commandline)
$xml = @"
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2014-03-27T13:53:05</Date>
<Author>vagrant</Author>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<StartBoundary>2014-03-27T00:00:00</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>vagrant</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>powershell.exe</Command>
<Arguments>-Command $commandline</Arguments>
</Exec>
</Actions>
</Task>
"@
$XmlFile = $env:Temp + "\InstallContainerHost.xml"
Write-Host "Write Task '$commandline' to $XmlFile"
$xml | Out-File $XmlFile
& schtasks /Delete /F /TN InstallContainerHost
& schtasks /Create /TN InstallContainerHost /XML $XmlFile
& schtasks /Run /TN InstallContainerHost
Write-Host "Waiting until Scheduled Task InstallContainerHost task is no longer running"
do {
Start-Sleep -Seconds 5
} while ( (& schtasks /query /tn InstallContainerHost | Select-String -Pattern "InstallContainerHost" -SimpleMatch) -like "*Running*")
if ((& schtasks /query /tn InstallContainerHost | Select-String -Pattern "InstallContainerHost" -SimpleMatch) -like "*Could not start*") {
Write-Error "Scheduled Task InstallContainerHost could not start!"
} else {
Write-Host "Scheduled Task InstallContainerHost '$commandline' finished"
}
& schtasks /Delete /F /TN InstallContainerHost
}
Run-Interactive -commandline "C:\Install-ContainerHost.ps1 -HyperV"
# https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/manage_docker
......@@ -26,13 +26,23 @@ Vagrant.configure("2") do |config|
end
config.vm.provider :vmware_fusion do |v, override|
#v.gui = true
v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
v.enable_vmrun_ip_lookup = false
v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
v.vmx["mks.enable3d"] = "TRUE"
v.vmx["mks.forceDiscreteGPU"] = "TRUE"
v.vmx["gui.fullscreenatpoweron"] = "TRUE"
v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
v.vmx["sound.startconnected"] = "TRUE"
v.vmx["sound.present"] = "TRUE"
v.vmx["sound.autodetect"] = "TRUE"
end
config.vm.provider :vmware_workstation do |v, override|
......
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 1.6.2"
Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows-2016"
config.vm.box = "windows_2016"
config.vm.communicator = "winrm"
# Admin user name and password
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"
config.vm.guest = :windows
config.windows.halt_timeout = 15
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
config.vm.provider :virtualbox do |v, override|
#v.gui = true
v.customize ["modifyvm", :id, "--memory", 2048]
v.customize ["modifyvm", :id, "--cpus", 2]
v.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
config.vm.provider :vmware_fusion do |v, override|
v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
v.vmx["vhv.enable"] = "TRUE"
v.vmx["hypervisor.cpuid.v0"] = "FALSE"
v.enable_vmrun_ip_lookup = false
v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
v.vmx["mks.enable3d"] = "TRUE"
v.vmx["mks.forceDiscreteGPU"] = "TRUE"
v.vmx["gui.fullscreenatpoweron"] = "TRUE"
v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
v.vmx["sound.startconnected"] = "TRUE"
v.vmx["sound.present"] = "TRUE"
v.vmx["sound.autodetect"] = "TRUE"
end
config.vm.provider :vmware_workstation do |v, override|
#v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
v.vmx["vhv.enable"] = "TRUE"
v.vmx["hypervisor.cpuid.v0"] = "FALSE"
end
end
......@@ -7,7 +7,8 @@
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "2m",
"boot_wait": "6m",
"boot_command": [ "{{user `product_key`}}<enter>" ],
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
......@@ -17,7 +18,9 @@
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"{{user `autounattend`}}",
"./answer_files/2016/Autounattend.xml",
"./floppy/Windows Powershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
......@@ -28,7 +31,9 @@
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
"scsi0.virtualDev": "lsisas1068",
"vhv.enable": "TRUE",
"hypervisor.cpuid.v0": "FALSE"
}
},
{
......@@ -38,7 +43,8 @@
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "2m",
"boot_wait": "6m",
"boot_command": [ "{{user `product_key`}}<enter>" ],
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
......@@ -47,9 +53,11 @@
"guest_additions_mode": "disable",
"disk_size": 61440,
"floppy_files": [
"{{user `autounattend`}}",
"./answer_files/2016/Autounattend.xml",
"./floppy/Windows Powershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/2016/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1",
"./scripts/oracle-cert.cer"
......@@ -73,10 +81,21 @@
"provisioners": [
{
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/enable-rdp.bat"
]
},
{
"type": "windows-restart"
},
{
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/pin-powershell.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compact.bat"
]
......@@ -91,9 +110,10 @@
}
],
"variables": {
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/3/C/73C250BE-67C4-440B-A69B-D0E8EE77F01C/10514.0.150808-1529.TH2_RELEASE_SERVER_OEMRET_X64FRE_EN-US.ISO",
"iso_url": "https://aka.ms/tp4/serveriso",
"iso_checksum_type": "md5",
"iso_checksum": "7003c2a4f9abe672c570ff018fbf3a27",
"autounattend": "./answer_files/2016/Autounattend.xml"
"iso_checksum": "935ba77651210bd1bd71a114c92b0caa",
"autounattend": "./answer_files/2016/Autounattend.xml",
"product_key": "<tab>"
}
}
......@@ -7,7 +7,8 @@
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "2m",
"boot_wait": "6m",
"boot_command": [ "{{user `product_key`}}<enter>" ],
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
......@@ -17,9 +18,11 @@
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"{{user `autounattend`}}",
"./answer_files/2016/Autounattend.xml",
"./floppy/Windows Powershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1"
],
......@@ -28,7 +31,9 @@
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
"scsi0.virtualDev": "lsisas1068",
"vhv.enable": "TRUE",
"hypervisor.cpuid.v0": "FALSE"
}
},
{
......@@ -38,7 +43,8 @@
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": false,
"boot_wait": "2m",
"boot_wait": "6m",
"boot_command": [ "{{user `product_key`}}<enter>" ],
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
......@@ -47,9 +53,11 @@
"guest_additions_mode": "disable",
"disk_size": 61440,
"floppy_files": [
"{{user `autounattend`}}",
"./answer_files/2016/Autounattend.xml",
"./floppy/Windows Powershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1",
"./scripts/oracle-cert.cer"
......@@ -73,11 +81,10 @@
"provisioners": [
{
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/install-containers.bat",
"./scripts/enable-rdp.bat"
]
},
{
......@@ -85,8 +92,23 @@
},
{
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/install-docker.bat",
"./scripts/pin-powershell.bat",
"./scripts/uac-enable.bat"
]
},
{
"type": "powershell",
"scripts": [
"./scripts/install-docker.ps1",
"./scripts/enable-docker-unsecure.ps1"
]
},
{
"type": "windows-shell",
"scripts": [
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compact.bat"
]
......@@ -97,13 +119,14 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2016_docker_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_docker.template"
}
],
"variables": {
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/3/C/73C250BE-67C4-440B-A69B-D0E8EE77F01C/10514.0.150808-1529.TH2_RELEASE_SERVER_OEMRET_X64FRE_EN-US.ISO",
"iso_url": "https://aka.ms/tp4/serveriso",
"iso_checksum_type": "md5",
"iso_checksum": "7003c2a4f9abe672c570ff018fbf3a27",
"autounattend": "./answer_files/2016/Autounattend.xml"
"iso_checksum": "935ba77651210bd1bd71a114c92b0caa",
"autounattend": "./answer_files/2016/Autounattend.xml",
"product_key": "<tab>"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment