forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json.erb
96 lines (91 loc) · 3.16 KB
/
packer.json.erb
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
{
"builders": [
<% builders.each do |builder| %>
{
"type": "<%= builder.vmtype %>",
"vm_name": "DogDev",
"communicator": "winrm",
"cpus": "2",
"memory": "2048",
"disk_size": "262144",
"iso_checksum": "sha256:<%= builder.checksum %>",
"iso_url": "<%= builder.isourl %>",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"winrm_username": "dogdev",
"winrm_password": "dogdev",
"winrm_timeout": "15m",
"floppy_files": [
"<%= builder.autounattend %>",
"./scripts/Enable-WinRM.ps1"
],
<% if builder.vmtype == "vmware-iso" %>
"guest_os_type": "<%= builder.ostype %>",
"disk_adapter_type": "lsisas1068",
"disk_type_id": "1",
"headless": false,
"tools_upload_flavor": "windows",
"tools_upload_path": "c:/Windows/Temp/windows.iso",
"version": 14,
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"vhv.enable": false
},
"vnc_port_max": 5980,
"vnc_port_min": 5900
<% end %>
<% if builder.vmtype == "parallels-iso" %>
"guest_os_type": "<%= builder.ostype %>",
"parallels_tools_flavor": "win",
"parallels_tools_mode": "upload",
"parallels_tools_guest_path": "c:/Windows/Temp/windows.iso",
"prlctl": [
["set", "{{.Name}}", "--efi-boot", "off"],
["set", "{{.Name}}", "--nested-virt", "off"],
["set", "{{.Name}}", "--faster-vm", "on"],
["set", "{{.Name}}", "--disable-winlogo", "on"],
["set", "{{.Name}}", "--battery-status", "off"],
["set", "{{.Name}}", "--resource-quota", "unlimited"],
["set", "{{.Name}}", "--adaptive-hypervisor", "on"],
["set", "{{.Name}}", "--3d-accelerate", "off"],
["set", "{{.Name}}", "--shared-profile", "off"],
["set", "{{.Name}}", "--shared-cloud", "off"],
["set", "{{.Name}}", "--sh-app-guest-to-host", "off"],
["set", "{{.Name}}", "--sh-app-host-to-guest", "off"]
]
<% end %>
<% if builder.vmtype == "virtualbox-iso" %>
"guest_os_type": "<%= builder.ostype %>",
"headless": false,
"post_shutdown_delay": "10s",
"guest_additions_mode": "upload",
"guest_additions_path": "c:/Windows/Temp/windows.iso",
"hard_drive_interface": "sata"
<% end %>
}
<% if(builder != builders.last) %>
,
<% end %>
<% end %>
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "<%= name %>_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "<%= vagrantfile %>"
}
],
"provisioners": [
{
"type": "powershell",
"elevated_user": "dogdev",
"elevated_password": "dogdev",
"scripts": [
"./scripts/Install-GuestTools.ps1",
"./scripts/Install-DevEnv.ps1",
"./scripts/Disable-WinRM.ps1"
]
}
]
}