-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.json
171 lines (171 loc) · 6.81 KB
/
template.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"builders": [
{
"boot_wait": "5s",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
"guest_os_type": "win-8",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_url": "{{ user `iso_url` }}",
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `build_directory` }}/{{ user `box_basename` }}-{{ user `iso_version` }}-Parallels",
"parallels_tools_flavor": "mac",
"prlctl": [
["set", "{{ .Name }}", "--memsize", "4096"],
["set", "{{ .Name }}", "--memquota", "512:4096"],
["set", "{{ .Name }}", "--cpus", "2"],
["set", "{{ .Name }}", "--distribution", "macosx"],
["set", "{{ .Name }}", "--3d-accelerate", "highest"],
["set", "{{ .Name }}", "--high-resolution", "off"],
["set", "{{ .Name }}", "--auto-share-camera", "off"],
["set", "{{ .Name }}", "--auto-share-bluetooth", "off"],
["set", "{{ .Name }}", "--on-window-close", "keep-running"],
["set", "{{ .Name }}", "--shf-host", "off"]
],
"shutdown_command": "{{ user `shutdown_command` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": "{{ user `ssh_port` }}",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"ssh_username": "{{ user `ssh_username` }}",
"type": "parallels-iso",
"vm_name": "{{ user `box_basename` }}-{{ user `iso_version` }}"
},
{
"boot_wait": "{{ user `boot_wait` }}",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
"guest_additions_mode": "disable",
"guest_os_type": "MacOS1011_64",
"hard_drive_interface": "sata",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_interface": "sata",
"iso_url": "{{ user `iso_url` }}",
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `build_directory` }}/{{ user `box_basename` }}-{{ user `iso_version` }}-VirtualBox",
"shutdown_command": "{{ user `shutdown_command` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": "{{ user `ssh_port` }}",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"ssh_username": "{{ user `ssh_username` }}",
"type": "virtualbox-iso",
"vboxmanage": [
["modifyvm", "{{ .Name }}", "--audiocontroller", "hda"],
["modifyvm", "{{ .Name }}", "--boot1", "dvd"],
["modifyvm", "{{ .Name }}", "--boot2", "disk"],
["modifyvm", "{{ .Name }}", "--chipset", "ich9"],
["modifyvm", "{{ .Name }}", "--firmware", "efi"],
["modifyvm", "{{ .Name }}", "--hpet", "on"],
["modifyvm", "{{ .Name }}", "--keyboard", "usb"],
["modifyvm", "{{ .Name }}", "--memory", "4096"],
["modifyvm", "{{ .Name }}", "--mouse", "usbtablet"],
["modifyvm", "{{ .Name }}", "--vram", "256"],
["storagectl", "{{ .Name }}", "--name", "IDE Controller", "--remove"]
],
"vm_name": "{{ user `box_basename` }}-{{ user `iso_version` }}"
},
{
"boot_wait": "{{ user `boot_wait` }}",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
"guest_os_type": "darwin12-64",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_url": "{{ user `iso_url` }}",
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `build_directory` }}/{{ user `box_basename` }}-{{ user `iso_version` }}-VMWare",
"shutdown_command": "{{ user `shutdown_command` }}",
"skip_compaction": true,
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": "{{ user `ssh_port` }}",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"ssh_username": "{{user `ssh_username`}}",
"tools_upload_flavor": "darwin",
"type": "vmware-iso",
"vm_name": "{{ user `box_basename` }}-{{ user `iso_version` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"ehci.present": "TRUE",
"firmware": "efi",
"hpet0.present": "TRUE",
"ich7m.present": "TRUE",
"keyboardAndMouseProfile": "macProfile",
"smc.present": "TRUE"
}
}
],
"post-processors": [
[
{
"compression_level": "{{ user `compression_level` }}",
"output": "{{ user `build_directory` }}/{{ user `box_basename` }}.{{ .Provider }}.box",
"type": "vagrant",
"vagrantfile_template": "{{ template_dir }}/Vagrantfile"
},
{
"access_token": "{{ user `vagrantup_token` }}",
"box_tag": "{{ user `vagrantup_user` }}/{{ user `box_basename` }}",
"type": "vagrant-cloud",
"version": "{{ user `iso_version` }}",
"version_description": "{{ user `version_description` }}"
}
]
],
"provisioners": [
{
"command": "sleep {{ user `provisioning_delay` }}",
"type": "shell-local"
},
{
"destination": "/private/tmp/set_kcpassword.py",
"source": "{{ template_dir }}/scripts/set_kcpassword.py",
"type": "file"
},
{
"environment_vars": [
"AUTOLOGIN={{ user `autologin` }}",
"INSTALL_VAGRANT_KEYS={{ user `install_vagrant_keys` }}",
"INSTALL_XCODE_CLI_TOOLS={{ user `install_xcode_cli_tools` }}",
"PASSWORD={{ user `ssh_password` }}",
"UPDATE_SYSTEM={{ user `update_system` }}",
"USERNAME={{ user `ssh_username` }}"
],
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
"scripts": [
"{{ template_dir }}/scripts/vagrant.sh",
"{{ template_dir }}/scripts/vmware.sh",
"{{ template_dir }}/scripts/parallels.sh",
"{{ template_dir }}/scripts/xcode-cli-tools.sh",
"{{ template_dir }}/scripts/add-network-interface-detection.sh",
"{{ template_dir }}/scripts/autologin.sh",
"{{ template_dir }}/scripts/system-update.sh",
"{{ template_dir }}/scripts/shrink.sh"
],
"type": "shell"
}
],
"variables": {
"autologin": "true",
"boot_wait": "2s",
"box_basename": "macOS-Desktop",
"build_directory": "build",
"compression_level": "9",
"cpus": "2",
"description": "macOS 11.0.0 (Monterey)",
"disk_size": "40960",
"install_vagrant_keys": "true",
"install_xcode_cli_tools": "true",
"iso_checksum": "281281d1d01f9bfd18851b07d8e31254993c0a55c421124fb6d5cb20e4294132",
"iso_url": "OSX_InstallESD_10.11.1_15B42.dmg",
"iso_version": "11.0.0",
"memory": "4096",
"provisioning_delay": "0",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -h now",
"ssh_password": "vagrant",
"ssh_port": "22",
"ssh_timeout": "10000s",
"ssh_username": "vagrant",
"update_system": "true",
"vagrantup_token": "{{ env `VAGRANT_CLOUD_TOKEN` }}",
"vagrantup_user": "Megabyte",
"version_description": "Minimal macOS 11.0.0 (Monterey). Built from the latest macOS Monterey image. See https://github.com/megabyte-labs/packer-macos-desktop for more details."
}
}