Skip to content

Commit 4bf3b08

Browse files
author
Phil Bolduc
committed
Added Hyper-V builder
1 parent d2715af commit 4bf3b08

5 files changed

+119
-1
lines changed

build.cmd

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@ECHO OFF
2+
SETLOCAL
3+
4+
SET TARGET=%1
5+
IF NOT EXIST "box" MKDIR box
6+
7+
IF EXIST %~dp0packer.log DEL %~dp0packer.log
8+
SET PACKER_LOG=1
9+
SET PACKER_LOG_PATH=%~dp0packer.log
10+
11+
SET PACKER_POWERSHELL_DEBUG=1
12+
SET PACKER_VARS=-var cm=nocm
13+
14+
C:\tools\packer-0.7.2\packer.exe build -only=hyperv-iso %PACKER_VARS% %TARGET%

win2012-standard-cygwin.json

+28-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,34 @@
7171
["modifyvm", "{{.Name}}", "--memory", "768"],
7272
["modifyvm", "{{.Name}}", "--cpus", "1"]
7373
]
74-
}
74+
},
75+
{
76+
"vm_name": "win2012-standard-cygwin",
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/win2012-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/cygwin.sh",
94+
"floppy/passwordchange.bat",
95+
"floppy/cygwin.bat",
96+
"floppy/z-install-integration-services.bat",
97+
"floppy/zz-start-sshd.cmd",
98+
"floppy/oracle-cert.cer",
99+
"floppy/zzzz-shutdown.bat"
100+
],
101+
}
75102
],
76103
"provisioners": [
77104
{

win2012-standard.json

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

win2012r2-standard-cygwin.json

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

win2012r2-standardcore.json

+25
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,31 @@
7171
["modifyvm", "{{.Name}}", "--cpus", "1"],
7272
["setextradata", "{{.Name}}", "VBoxInternal/CPUM/CMPXCHG16B", "1"]
7373
]
74+
},
75+
{
76+
"vm_name": "win2012r2-standardcore",
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-standardcore/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/zz-start-sshd.cmd",
96+
"floppy/oracle-cert.cer",
97+
"floppy/zzzz-shutdown.bat"
98+
]
7499
}
75100
],
76101
"provisioners": [

0 commit comments

Comments
 (0)