forked from mwrock/packer-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin2012r2.json
121 lines (121 loc) · 3.58 KB
/
win2012r2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
"builders": [
{
"boot_wait": "1m",
"communicator": "winrm",
"disk_size": "{{ user `disk_size` }}",
"floppy_files": [
"./answer_files/2012_r2/Autounattend.xml",
"./answer_files/2012_r2/postunattend.xml",
"./floppy/windows/win-updates.ps1"
],
"guest_os_type": "{{ user `virtualbox_guest_os_type` }}",
"headless": "{{ user `headless` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_urls": [
"{{ user `iso_path` }}/{{ user `iso_name` }}",
"{{ user `iso_url` }}"
],
"output_directory": "output-{{ user `vm_name` }}-virtualbox-iso",
"shutdown_command": "C:/windows/system32/sysprep/sysprep.exe /generalize /oobe /unattend:C:/Windows/Panther/Unattend/unattend.xml /quiet /shutdown",
"shutdown_timeout": "15m",
"type": "virtualbox-iso",
"vboxmanage": [
[
"modifyvm", "{{.Name}}", "--natpf1", "guest_winrm,tcp,,55985,,5985"
],
[
"modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}"
],
[
"modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}"
],
[
"setextradata", "global", "GUI/SuppressMessages", "all"
]
],
"winrm_username": "{{user `winrm_username`}}",
"winrm_password": "{{user `winrm_password`}}",
"winrm_timeout": "6h"
}
],
"provisioners": [
{
"type":"powershell",
"inline": [
"(iex ((new-object net.webclient).DownloadString('http://artifactory.otas.nv/chocoinstall.ps1')))>$null 2>&1",
"choco install 7zip -y",
]
},
{
"type":"powershell",
"elevated_user": "{{user `winrm_username`}}",
"elevated_password": "{{user `winrm_password`}}",
"inline": [
"choco install powershell -pre -y"
]
},
{
"type": "windows-restart"
},
{
"type":"windows-shell",
"scripts": [
"./scripts/windows/enable-rdp.bat",
"./scripts/windows/disable-tasks.bat",
"./scripts/windows/perfomance-tuning.bat",
"./scripts/windows/registry-settings.bat"
]
},
{
"type":"powershell",
"inline": [
"choco install VBoxGuestAdditions.install -y"
],
"only": ["virtualbox-iso"]
},
{
"type": "powershell",
"scripts": [
"./scripts/windows/disable-services.ps1",
"./scripts/windows/cleanup.ps1"
]
},
{
"type": "windows-restart"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box",
"type": "vagrant",
"vagrantfile_template": "{{ user `vagrantfile_template` }}"
}
],
"variables": {
"cleanup_pause": "",
"cpus": "1",
"disk_size": "65536",
"ftp_proxy": "{{env `ftp_proxy`}}",
"headless": "false",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "865494e969704be1c4496d8614314361d025775e",
"iso_checksum_type": "sha1",
"iso_name": "en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso",
"iso_path": "iso/windows",
"memory": "1024",
"no_proxy": "{{env `no_proxy`}}",
"hostname": "vagrant",
"winrm_password": "vagrant",
"winrm_username": "vagrant",
"update": "false",
"vagrantfile_template": "vagrantfile-windows.template",
"version": "0.1.0",
"virtualbox_guest_os_type": "Windows2012_64",
"vm_name": "Windows2012r2",
"vmware_guest_os_type": "Windows2012-64"
}
}