Skip to content

Commit d2715af

Browse files
author
Phil Bolduc
committed
Initial changes for Hyper-V builder.
1 parent 1b665df commit d2715af

4 files changed

+75
-1
lines changed
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
setlocal EnableDelayedExpansion EnableExtensions
2+
title Installing Integration Services. Please wait...
3+
4+
REM @for %%i in (%PACKER_SEARCH_PATHS%) do @if not defined setup @if exist "%%~i\support\x86\setup.exe" set setup=%%~i\support\x86\setup.exe
5+
6+
@for %%i in (d: e: f: g:) do @if not defined setup @if exist "%%~i\support\x86\setup.exe" set setup=%%~i\support\x86\setup.exe
7+
8+
if not defined setup goto nosetup
9+
10+
%setup% /quiet /norestart
11+
12+
goto :exit
13+
14+
:nosetup
15+
echo ==^> ERROR: Could not find Integration Services setup program.
16+
17+
:exit

floppy/zzzz-shutdown.bat

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
setlocal EnableDelayedExpansion EnableExtensions
2+
title Installation complete. Shutting down. Please wait...
3+
4+
shutdown /s /t 10 /f /d p:4:1 /c "Packer Shutdown"
5+

win2008r2-standard.json

+27-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"cm": "chef",
55
"cm_version": "",
6-
"iso_url": "iso/en_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403.iso",
6+
"iso_url": "iso/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso",
77
"iso_checksum": "7e7e9425041b3328ccf723a0855c2bc4f462ec57",
88
"update": true,
99
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c 'Packer Shutdown'"
@@ -71,6 +71,32 @@
7171
["modifyvm", "{{.Name}}", "--memory", "768"],
7272
["modifyvm", "{{.Name}}", "--cpus", "1"]
7373
]
74+
},
75+
{
76+
"vm_name": "win2008r2-standard",
77+
"type": "hyperv-iso",
78+
"iso_url": "{{ user `iso_url` }}",
79+
"iso_checksum": "{{ user `iso_checksum` }}",
80+
"iso_checksum_type": "sha1",
81+
"ssh_username": "vagrant",
82+
"ssh_password": "vagrant",
83+
"ssh_wait_timeout": "10000s",
84+
"switch_name": "Virtual WLAN",
85+
"floppy_files": [
86+
"floppy/win2008r2-standard/Autounattend.xml",
87+
"floppy/00-run-all-scripts.cmd",
88+
"floppy/install-winrm.cmd",
89+
"floppy/powerconfig.bat",
90+
"floppy/01-install-wget.cmd",
91+
"floppy/_download.cmd",
92+
"floppy/_packer_config.cmd",
93+
"floppy/passwordchange.bat",
94+
"floppy/openssh.bat",
95+
"floppy/disablewinupdate.bat",
96+
"floppy/z-install-integration-services.bat",
97+
"floppy/zz-start-sshd.cmd",
98+
"floppy/zzzz-shutdown.bat"
99+
]
74100
}
75101
],
76102
"provisioners": [

win2012r2-standard.json

+26
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,32 @@
7171
["modifyvm", "{{.Name}}", "--cpus", "1"],
7272
["setextradata", "{{.Name}}", "VBoxInternal/CPUM/CMPXCHG16B", "1"]
7373
]
74+
},
75+
{
76+
"vm_name": "win2012r2-standard",
77+
"type": "hyperv-iso",
78+
"iso_url": "{{ user `iso_url` }}",
79+
"iso_checksum": "{{ user `iso_checksum` }}",
80+
"iso_checksum_type": "sha1",
81+
"ssh_username": "vagrant",
82+
"ssh_password": "vagrant",
83+
"ssh_wait_timeout": "10000s",
84+
"switch_name": "Virtual WLAN",
85+
"floppy_files": [
86+
"floppy/win2012r2-standard/Autounattend.xml",
87+
"floppy/00-run-all-scripts.cmd",
88+
"floppy/install-winrm.cmd",
89+
"floppy/powerconfig.bat",
90+
"floppy/01-install-wget.cmd",
91+
"floppy/_download.cmd",
92+
"floppy/_packer_config.cmd",
93+
"floppy/passwordchange.bat",
94+
"floppy/openssh.bat",
95+
"floppy/z-install-integration-services.bat",
96+
"floppy/zz-start-sshd.cmd",
97+
"floppy/oracle-cert.cer",
98+
"floppy/zzzz-shutdown.bat"
99+
]
74100
}
75101
],
76102
"provisioners": [

0 commit comments

Comments
 (0)