Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
837369d4
Commit
837369d4
authored
Nov 20, 2015
by
Stefan Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nested hypervisor, use bootcommand as workaround for product key popup
parent
bfa6a11f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
26 deletions
+29
-26
answer_files/2016/Autounattend.xml
answer_files/2016/Autounattend.xml
+1
-1
scripts/install-containers.bat
scripts/install-containers.bat
+1
-0
scripts/install-docker.bat
scripts/install-docker.bat
+4
-23
scripts/sleep.bat
scripts/sleep.bat
+2
-0
scripts/wait-for-uplink.bat
scripts/wait-for-uplink.bat
+14
-0
windows_2016.json
windows_2016.json
+7
-2
No files found.
answer_files/2016/Autounattend.xml
View file @
837369d4
...
...
@@ -66,7 +66,7 @@
<!-- 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>D2N9P-3P6X9-2R39C-7RTCD-MDVJX</Key>-->
<WillShowUI>
OnErro
r
</WillShowUI>
<WillShowUI>
Neve
r
</WillShowUI>
</ProductKey>
<AcceptEula>
true
</AcceptEula>
<FullName>
Vagrant
</FullName>
...
...
scripts/install-containers.bat
View file @
837369d4
powershell
.exe
-Command
"Install-WindowsFeature -Name Containers"
powershell
.exe
-Command
"Install-WindowsFeature -Name Hyper-V"
shutdown
/r /t
5
/f /d
p
:4:1
/c
"Reboot for Containters"
net
stop
winrm
...
...
scripts/install-docker.bat
View file @
837369d4
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/inplace_setup
powershell
.exe
-Command
"wget -uri http://aka.ms/
setupc
ontainer
s
-OutFile C:\Container
Setup
.ps1"
powershell
.exe
-Command
"wget -uri http
s
://aka.ms/
tp4/Install-C
ontainer
Host
-OutFile C:\
Install-
Container
Host-1
.ps1"
set
WIMPATH
=
http
://
192.168.254.1:8000/ContainerOSImage.wim
set
LOCALWIMPATH
=
C
:\Users\vagrant\ContainerOSImage.wim
rem patch the install script, see
http
s
://
github.com/Microsoft/Virtualization-Documentation/pull/90
powershell
.exe
-Command
"cat C:\Install-ContainerHost-1.ps1 |
%%
{$_ -replace 'qfe =','qfe = 0 #'} | Set-Content C:\Install-ContainerHost.ps1"
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"
)
)
powershell
.exe
-File
"C:\Install-ContainerHost.ps1"
-HyperV
echo
Done
with
%
0
...
...
scripts/sleep.bat
0 → 100644
View file @
837369d4
echo
Sleeping
for
another
minute
ping
-n
60
127
.0.0.1
>
nul
:
2
>
nul
:
scripts/wait-for-uplink.bat
0 → 100644
View file @
837369d4
echo
Sleeping
until
internet
is
available
@setlocal
enableextensions
enabledelayedexpansion
@echo
off
set
ipaddr
=
8
.8.8.8
:loop
set
state
=
down
for
/f
"tokens=5,7"
%%a
in
(
'ping -n 1
!ipaddr!
'
)
do
(
if
"x
%%a
"
==
"xReceived"
if
"x
%%b
"
==
"x1,"
set
state
=
up
)
echo
.Link
is
!state!
ping
-n
5
127
.0.0.1
>
nul
:
2
>
nul
:
if
"
%state%
"
==
"down"
goto
:loop
endlocal
windows_2016.json
View file @
837369d4
...
...
@@ -6,7 +6,8 @@
"iso_checksum_type"
:
"md5"
,
"iso_checksum"
:
"935ba77651210bd1bd71a114c92b0caa"
,
"headless"
:
false
,
"boot_wait"
:
"2m"
,
"boot_wait"
:
"6m"
,
"boot_command"
:
[
"<tab><enter>"
],
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
"ssh_wait_timeout"
:
"6h"
,
...
...
@@ -27,7 +28,9 @@
"RemoteDisplay.vnc.port"
:
"5900"
,
"memsize"
:
"2048"
,
"numvcpus"
:
"2"
,
"scsi0.virtualDev"
:
"lsisas1068"
"scsi0.virtualDev"
:
"lsisas1068"
,
"vhv.enable"
:
"TRUE"
,
"hypervisor.cpuid.v0"
:
"FALSE"
}
},
{
...
...
@@ -76,6 +79,8 @@
"./scripts/vagrant-ssh.bat"
,
"./scripts/enable-rdp.bat"
,
"./scripts/install-containers.bat"
,
"./scripts/wait-for-uplink.bat"
,
"./scripts/install-docker.bat"
,
"./scripts/install-docker.bat"
,
"./scripts/uac-enable.bat"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment